In General Maths you met function notation and the inverse of a function (see algebraic expressions↺ ): f ( 3 ) f(3) f ( 3 ) means “put 3 in place of every x x x ”, and f − 1 f^{-1} f − 1 undoes f f f . Further Maths joins functions together. This lesson shows how to put one function inside another, then how inverses fit in.
WAEC often writes a function with an arrow: f : x → 2 x + 1 f: x \to 2x + 1 f : x → 2 x + 1 means the same as f ( x ) = 2 x + 1 f(x) = 2x + 1 f ( x ) = 2 x + 1 .
Values and unknowns
Two facts carry over from General Maths:
Put the input in everywhere. f ( x + 2 ) f(x + 2) f ( x + 2 ) means replace every x x x by ( x + 2 ) (x + 2) ( x + 2 ) , in brackets.
Given values give equations. If f ( 1 ) = 3 f(1) = 3 f ( 1 ) = 3 , substitute x = 1 x = 1 x = 1 and set the result equal to 3. Two unknowns need two values, solved simultaneously (see polynomials↺ ).
More: values and unknowns
Composite functions: one inside another
f ∘ g f \circ g f ∘ g , also written f g fg f g , means do g g g first, then f f f :
f ∘ g ( x ) = f ( g ( x ) ) f \circ g(x) = f\big(g(x)\big) f ∘ g ( x ) = f ( g ( x ) )
Read it from the inside out: the function nearest to x x x acts first. The order matters, because doing the same two steps the other way round usually gives a different answer:
f∘g(x) = f(g(x)): g first 2 g: + 1 3 f: x² 9 g∘f(x) = g(f(x)): f first 2 f: x² 4 g: + 1 5 Order matters f∘g: g first. g∘f: f first
To find f ∘ g ( x ) f \circ g(x) f ∘ g ( x ) as an expression, write out g ( x ) g(x) g ( x ) , then put the whole of it, in brackets, in place of every x x x in f f f .
For example, with f ( x ) = 2 x + 1 {f(x) = 2x + 1} f ( x ) = 2 x + 1 and g ( x ) = x 2 {g(x) = x^2} g ( x ) = x 2 :
f ∘ g ( x ) = f ( x 2 ) f \circ g(x) = f(x^2) f ∘ g ( x ) = f ( x 2 ) . Replace x x x in f f f by x 2 x^2 x 2 : 2 x 2 + 1 {2x^2 + 1} 2 x 2 + 1 .
g ∘ f ( x ) = g ( 2 x + 1 ) g \circ f(x) = g(2x + 1) g ∘ f ( x ) = g ( 2 x + 1 ) . Replace x x x in g g g by 2 x + 1 2x + 1 2 x + 1 : ( 2 x + 1 ) 2 = 4 x 2 + 4 x + 1 {(2x + 1)^2 = 4x^2 + 4x + 1} ( 2 x + 1 ) 2 = 4 x 2 + 4 x + 1 .
Run both orders on the same input:
Which machine first? Pick a pair, slide x
f∘g: g first, with f(x) = 2x + 1 and g(x) = x²
2 → g → 4 → f → 9
g∘f: f first
2 → f → 5 → g → 25
9 f∘g(x) = 2x² + 1 25 g∘f(x) = (2x + 1)² = 4x² + 4x + 1
f = 2x + 1, g = x² f = x − 4, g = 3x f = 3x − 2, g = (x + 2) ÷ 3 x = 2
f∘g means do g first, then f. Doing them the other way round gives 25, not 9: the order matters.
Worked example · WAEC 2011
WAEC 2011 · Paper 2 · Q9 (b)
Given that f : x → x 2 + 1 f: x \to x^2 + 1 f : x → x 2 + 1 and g : x → 3 x + 1 x − 1 g: x \to \dfrac{3x + 1}{x - 1} g : x → x − 1 3 x + 1 , x ≠ 1 x \ne 1 x = 1 , find: (i) g ∘ f g\circ f g ∘ f ; (ii) g ∘ f ( 2 ) g\circ f(2) g ∘ f ( 2 ) .
Which function first?
g ∘ f g \circ f g ∘ f means f f f first, then g g g .
So g ∘ f ( x ) = g ( f ( x ) ) = g ( x 2 + 1 ) {g \circ f(x) = g(f(x)) = g(x^2 + 1)} g ∘ f ( x ) = g ( f ( x )) = g ( x 2 + 1 ) .
Think first. In g∘f, which acts first?
Put f(x) into g
The top: 3 ( x 2 + 1 ) + 1 = 3 x 2 + 4 {3(x^2 + 1) + 1 = 3x^2 + 4} 3 ( x 2 + 1 ) + 1 = 3 x 2 + 4 .
The bottom: ( x 2 + 1 ) − 1 = x 2 {(x^2 + 1) - 1 = x^2} ( x 2 + 1 ) − 1 = x 2 .
So g ∘ f ( x ) = 3 x 2 + 4 x 2 {g \circ f(x) = \frac{3x^2 + 4}{x^2}} g ∘ f ( x ) = x 2 3 x 2 + 4 .
Divide each term by x 2 x^2 x 2 : g ∘ f ( x ) = 3 + 4 x 2 {g \circ f(x) = 3 + \frac{4}{x^2}} g ∘ f ( x ) = 3 + x 2 4 .
Think first. Replace every x in (3x + 1)/(x − 1) by x² + 1.
The value at 2
g ∘ f ( 2 ) = 3 + 4 4 = 4 {g \circ f(2) = 3 + \frac44 = 4} g ∘ f ( 2 ) = 3 + 4 4 = 4 .
Check the long way: f ( 2 ) = 5 {f(2) = 5} f ( 2 ) = 5 , then g ( 5 ) = 16 4 = 4 {g(5) = \frac{16}{4} = 4} g ( 5 ) = 4 16 = 4 ✓.
Think first. Put x = 2 into 3 + 4/x².
← Back Next step → Show all steps Start again
More: composite functions
Inverse functions
The inverse f − 1 f^{-1} f − 1 undoes f f f : if f f f takes 3 to 4, then f − 1 f^{-1} f − 1 takes 4 back to 3. To find it:
write y = f ( x ) y = f(x) y = f ( x ) ;
make x x x the subject;
swap the letter: write the result with x x x in place of y y y .
On a graph, swapping x x x and y y y reflects the curve in the line y = x y = x y = x :
(3, 4) (4, 3) y = x f f⁻¹ f and f⁻¹ Reflections in y = x: (3, 4) on f, (4, 3) on f⁻¹
For example, for f ( x ) = 2 x − 2 f(x) = 2x - 2 f ( x ) = 2 x − 2 :
Write y = 2 x − 2 {y = 2x - 2} y = 2 x − 2 .
Add 2 to both sides: y + 2 = 2 x {y + 2 = 2x} y + 2 = 2 x .
Divide by 2: x = y + 2 2 {x = \frac{y + 2}{2}} x = 2 y + 2 .
So f − 1 ( x ) = x + 2 2 {f^{-1}(x) = \frac{x + 2}{2}} f − 1 ( x ) = 2 x + 2 . Check: f ( 3 ) = 4 f(3) = 4 f ( 3 ) = 4 and f − 1 ( 4 ) = 3 f^{-1}(4) = 3 f − 1 ( 4 ) = 3 ✓.
Inverses inside composites
Questions such as “find g − 1 ∘ f g^{-1} \circ f g − 1 ∘ f ” combine both ideas. Find the inverse first, on its own line. Then compose as usual: the function nearest to x x x acts first.
Worked example · WAEC 2011
WAEC 2011 · Paper 2 · Q10 (b)
Two functions f f f and g g g are defined by f : x → 1 2 x + 1 f: x \to \frac12x + 1 f : x → 2 1 x + 1 and g : x → 5 x − 1 3 g: x \to \frac{5x - 1}{3} g : x → 3 5 x − 1 . Find: (i) g − 1 g^{-1} g − 1 ; (ii) g − 1 ∘ f g^{-1}\circ f g − 1 ∘ f .
The inverse of g
Write y = 5 x − 1 3 {y = \frac{5x - 1}{3}} y = 3 5 x − 1 .
Multiply by 3: 3 y = 5 x − 1 {3y = 5x - 1} 3 y = 5 x − 1 .
Add 1: 3 y + 1 = 5 x {3y + 1 = 5x} 3 y + 1 = 5 x .
Divide by 5: x = 3 y + 1 5 {x = \frac{3y + 1}{5}} x = 5 3 y + 1 , so g − 1 ( x ) = 3 x + 1 5 {g^{-1}(x) = \frac{3x + 1}{5}} g − 1 ( x ) = 5 3 x + 1 .
Think first. Write y = (5x − 1)/3 and make x the subject.
Compose
f f f acts first: g − 1 ∘ f ( x ) = g − 1 ( 1 2 x + 1 ) {g^{-1} \circ f(x) = g^{-1}\left(\frac12x + 1\right)} g − 1 ∘ f ( x ) = g − 1 ( 2 1 x + 1 ) .
Replace x x x in g − 1 g^{-1} g − 1 : 3 ( 1 2 x + 1 ) + 1 5 {\frac{3\left(\frac12x + 1\right) + 1}{5}} 5 3 ( 2 1 x + 1 ) + 1 .
Multiply out the top: 3 2 x + 4 5 {\frac{\frac32x + 4}{5}} 5 2 3 x + 4 .
Multiply top and bottom by 2: g − 1 ∘ f ( x ) = 3 x + 8 10 {g^{-1} \circ f(x) = \frac{3x + 8}{10}} g − 1 ∘ f ( x ) = 10 3 x + 8 .
Think first. g⁻¹∘f: which acts first?
← Back Next step → Show all steps Start again
Common mistake
Two slips to watch for:
Composing in the wrong order: in f ∘ g f \circ g f ∘ g , g g g acts first.
Confusing f − 1 ( x ) f^{-1}(x) f − 1 ( x ) with 1 f ( x ) \frac{1}{f(x)} f ( x ) 1 . The − 1 -1 − 1 means “undo”, not “one over”.
More: inverses inside composites
Your turn
(a) If f ( x ) = 4 − 5 x 2 f(x) = \dfrac{4 - 5x}{2} f ( x ) = 2 4 − 5 x and g ( x ) = x + 6 g(x) = x + 6 g ( x ) = x + 6 , x ∈ R x \in \mathbb R x ∈ R , find f ∘ g − 1 f \circ g^{-1} f ∘ g − 1 .
Worked solution (try it first) (a) Find
g − 1 g^{-1} g − 1 first:
y = x + 6 y = x + 6 y = x + 6 gives
x = y − 6 x = y - 6 x = y − 6 , so
g − 1 ( x ) = x − 6 g^{-1}(x) = x - 6 g − 1 ( x ) = x − 6 .
g − 1 g^{-1} g − 1 acts first:
f ∘ g − 1 ( x ) = f ( x − 6 ) f \circ g^{-1}(x) = f(x - 6) f ∘ g − 1 ( x ) = f ( x − 6 ) = 4 − 5 ( x − 6 ) 2 = \dfrac{4 - 5(x - 6)}{2} = 2 4 − 5 ( x − 6 ) .
Multiply out the top:
4 − 5 x + 30 = 34 − 5 x 4 - 5x + 30 = 34 - 5x 4 − 5 x + 30 = 34 − 5 x .
Divide each term by 2:
f ∘ g − 1 ( x ) = 17 − 5 2 x f \circ g^{-1}(x) = 17 - \frac52x f ∘ g − 1 ( x ) = 17 − 2 5 x .
Watch out
In (a), g − 1 g^{-1} g − 1 acts first in f ∘ g − 1 f \circ g^{-1} f ∘ g − 1 ; put x − 6 x - 6 x − 6 , in brackets, into f f f . In (b), the 5 multiplies the far end B B B and the 4 the near end A A A : P P P is 5 9 \frac59 9 5 of the way from A A A . Report a problem with this question