For f(x)=2x+1 and g(x)=x2, find (f∘g)(x) and (g∘f)(x), and evaluate both at x=3.
f(x)=2x+1,g(x)=x2
1
Find f(g(x))
Put g(x)=x2 into f.f doubles its input and adds 1, so x2 becomes 2x2+1.
f(g(x))=2x2+1
2
Find g(f(x))
Put f(x)=2x+1 into g.g squares its input, so the whole of 2x+1 is squared.
g(f(x))=(2x+1)2=4x2+4x+1
g(f(x))=(2x+1)2=4x2+4x+1
3
Evaluate at 3
Work from the inside out. g(3)=9, and then f(9)=19. In the other order, f(3)=7, then g(7)=49.
f(x)=2x+1g(x)=x2g(3)=9f(9)=19f(3)=7g(7)=49
4
Compare the orders
19 and 49 differ, so the two composites are different functions. Composition is not commutative.
Result
(f∘g)(x)=2x2+1 and (g∘f)(x)=(2x+1)2=4x2+4x+1. At x=3 they give 19and 49.
Your turn
1. One like the example
For f(x)=x+4 and g(x)=3x2, find f(g(x)) and g(f(x)), and evaluate both at x=1.
Show the answer and explanation
f(g(x))=3x2+4 and g(f(x))=3(x+4)2. At x=1 they give 7and 75.
f adds 4 to whatever it receives, so f(g(x))=3x2+4.g triples the square of what it receives, so g(f(x))=3(x+4)2. Inside first at x=1,g(1)=3 and f(3)=7. In the other order, f(1)=5 and g(5)=75.
For f(x)=√x and g(x)=x−4, find f(g(x)) and g(f(x)) with their domains.
Show the answer and explanation
f(g(x))=√x−4 for x≥4, and g(f(x))=√x−4 for x≥0.
In f(g(x)),g subtracts 4 first and the root comes last, so the root needs x−4≥0. In g(f(x)), the root comes first and needs only x≥0, and subtracting 4 afterward is always allowed.
f(x)=√xg(x)=x−4f(g(x))=√x−4g(f(x))=√x−4
3. Somewhere new
A ripple’s radius is r(t)=2tcm after t seconds, and a circle of radius r has area A(r)=πr2. Write the area as a function of time, and find it at t=3.
Show the answer and explanation
A(r(t))=4πt2cm2, which is 36π≈113.1 cm2 at t=3.
The time goes in first and gives the radius, then the radius gives the area, so the composition is A(r(t))=π(2t)2=4πt2. At t=3 the radius is 6 cm and the area is 36π≈113.1 cm2.
r(t)=2tA(r)=πr2A(r(t))=4πt2
Keep exploring
In Graph, plot 2x2+1 and (2x+1)2. The curves cross only where 2x2+1=(2x+1)2, at x=0 and x=−2, so the two composites agree at only those inputs.