Pure Mathematics Year 2, chapter 2 (Functions and graphs), section 2.3
Composite functions
fg(x) means do g first, then f. It is f(g(x)).
Let f(x)=2x+1 and g(x)=x2.
fg(x)=f(x2)=2x2+1gf(x)=g(2x+1)=(2x+1)2
Usually fg=gf. Also f2(x) means ff(x): f2(x)=2(2x+1)+1=4x+3.
Domain and range
The domain of fg is the set of x in the domain of g for which g(x) is in the domain of f.
Worked example 1: a domain restriction
f(x)=x and g(x)=x−4. Then fg(x)=x−4, which needs x≥4, so the domain of fg is x≥4.
Worked example 2: solving
f(x)=x+3 and g(x)=x2. Solve fg(x)=gf(x).
x2+3=(x+3)2⇒x2+3=x2+6x+9⇒x=−1
Worked example 3: finding a function
If f(x)=3x−2 and fg(x)=6x+7, then 3g(x)−2=6x+7, so g(x)=2x+3.
Range of a composite
Find the range of g, then use it as the domain of f. If g(x)=x2 and f(x)=x−1, then g has range g≥0, so fg(x)=x2−1≥−1.
Common mistake: doing the functions in the wrong order. fg(x) means apply gfirst. A quick check is to test with a number: f(x)=x+1, g(x)=2x, x=3 gives g(3)=6 then f(6)=7.
Exam tip: write out the substitution: fg(x)=f(g(x))=f(x2)=…. State the domain restriction when a root or a fraction is involved.