Chapterبەش 5 · Lectureوانە 5.4

Composition of Functionsئاوێتەکردنی نەخشەکان

Machine after machine: (f∘g)(x)=f(g(x))(f\circ g)(x)=f(g(x)), its domain with two checks, why f∘g≠g∘ff\circ g\ne g\circ f, the trap where g∘f=xg\circ f=x hides its domain, finding an inside function, the homework with answers, composition in Python, and an overview of the whole course with what comes next.

ئامێر لە دوای ئامێر: (f∘g)(x)=f(g(x))(f\circ g)(x)=f(g(x))، بە دوو پشکنین، بۆچی f∘g≠g∘ff\circ g\ne g\circ f، ئەو تەڵەیەی کە g∘f=xg\circ f=x دەشارێتەوە، دۆزینەوەی ، ئەرکی ماڵەوە لەگەڵ وەڵامەکان، لە Pythonـدا و کورتەیەکی هەموو کۆرسەکە لەگەڵ هەنگاوی داهاتوو.

10 min read11 خولەک خوێندنەوە · 13 stepsهەنگاو

What you will learnچی فێر دەبیت

  • Compute (f∘g)(x)=f(g(x))(f\circ g)(x)=f(g(x)) and read it as "g first, then f".
  • Find the domain of f∘gf\circ g with two checks, even when the simplified formula hides it.
  • Show with an example that f∘g≠g∘ff\circ g\ne g\circ f, and split a function into an inside and an outside function.
  • Find an inside function g from f and f∘gf\circ g.
  • (f∘g)(x)=f(g(x))(f\circ g)(x)=f(g(x)) بژمێرە و وەک «یەکەم g، پاشان f» بیخوێنەرەوە.
  • f∘gf\circ g بە دوو پشکنین بدۆزەرەوە، تەنانەت کاتێک فۆرمولە سادەکراوەکە دەیشارێتەوە.
  • بە نموونەیەک پیشان بدە کە f∘g≠g∘ff\circ g\ne g\circ f و بۆ و دابەش بکە.
  • g لە f و f∘gf\circ gـەوە بدۆزەرەوە.

Machine after machineئامێر لە دوای ئامێر

A function is like a machine: a number goes in, a number comes out. Put two machines in a row and the output of the first becomes the input of the second. This is .

نەخشە وەک ئامێرێکە: ژمارەیەک دەچێتە ژوورەوە و ژمارەیەک دێتە دەرەوە. دوو ئامێر لە دوای یەک دابنێ، یەکەم دەبێتە دووەم. ئەمە .

A taxi example. A taxi in the city drives at 30 km/h, so after t minutes it has gone d(t)=t2d(t)=\frac t2 km. The fare for d km is F(d)=2000+500dF(d)=2000+500d dinars. The fare after t minutes comes from the two machines one after the other:

نموونەی تەکسی. تەکسییەک لە شاردا بە خێرایی ⁦30 km/h⁩ دەڕوات، بۆیە دوای t خولەک d(t)=t2d(t)=\frac t2 km ڕۆیشتووە. کرێی ⁦d km⁩ F(d)=2000+500dF(d)=2000+500d دینارە. کرێی دوای t خولەک لە دوو ئامێرەکەوە یەک لە دوای یەک دێت:

F(d(t))=2000+500⋅t2=2000+250t,F(d(20))=F(10)=7000F(d(t))=2000+500\cdot\frac t2=2000+250t,\qquad F(d(20))=F(10)=7000

So a 20-minute ride costs 7000 dinars.

کەواتە گەشتێکی ⁦20⁩ خولەکی ⁦7000⁩ دینار دەکات.

Diagram: x goes into machine g; its output g(x) goes into machine f; out comes f(g(x)). Above machine g: check 1, is x in D(g)? Above machine f: check 2, is g(x) in D(f)? Under g: inside function, works first. Under f: outside function, works second. Bottom: (f ∘ g)(x) = f(g(x)) and D(f ∘ g) = { x ∈ D(g) : g(x) ∈ D(f) }.وێنە: x دەچێتە ناو ئامێری g؛ دەرخستەکەی g(x) دەچێتە ناو ئامێری f؛ f(g(x)) دێتە دەرەوە. لە سەرووی ئامێری g: پشکنینی 1، ئایا x لە D(g)ـدایە؟ لە سەرووی ئامێری f: پشکنینی 2، ئایا g(x) لە D(f)ـدایە؟ لە ژێر g: نەخشەی ناوەوە، یەکەم کار دەکات. لە ژێر f: نەخشەی دەرەوە، دووەم کار دەکات. لە خوارەوە: (f ∘ g)(x) = f(g(x)) و D(f ∘ g) = { x ∈ D(g) : g(x) ∈ D(f) }.
f∘gf\circ g: first g, then f, with a domain check at each machine.لە f∘gf\circ gـدا یەکەم g و پاشان f کار دەکات، بە پشکنینی لە هەر ئامێرێکدا.CêIT
The bakery in the bazaarنانەواخانەی بازاڕ

In a bakery the dough machine works first and the oven second: flour → dough → bread. Swap the order and you bake flour, which makes no bread. Composition is the same: the order of the machines matters.

لە نانەواخانەدا ئامێری هەویر یەکەم کار دەکات و تەنوور دووەم: ئارد دەبێتە هەویر و هەویر دەبێتە نان. ڕیزبەندییەکە بگۆڕە، ئارد دەبرژێنیت و نان دروست نابێت. هەمان شتە: ڕیزبەندیی ئامێرەکان گرنگە.

Where the analogy stops workingسنووری ئەم نموونەیە

A real oven takes almost anything; a maths machine accepts only inputs from its domain. That second check is where composition gets tricky.

تەنووری ڕاستەقینە نزیکەی هەموو شتێک وەردەگرێت؛ ئامێری بیرکاری تەنها لە وەردەگرێت. ئەو پشکنینە دووەمە شوێنی ئاڵۆزیی .

Quick checkپشکنینی خێراIn the taxi example, what is the fare after 40 minutes?لە نموونەی تەکسییەکەدا کرێی دوای ⁦40⁩ خولەک چەندە؟

Definition and notationپێناسە و نووسین

The notes define: if f and g are functions, the composite function f∘gf\circ g is

تێبینییەکان پێناسە دەکەن: ئەگەر f و g بن، f∘gf\circ g بریتییە لە

(f∘g)(x)=f(g(x))(f\circ g)(x)=f\big(g(x)\big)

Read "f of g of x" or "f after g". The function written closest to x works first: here g, then f.

دەخوێنرێتەوە «f لە دوای g». ئەو لە x نزیکترە یەکەم کار دەکات: لێرەدا g، پاشان f.

Example: f(x)=x2f(x)=x^2 ("square it") and g(x)=x+3g(x)=x+3 ("add 3"). Then (f∘g)(x)=f(x+3)=(x+3)2(f\circ g)(x)=f(x+3)=(x+3)^2, and (f∘g)(2)=f(5)=25(f\circ g)(2)=f(5)=25.

نموونە: f(x)=x2f(x)=x^2 («دووجای بکە») و g(x)=x+3g(x)=x+3 («3 زیاد بکە»). ئەو کاتە (f∘g)(x)=f(x+3)=(x+3)2(f\circ g)(x)=f(x+3)=(x+3)^2 و (f∘g)(2)=f(5)=25(f\circ g)(2)=f(5)=25.

Quick checkپشکنینی خێراFor (f∘g)(x)(f\circ g)(x), which function is applied first?بۆ (f∘g)(x)(f\circ g)(x)، کام یەکەم جێبەجێ دەکرێت؟

The order matters: f∘g≠g∘ff\circ g\ne g\circ fڕیزبەندی گرنگە: f∘g≠g∘ff\circ g\ne g\circ f

Swap the machines and the result usually changes. With f(x)=x2f(x)=x^2 and g(x)=x+3g(x)=x+3:

ئامێرەکان بگۆڕەوە، ئەنجامەکە زۆرجار دەگۆڕێت. بە f(x)=x2f(x)=x^2 و g(x)=x+3g(x)=x+3:

OrderڕیزبەندیFormulaفۆرمولەAt x=2x=2لە x=2x=2ـدا
f∘gf\circ g: add 3, then squaref∘gf\circ g: 3 زیاد بکە، پاشان دووجای بکە(x+3)2(x+3)^22525
g∘fg\circ f: square, then add 3g∘fg\circ f: دووجای بکە، پاشان 3 زیاد بکەx2+3x^2+377
f⋅gf\cdot g: multiply the outputsf⋅gf\cdot g: لێک بدەx2(x+3)x^2(x+3)2020

So in general f∘g≠g∘ff\circ g\ne g\circ f. There are special pairs that give the same result in both orders: a function and its inverse undo each other, so f∘f−1f\circ f^{-1} and f−1∘ff^{-1}\circ f are both the Identity function x↦xx\mapsto x (each on its own domain).

بۆیە بە گشتی f∘g≠g∘ff\circ g\ne g\circ f. جووتی تایبەت هەن کە بە هەردوو ڕیزبەندی هەمان ئەنجام دەدەن: و پێچەوانەی نەخشەکەی کاری یەکتر هەڵدەوەشێننەوە، بۆیە f∘f−1f\circ f^{-1} و f−1∘ff^{-1}\circ f هەردووکیان نەخشەی هەرئەوێتیی x↦xx\mapsto xـن (هەر یەکەیان لەسەر خۆی).

Quick checkپشکنینی خێراWith f(x)=2xf(x)=2x and g(x)=x−1g(x)=x-1, what is (g∘f)(5)(g\circ f)(5)?بە f(x)=2xf(x)=2x و g(x)=x−1g(x)=x-1، (g∘f)(5)(g\circ f)(5) چەندە؟

The domain of f∘gf\circ g: two checksبواری f∘gf\circ g: دوو پشکنین

An input x survives the composition only if it passes both machines. The notes write:

x تەنها کاتێک لە دەردەچێت کە بە هەردوو ئامێرەکەدا تێبپەڕێت. تێبینییەکان دەنووسن:

D(f∘g)={ x∣x∈D(g), g(x)∈Df }D(f\circ g)=\{\,x\mid x\in D(g),\ g(x)\in D_f\,\}

Both checks must pass. Check 1: g must accept x. Check 2: f must accept the number g(x)g(x).

هەردوو پشکنینەکە دەبێت سەربکەون. پشکنینی ⁦1: g⁩ دەبێت x وەربگرێت. پشکنینی ⁦2: f⁩ دەبێت ژمارەی g(x)g(x) وەربگرێت.

Watch it with g(x)=1−x2g(x)=1-x^2 (accepts every x) and f(u)=uf(u)=\sqrt u (accepts only u≥0u\ge0). For x=2x=2, g gives −3-3 and f cannot take a square root of it:

بە g(x)=1−x2g(x)=1-x^2 (هەموو xێک وەردەگرێت) و f(u)=uf(u)=\sqrt u (تەنها u≥0u\ge0 وەردەگرێت) سەیری بکە. بۆ x=2x=2، g −3-3 دەدات و f ناتوانێت ئەو ژمارەیە بدۆزێتەوە:

Animation with two machines: g(x) = 1 − x squared, then f(u) = square root of u. Inputs pass one at a time. x = 0 gives 1, then 1 (accepted). x = 0.6 gives 0.64, then 0.8 (accepted). x = −1 gives 0, then 0 (accepted). x = 2 gives −3, and machine f turns orange and rejects it, because the square root of −3 is not real. x = 1.5 gives −1.25 and is rejected too. A number line below collects green dots for accepted inputs and orange crosses for rejected ones. The last frame shades the interval from −1 to 1: the domain of f ∘ g is [−1, 1].
Animation with two machines: g(x) = 1 − x squared, then f(u) = square root of u. Inputs pass one at a time. x = 0 gives 1, then 1 (accepted). x = 0.6 gives 0.64, then 0.8 (accepted). x = −1 gives 0, then 0 (accepted). x = 2 gives −3, and machine f turns orange and rejects it, because the square root of −3 is not real. x = 1.5 gives −1.25 and is rejected too. A number line below collects green dots for accepted inputs and orange crosses for rejected ones. The last frame shades the interval from −1 to 1: the domain of f ∘ g is [−1, 1].
Only the inputs whose g(x)g(x) is in the domain of f survive: D(f∘g)=[−1,1]D(f\circ g)=[-1,1].تەنها ئەو xـانەی کە g(x)g(x)ـیان لە fـدایە دەمێننەوە: D(f∘g)=[−1,1]D(f\circ g)=[-1,1].CêIT

Algebra gives the same answer: we need 1−x2≥01-x^2\ge0, that is x2≤1x^2\le1, so −1≤x≤1-1\le x\le1.

جەبریش هەمان وەڵام دەدات: پێویستمان بە 1−x2≥01-x^2\ge0ـە، واتە x2≤1x^2\le1، بۆیە −1≤x≤1-1\le x\le1.

Quick checkپشکنینی خێراg(x)=x−5g(x)=x-5 and f(u)=uf(u)=\sqrt u. What is D(f∘g)D(f\circ g)?g(x)=x−5g(x)=x-5 و f(u)=uf(u)=\sqrt u. D(f∘g)D(f\circ g) چییە؟

بیرکاری ١٢ زانستی ٣-١ ئاوێتەکردنی نەخشەکانM. Hemin Pirot م. هێمن پیرۆت · Kurdish (Sorani)کوردی (سۆرانی) · 2.4K viewsبینین · 102 likesلایک

In Kurdish: composing two functions and finding the domain of the composite function, from the Grade 12 book.

بە کوردی: و دۆزینەوەی ، لە کتێبی پۆلی ⁦12⁩.

Sorani, Grade 12 science (3-1) composition of functions (ئاوێتەکردنی نەخشەکان) and the domain of a composite function.

بە سۆرانی، پۆلی ⁦12⁩ـی زانستی ⁦(3-1)⁩: و .

Worked example: f(x)=x−1f(x)=\sqrt{x-1}, g(x)=x2+1g(x)=x^2+1نموونەی چارەسەرکراو: f(x)=x−1f(x)=\sqrt{x-1}، g(x)=x2+1g(x)=x^2+1

The example in the notes asks for (f∘g)(x)(f\circ g)(x), (g∘f)(x)(g\circ f)(x) and (f∘f)(x)(f\circ f)(x), with no answers. Here are the answers and, just as important, their domains. Start with Df=[1,∞)D_f=[1,\infty) (we need x−1≥0x-1\ge0) and Dg=RD_g=\mathbb{R}.

نموونەکەی تێبینییەکان داوای (f∘g)(x)(f\circ g)(x)، (g∘f)(x)(g\circ f)(x) و (f∘f)(x)(f\circ f)(x) دەکات، بێ وەڵام. ئەمانە وەڵامەکانن لەگەڵ ، کە بە هەمان ئەندازە گرنگن. بە Df=[1,∞)D_f=[1,\infty) (پێویستمان بە x−1≥0x-1\ge0ـە) و Dg=RD_g=\mathbb{R} دەست پێبکە.

Three compositionsسێ ئاوێتەکردنی نەخشەکان
  1. f∘gf\circ gf∘gf\circ g

    Put g(x)=x2+1g(x)=x^2+1 into f. Since x2+1≥1x^2+1\ge1 for every x, check 2 always passes, so the domain is R\mathbb{R}. Remember that x2=∣x∣\sqrt{x^2}=|x| (see absolute value):

    g(x)=x2+1g(x)=x^2+1 بخە ناو f. لەبەر ئەوەی بۆ هەموو xێک x2+1≥1x^2+1\ge1، پشکنینی 2 هەمیشە سەردەکەوێت، بۆیە R\mathbb{R}ـە. لەبیرت بێت x2=∣x∣\sqrt{x^2}=|x| (بڕوانە نرخی ڕووت):

    (f∘g)(x)=(x2+1)−1=x2=∣x∣,D(f∘g)=R(f\circ g)(x)=\sqrt{(x^2+1)-1}=\sqrt{x^2}=|x|,\qquad D(f\circ g)=\mathbb{R}
  2. g∘fg\circ fg∘fg\circ f

    Now f works first, so check 1 needs x∈Dfx\in D_f, that is x≥1x\ge1:

    ئێستا f یەکەم کار دەکات، بۆیە پشکنینی 1 پێویستی بە x∈Dfx\in D_f هەیە، واتە x≥1x\ge1:

    (g∘f)(x)=(x−1)2+1=(x−1)+1=x,D(g∘f)=[1,∞)(g\circ f)(x)=\left(\sqrt{x-1}\right)^2+1=(x-1)+1=x,\qquad D(g\circ f)=[1,\infty)
  3. f∘ff\circ ff∘ff\circ f

    Check 1: x≥1x\ge1. Check 2: the inner result x−1\sqrt{x-1} must be in DfD_f, so x−1≥1\sqrt{x-1}\ge1, which means x−1≥1x-1\ge1, x≥2x\ge2:

    پشکنینی 1: x≥1x\ge1. پشکنینی 2: ئەنجامی ناوەوەی x−1\sqrt{x-1} دەبێت لە DfD_fـدا بێت، بۆیە x−1≥1\sqrt{x-1}\ge1، واتە x−1≥1x-1\ge1، x≥2x\ge2:

    (f∘f)(x)=x−1−1,D(f∘f)=[2,∞)(f\circ f)(x)=\sqrt{\sqrt{x-1}-1},\qquad D(f\circ f)=[2,\infty)

Check with numbers: (f∘g)(−3)=10−1=3=∣−3∣(f\circ g)(-3)=\sqrt{10-1}=3=|-3|, (g∘f)(5)=(4)2+1=5(g\circ f)(5)=(\sqrt4)^2+1=5 and (f∘f)(10)=3−1=2(f\circ f)(10)=\sqrt{3-1}=\sqrt2. But (f∘f)(1.5)(f\circ f)(1.5) does not exist: 0.5−1<0\sqrt{0.5}-1<0.

بە ژمارە بپشکنە: (f∘g)(−3)=10−1=3=∣−3∣(f\circ g)(-3)=\sqrt{10-1}=3=|-3|، (g∘f)(5)=(4)2+1=5(g\circ f)(5)=(\sqrt4)^2+1=5 و (f∘f)(10)=3−1=2(f\circ f)(10)=\sqrt{3-1}=\sqrt2. بەڵام (f∘f)(1.5)(f\circ f)(1.5) بوونی نییە: 0.5−1<0\sqrt{0.5}-1<0.

Worked example: f(x)=x−1f(x)=\sqrt{x-1}, g(x)=x2+1g(x)=x^2+1نموونەی چارەسەرکراو: f(x)=x−1f(x)=\sqrt{x-1}، g(x)=x2+1g(x)=x^2+1

The trap: g∘f=xg\circ f=x, but not for every xتەڵەکە: g∘f=xg\circ f=x، بەڵام نەک بۆ هەموو x

The simplified answer (g∘f)(x)=x(g\circ f)(x)=x looks like the identity function, defined everywhere. It is not: f must work first, and f has no real value for x<1x<1. The graph of g∘fg\circ f is only the half-line of y=xy=x that starts at (1,1)(1,1):

وەڵامە سادەکراوەکەی (g∘f)(x)=x(g\circ f)(x)=x لە دەچێت کە لە هەموو شوێنێک پێناسەکراوە. وا نییە: f دەبێت یەکەم کار بکات و f بۆ x<1x<1 هیچ نادات. g∘fg\circ f تەنها ئەو نیوەهێڵەی y=xy=xـە کە لە (1,1)(1,1)ـەوە دەست پێدەکات:

Coordinate plane from −3 to 4. The line y = x is drawn dashed and faint for x below 1, and as a thick orange ray from the filled point (1, 1) upwards to the right. Label: y = (g ∘ f)(x) = x, x ≥ 1. A note with an arrow to the dashed part says: this part is NOT on the graph, f gives no real value for x < 1, f(x) = √(x − 1).ڕووتەختی پۆتان لە −3 تا 4. هێڵی y = x بۆ x لە 1 بچووکتر پچڕپچڕ و کاڵ کێشراوە و لە خاڵی پڕکراوی (1، 1)ـەوە وەک نیوەهێڵێکی پرتەقاڵیی ئەستوور بەرەو سەرەوەی ڕاست دەڕوات. ناونیشان: y = (g ∘ f)(x) = x، x ≥ 1. تێبینییەک بە تیرێک بۆ بەشە پچڕپچڕەکە دەڵێت: ئەم بەشە لە هێڵکاریی نەخشەدا نییە، f بۆ x لە 1 بچووکتر بەهای ڕاستی نادات، f(x) = √(x − 1).
g∘fg\circ f equals x only on [1,∞)[1,\infty): the formula hides the domain.فۆرمولەی (g∘f)(x)=x(g\circ f)(x)=x تەنها لەسەر [1,∞)[1,\infty) دروستە: فۆرمولەکە دەشارێتەوە.CêIT
Quick checkپشکنینی خێراWith f(x)=x−1f(x)=\sqrt{x-1} and g(x)=x2+1g(x)=x^2+1, what is (g∘f)(0)(g\circ f)(0)?بە f(x)=x−1f(x)=\sqrt{x-1} و g(x)=x2+1g(x)=x^2+1، (g∘f)(0)(g\circ f)(0) چەندە؟

Finding the inside functionدۆزینەوەی نەخشەی ناوەوە

Homework from the notes: find g(x)g(x) such that (f∘g)(x)=x3(f\circ g)(x)=x^3, where f(x)=2x+1f(x)=2x+1.

ئەرکی ماڵەوە لە تێبینییەکانەوە: g(x)g(x) بدۆزەرەوە بە جۆرێک کە (f∘g)(x)=x3(f\circ g)(x)=x^3، کە f(x)=2x+1f(x)=2x+1.

  1. Write what f does to g(x)g(x)بنووسە f چی بە g(x)g(x) دەکات

    f doubles its input and adds 1, so f(g(x))=2g(x)+1f(g(x))=2g(x)+1.

    f دووهێندە دەکات و 1 زیاد دەکات، بۆیە f(g(x))=2g(x)+1f(g(x))=2g(x)+1.

  2. Set it equal and solve for g(x)g(x)یەکسانی بکە و بۆ g(x)g(x) چارەسەری بکە

    Undo the two steps of f in reverse order: subtract 1, then halve.

    دوو هەنگاوەکەی f بە ڕیزبەندیی پێچەوانە هەڵبوەشێنەوە: 1 لێ دەربکە، پاشان نیوەی بکە.

    2g(x)+1=x3  ⟺  g(x)=x3−122g(x)+1=x^3\iff g(x)=\frac{x^3-1}{2}
  3. Checkپشکنین

    f ⁣(x3−12)=2⋅x3−12+1=x3f\!\left(\frac{x^3-1}{2}\right)=2\cdot\frac{x^3-1}{2}+1=x^3. For example g(2)=72g(2)=\frac72 and f ⁣(72)=8=23f\!\left(\frac72\right)=8=2^3.

    f ⁣(x3−12)=2⋅x3−12+1=x3f\!\left(\frac{x^3-1}{2}\right)=2\cdot\frac{x^3-1}{2}+1=x^3. بۆ نموونە g(2)=72g(2)=\frac72 و f ⁣(72)=8=23f\!\left(\frac72\right)=8=2^3.

Going the other way is also useful: splitting a complicated function into an inside and an outside part. h(x)=x2+9h(x)=\sqrt{x^2+9} is f(g(x))f(g(x)) with the inside g(x)=x2+9g(x)=x^2+9 and the outside f(u)=uf(u)=\sqrt u; for example h(4)=25=5h(4)=\sqrt{25}=5.

ڕێگای پێچەوانەش بەسوودە: دابەشکردنی ئاڵۆز بۆ بەشێکی ناوەوە و بەشێکی دەرەوە. h(x)=x2+9h(x)=\sqrt{x^2+9} دەکاتە f(g(x))f(g(x)) بە ناوەوەی g(x)=x2+9g(x)=x^2+9 و دەرەوەی f(u)=uf(u)=\sqrt u؛ بۆ نموونە h(4)=25=5h(4)=\sqrt{25}=5.

Quick checkپشکنینی خێراWrite h(x)=(3x−1)5h(x)=(3x-1)^5 as f(g(x))f(g(x)). Which choice works?h(x)=(3x−1)5h(x)=(3x-1)^5 وەک f(g(x))f(g(x)) بنووسە. کام هەڵبژاردن کار دەکات؟

Homework: f(x)=xf(x)=\sqrt x, g(x)=1−x2g(x)=1-x^2ئەرکی ماڵەوە: f(x)=xf(x)=\sqrt x، g(x)=1−x2g(x)=1-x^2

The notes ask for four compositions and their domains. Here Df=[0,∞)D_f=[0,\infty) and Dg=RD_g=\mathbb{R}. Try each one before you open the answer.

تێبینییەکان داوای چوار و دەکەن. لێرەدا Df=[0,∞)D_f=[0,\infty) و Dg=RD_g=\mathbb{R}. هەر یەکێکیان تاقی بکەرەوە پێش ئەوەی وەڵامەکە بکەیتەوە.

Exerciseڕاهێنان1. f∘g1.\ f\circ g1. f∘g1.\ f\circ g

Find (f∘g)(x)(f\circ g)(x) and its domain.

(f∘g)(x)(f\circ g)(x) و بدۆزەرەوە.

Show answerوەڵامەکە پیشان بدە
(f∘g)(x)=1−x2,D(f∘g)=[−1,1](f\circ g)(x)=\sqrt{1-x^2},\qquad D(f\circ g)=[-1,1]

Check 2 needs 1−x2≥01-x^2\ge0, so −1≤x≤1-1\le x\le1. This is the composition of the animation above; its graph is the upper half of the circle of radius 1.

پشکنینی 2 پێویستی بە 1−x2≥01-x^2\ge0 هەیە، بۆیە −1≤x≤1-1\le x\le1. ئەمە هەمان نموونەی جووڵەپێدانەکەی سەرەوەیە؛ هێڵکارییەکەی نیوەی سەرەوەی بازنەیەکە بە نیوەتیرەی 1.

Exerciseڕاهێنان2. g∘f2.\ g\circ f2. g∘f2.\ g\circ f

Find (g∘f)(x)(g\circ f)(x) and its domain.

(g∘f)(x)(g\circ f)(x) و بدۆزەرەوە.

Show answerوەڵامەکە پیشان بدە
(g∘f)(x)=1−(x)2=1−x,D(g∘f)=[0,∞)(g\circ f)(x)=1-\left(\sqrt x\right)^2=1-x,\qquad D(g\circ f)=[0,\infty)

The same trap as before: 1−x1-x looks defined everywhere, but f must accept x first, so x≥0x\ge0.

هەمان تەڵەی پێشوو: 1−x1-x وا دەردەکەوێت لە هەموو شوێنێک پێناسەکراو بێت، بەڵام f دەبێت یەکەم x وەربگرێت، بۆیە x≥0x\ge0.

Exerciseڕاهێنان3. f∘f3.\ f\circ f3. f∘f3.\ f\circ f

Find (f∘f)(x)(f\circ f)(x) and its domain.

(f∘f)(x)(f\circ f)(x) و بدۆزەرەوە.

Show answerوەڵامەکە پیشان بدە
(f∘f)(x)=x=x4=x1/4,D(f∘f)=[0,∞)(f\circ f)(x)=\sqrt{\sqrt x}=\sqrt[4]{x}=x^{1/4},\qquad D(f\circ f)=[0,\infty)

Check 1 needs x≥0x\ge0; then x≥0\sqrt x\ge0 always passes check 2.

پشکنینی 1 پێویستی بە x≥0x\ge0 هەیە؛ پاشان x≥0\sqrt x\ge0 هەمیشە لە پشکنینی 2 دەردەچێت.

Exerciseڕاهێنان4. g∘g4.\ g\circ g4. g∘g4.\ g\circ g

Find (g∘g)(x)(g\circ g)(x) and its domain.

(g∘g)(x)(g\circ g)(x) و بدۆزەرەوە.

Show answerوەڵامەکە پیشان بدە
(g∘g)(x)=1−(1−x2)2=1−(1−2x2+x4)=2x2−x4,D(g∘g)=R(g\circ g)(x)=1-\left(1-x^2\right)^2=1-\left(1-2x^2+x^4\right)=2x^2-x^4,\qquad D(g\circ g)=\mathbb{R}

g accepts every real number, so nothing is removed. Note that g∘gg\circ g is not g⋅g=(1−x2)2g\cdot g=(1-x^2)^2.

g هەموو وەردەگرێت، بۆیە هیچ شتێک لاناچێت. تێبینی بکە کە g∘gg\circ g هەمان g⋅g=(1−x2)2g\cdot g=(1-x^2)^2 نییە.

Composition in codeئاوێتەکردنی نەخشەکان لە کۆددا

Programs compose functions all the time: f(g(x)) calls g first and passes its return value to f. The domain trap shows up as an error when the inner result is not allowed in the outer function:

بەرنامەکان هەمیشە ئاوێتە دەکەن: f(g(x)) یەکەم g بانگ دەکات و دەدات بە f. تەڵەی وەک دەردەکەوێت کاتێک ئەنجامی ناوەوە لە دەرەوەدا ڕێگەپێدراو نییە:

f(g(x)) in Python⁦f(g(x))⁩ لە Pythonـداcompose.pyPYTHONType in a terminalلە تێرمیناڵدا بینووسە
import math

def g(x):
    return 1 - x**2

def f(x):
    return math.sqrt(x)

for x in [0, 0.6, -1, 2]:
    print(x, "->", g(x), "->", f(g(x)))
Explain the codeڕوونکردنەوەی کۆدەکە
Lineدێڕی 10

f(g(x)): the inner call runs first, exactly like (f∘g)(x)(f\circ g)(x).

f(g(x)): بانگکردنی ناوەوە یەکەم کار دەکات، ڕێک وەک (f∘g)(x)(f\circ g)(x).

Lineدێڕی 7

For x=2x=2, g(2) is −3-3 and math.sqrt(-3) raises ValueError: 2 is not in D(f∘g)=[−1,1]D(f\circ g)=[-1,1].

بۆ x=2x=2، g(2) دەکاتە −3-3 و math.sqrt(-3) ValueError دەدات: 2 لە D(f∘g)=[−1,1]D(f\circ g)=[-1,1]ـدا نییە.

Quick checkپشکنینی خێراWith the functions g and f above, which call raises a ValueError?بە g و fـی سەرەوە، کام بانگکردن ValueError دەدات؟

Common mistakesهەڵە باوەکان

MistakeهەڵەCorrectڕاست
Applying f first in f∘gf\circ gجێبەجێکردنی f لە پێشدا لە f∘gf\circ gThe function next to x works first: g, then f.ئەو لە تەنیشت xـەوەیە یەکەم کار دەکات: g، پاشان f.
Reading ∘\circ as multiplicationخوێندنەوەی ∘\circ وەک لێکدان(f∘g)(x)=f(g(x))(f\circ g)(x)=f(g(x)), but (f⋅g)(x)=f(x)g(x)(f\cdot g)(x)=f(x)g(x).(f∘g)(x)=f(g(x))(f\circ g)(x)=f(g(x))، بەڵام (f⋅g)(x)=f(x)g(x)(f\cdot g)(x)=f(x)g(x).
Assuming f∘g=g∘ff\circ g=g\circ fوا دانان کە f∘g=g∘ff\circ g=g\circ fCheck with a number: (x+3)2≠x2+3(x+3)^2\ne x^2+3.بە ژمارەیەک بپشکنە: (x+3)2≠x2+3(x+3)^2\ne x^2+3.
Reading the domain from the simplified formula (g∘f=xg\circ f=x)خوێندنەوەی لە فۆرمولە سادەکراوەکەوە (g∘f=xg\circ f=x)Use both checks on the original functions: [1,∞)[1,\infty).هەردوو پشکنینەکە لەسەر ڕەسەنەکان بەکاربهێنە: [1,∞)[1,\infty).
Using only DfD_f for f∘gf\circ gتەنها بەکارهێنانی DfD_f بۆ f∘gf\circ gx must be in D(g)D(g) and g(x)g(x) in DfD_f.x دەبێت لە D(g)D(g)ـدا بێت و g(x)g(x) لە DfD_fـدا.
Writing f∘f=f2f\circ f=f^2نووسینی f∘f=f2f\circ f=f^2(f∘f)(x)=f(f(x))(f\circ f)(x)=f(f(x)); for f(x)=xf(x)=\sqrt x it is x4\sqrt[4]x, not x.(f∘f)(x)=f(f(x))(f\circ f)(x)=f(f(x))؛ بۆ f(x)=xf(x)=\sqrt x دەکاتە x4\sqrt[4]x، نەک x.

Summaryکورتە

  • (f∘g)(x)=f(g(x))(f\circ g)(x)=f(g(x)): g works first, f second ("f after g").
  • D(f∘g)={x∣x∈D(g), g(x)∈Df}D(f\circ g)=\{x\mid x\in D(g),\ g(x)\in D_f\}: two checks, one per machine.
  • In general f∘g≠g∘ff\circ g\ne g\circ f, and ∘\circ is not multiplication.
  • Find the domain before simplifying: (x−1)2+1=x(\sqrt{x-1})^2+1=x only for x≥1x\ge1.
  • To find an inside function, undo the outside function step by step: 2g+1=x3⇒g=x3−122g+1=x^3\Rightarrow g=\frac{x^3-1}{2}.
  • (f∘g)(x)=f(g(x))(f\circ g)(x)=f(g(x)): g یەکەم کار دەکات، f دووەم («f لە دوای g»).
  • D(f∘g)={x∣x∈D(g), g(x)∈Df}D(f\circ g)=\{x\mid x\in D(g),\ g(x)\in D_f\}: دوو پشکنین، بۆ هەر ئامێرێک یەکێک.
  • بە گشتی f∘g≠g∘ff\circ g\ne g\circ f و ∘\circ لێکدان نییە.
  • پێش سادەکردن بدۆزەرەوە: (x−1)2+1=x(\sqrt{x-1})^2+1=x تەنها بۆ x≥1x\ge1.
  • بۆ دۆزینەوەی ، هەنگاو بە هەنگاو هەڵبوەشێنەوە: 2g+1=x3⇒g=x3−122g+1=x^3\Rightarrow g=\frac{x^3-1}{2}.
Review questionsپرسیارەکانی پێداچوونەوە
f(x)=x+1f(x)=x+1, g(x)=2xg(x)=2x: is (f∘g)(3)(f\circ g)(3) equal to (g∘f)(3)(g\circ f)(3)?f(x)=x+1f(x)=x+1، g(x)=2xg(x)=2x: ئایا (f∘g)(3)(f\circ g)(3) یەکسانە بە (g∘f)(3)(g\circ f)(3)؟

No: f(6)=7f(6)=7 but g(4)=8g(4)=8.

نەخێر: f(6)=7f(6)=7 بەڵام g(4)=8g(4)=8.

What is D(f∘g)D(f\circ g) for f(x)=1xf(x)=\frac1x and g(x)=x−2g(x)=x-2?بۆ f(x)=1xf(x)=\frac1x و g(x)=x−2g(x)=x-2، D(f∘g)D(f\circ g) چییە؟

All real x except 2, because g(2)=0g(2)=0 is not in DfD_f.

هەموو xێکی ڕاستی جگە لە 2، چونکە g(2)=0g(2)=0 لە DfD_fـدا نییە.

The course so far and what comes nextکۆرسەکە تا ئێرە و هەنگاوی داهاتوو

This is the last lesson on functions. Here is what chapters 1–5 built, and where the course goes next:

ئەمە دوایین وانەیە دەربارەی . ئەمە ئەوەیە کە بەشەکانی ⁦1–5⁩ بنیاتیان نا، هەروەها کۆرسەکە دواتر بەرەو کوێ دەچێت:

Course map. Six boxes on the left, one per chapter: 1 Sets and Numbers (ℕ ⊂ ℤ ⊂ ℚ ⊂ ℝ), 2 Inequalities and Absolute Value (|x − 3| < 2), 3 Functions and Their Graphs (f : X → Y), 4 Trigonometric, Exponential and Logarithmic (sin x, e to the x, ln x), 5 Transforming and Combining Functions (f(g(x))), marked 'you are here', and 6 Matrices and Determinants (AB, det A, A⁻¹), marked 'next in this course'. An arrow points right to two dashed boxes under the title 'Later in calculus': Limits, then Derivatives.نەخشەی کۆرسەکە. شەش چوارگۆشە لە لای چەپ، بۆ هەر بەشێک یەکێک: 1 کۆمەڵەکان و ژمارەکان (ℕ ⊂ ℤ ⊂ ℚ ⊂ ℝ)، 2 لاسەنگەکان و نرخی ڕووت (|x − 3| < 2)، 3 نەخشەکان و هێڵکارییەکانیان (f : X → Y)، 4 نەخشە سێگۆشەییەکان، نەخشە توانییەکان و لۆگاریتمەکان (sin x، e بە توانی x، ln x)، 5 گۆڕانکارییەکان و تێکەڵکردنی نەخشەکان (f(g(x)))، کە «تۆ لێرەیت»ی لەسەرە، هەروەها 6 ماتریکسەکان و دیتەرمینانتەکان (AB، det A، A⁻¹)، کە «دواتر لەم کۆرسەدا»ی لەسەرە. تیرێک بەرەو ڕاست بۆ دوو چوارگۆشەی پچڕپچڕ دەچێت لە ژێر ناونیشانی «دواتر لە کالکولەسدا»: ئامانجەکان، پاشان مشتەقەکان.
Six chapters in this course; limits and derivatives come later in calculus.شەش بەش لەم کۆرسەدا؛ و دواتر لە کالکولەسدا دێن.CêIT

What comes next. The next chapter, Matrices and determinants, opens a new tool: tables of numbers that store data, move points in and solve many equations at once. Later in calculus, the next ideas are (what value f(x)f(x) approaches as x gets close to a number) and (how fast a function changes). Both are built from exactly what chapters 1–5 taught: intervals and absolute value to say "close to", domains to know where a function lives, and composition, exponentials and logarithms as the functions you will study.

هەنگاوی داهاتوو. بەشی داهاتوو، ماتریکسەکان و دیتەرمینانتەکان، ئامرازێکی نوێ دەکاتەوە: خشتەی ژمارە کە هەڵدەگرن، خاڵەکان لە دەجووڵێنن و چەندین پێکەوە شیکار دەکەن. دواتر لە کالکولەسدا بیرۆکەکانی دواتر ن (f(x)f(x) لە چ بەهایەک نزیک دەبێتەوە کاتێک x لە ژمارەیەک نزیک دەبێتەوە) و ( بە چ خێراییەک دەگۆڕێت). هەردووکیان ڕێک لەوە بنیات دەنرێن کە بەشەکانی ⁦1–5⁩ فێری کردیت: و بۆ گوتنی «نزیک لە»، بۆ زانینی ئەوەی لە کوێ دەژی، هەروەها ، و ، کە دواتر وەک نموونە لێیان دەکۆڵیتەوە.

Videoڤیدیۆ

Watch a videoسەیری ڤیدیۆیەک بکە

A video that viewers liked a lot and praised in their comments, chosen for this lesson.ڤیدیۆیەک کە بینەران زۆریان پێ خۆش بووە و لە کۆمێنتەکانیاندا ستایشیان کردووە، بۆ ئەم وانەیە هەڵبژێردراوە.

How to do Composition of FunctionsMario's Math Tutoring · Englishئینگلیزی · 83K viewsبینین · 1.4K likesلایک

What f(g(x)) means: put g's output into f. Numerical and algebraic examples, with both notations f(g(x)) and (f∘g)(x).

f(g(x))f(g(x)) واتای چییە: g بخەرە ناو f. نموونەی ژمارەیی و جەبری، بە هەردوو نووسینی f(g(x))f(g(x)) و (f∘g)(x)(f\circ g)(x).

Chapters: 0:00 introduction, 0:43 and 2:00 numerical examples, 2:42 and 4:25 algebraic composition.

بەشەکان: ⁦0:00⁩ پێشەکی، ⁦0:43⁩ و ⁦2:00⁩ نموونەی ژمارەیی، ⁦2:42⁩ و ⁦4:25⁩ بە .

Lesson complete!وانەکە تەواو بوو!

Well done. Review the key terms, then go on to the next lesson.دەستخۆش. سەیرێکی زاراوە سەرەکییەکان بکەرەوە، پاشان بڕۆ بۆ وانەی داهاتوو.

Key termsزاراوە سەرەکییەکان

Next lessonوانەی داهاتوو

Matrix Notation and Special Matricesنووسینی ماتریکس و جۆرە تایبەتەکانی

References and further readingسەرچاوەکان و خوێندنەوەی زیاتر

This lecture is a first edition. The Kurdish text and terminology are waiting for review by Kurdish IT teachers.ئەم وانەیە چاپی یەکەمە. دەقە کوردییەکە و زاراوەکانی چاوەڕێی پێداچوونەوەی مامۆستایانی کوردی بواری IT ن.