2.5 · SLPaper 1Paper 2

Composite and inverse functions

In a minute

A feeds the output of one function into another: (f∘g)(x)=f(g(x))(f \circ g)(x) = f(g(x)). An undoes a function, so composing the two gives back xx. You'll find inverses by rearranging, and see why only functions have them.

You'll be able to

  • Form and evaluate a such as (f∘g)(x)(f \circ g)(x), applying the functions in the right order.
  • Use the and (f∘f−1)(x)=(f−1∘f)(x)=x(f \circ f^{-1})(x) = (f^{-1} \circ f)(x) = x to check an inverse or find one of its values.
  • Find f−1(x)f^{-1}(x) by rearranging, and state its domain.
  • Explain why only a function has an inverse, and sketch y=f−1(x)y = f^{-1}(x) as a reflection in y=xy = x.
Before you start2 quick questions on what this builds on
Check yourself
Let f(x)=x2−3xf(x) = x^{2} - 3x. Find f(−2)f(-2).
Check yourself
Let f(x)=x2+5f(x) = x^{2} + 5, for x∈Rx \in \mathbb{R}. What is the range of ff?

Revise first: 2.2 Function concepts, domain and range

Composite functions

Think of a function as a machine: a number goes in, a number comes out. Feed xx into gg, then feed its output, g(x)g(x), into ff. What comes out is f(g(x))f(g(x)), and the two machines together make a .

Learn this
(f∘g)(x)=f(g(x))(f \circ g)(x) = f(g(x))

Read f∘gf \circ g as "ff of gg". The function next to xx acts first, so gg goes first even though ff is written first.

Worked exampleLet f(x)=x+5f(x) = \sqrt{x + 5}, for x≥−5x \ge -5, and g(x)=3x−2g(x) = 3x - 2, for x∈Rx \in \mathbb{R}. Find (f∘g)(2)(f \circ g)(2).

Try it first, then reveal one step at a time.

  1. (f∘g)(2)=f(g(2))(f \circ g)(2) = f(g(2)), so start with the inside function.
Check yourself
Let f(x)=x3f(x) = x^{3} and g(x)=x−2g(x) = x - 2, for x∈Rx \in \mathbb{R}. Find (f∘g)(x)(f \circ g)(x).
Worked exampleLet f(x)=x2−4xf(x) = x^{2} - 4x and g(x)=2x+1g(x) = 2x + 1, for x∈Rx \in \mathbb{R}. Solve (f∘g)(x)=5(f \circ g)(x) = 5.

Try it first, then reveal one step at a time.

  1. Form the composite first: (f∘g)(x)=f(2x+1)=(2x+1)2−4(2x+1)(f \circ g)(x) = f(2x + 1) = (2x + 1)^{2} - 4(2x + 1).
Check yourself
Let f(x)=2x2−1f(x) = 2x^{2} - 1 and g(x)=3−xg(x) = 3 - x, for x∈Rx \in \mathbb{R}. Find (g∘f)(−2)(g \circ f)(-2).

On Paper 2 a composite may give an equation you can't solve by hand. Write it down, then let your GDC solve it.

Worked exampleLet f(x)=exf(x) = \mathrm{e}^{x} and g(x)=x2−2g(x) = x^{2} - 2, for x∈Rx \in \mathbb{R}. Use your calculator to solve (f∘g)(x)=(g∘f)(x)(f \circ g)(x) = (g \circ f)(x). Give your answers to 3 s.f.

Try it first, then reveal one step at a time.

  1. Form each composite: (f∘g)(x)=ex2−2(f \circ g)(x) = \mathrm{e}^{x^{2} - 2} and (g∘f)(x)=(ex)2−2=e2x−2(g \circ f)(x) = (\mathrm{e}^{x})^{2} - 2 = \mathrm{e}^{2x} - 2.

The identity function

In 2.2 you met the f−1f^{-1}. It undoes ff: if ff sends 33 to 1010, then f−1f^{-1} sends 1010 back to 33.

So doing ff and then f−1f^{-1} leaves every number unchanged. A function that changes nothing has a name.

Learn this
(f∘f−1)(x)=(f−1∘f)(x)=x(f \circ f^{-1})(x) = (f^{-1} \circ f)(x) = x

The first holds for every xx in the domain of f−1f^{-1}, and the second for every xx in the domain of ff.

Use this to check that two functions are inverses, or to find a value of f−1f^{-1} without its formula.

Worked exampleLet f(x)=5x−2f(x) = 5x - 2 and g(x)=x+25g(x) = \frac{x + 2}{5}, for x∈Rx \in \mathbb{R}. Show that gg is the inverse of ff.

Try it first, then reveal one step at a time.

  1. Compose them one way: (f∘g)(x)=f(x+25)=5⋅x+25−2(f \circ g)(x) = f\left(\frac{x + 2}{5}\right) = 5 \cdot \frac{x + 2}{5} - 2.
Worked exampleLet f(x)=x3+2x−5f(x) = x^{3} + 2x - 5, for x∈Rx \in \mathbb{R}. As xx increases, x3x^{3} and 2x2x both increase, so ff has an inverse. Find f−1(7)f^{-1}(7).

Try it first, then reveal one step at a time.

  1. A formula for f−1(x)f^{-1}(x) is too hard here. Let a=f−1(7)a = f^{-1}(7) and apply ff to both sides: f(a)=f(f−1(7))=7f(a) = f(f^{-1}(7)) = 7.
Check yourself
The function ff has an inverse, and f(3)=10f(3) = 10. Write down f−1(10)f^{-1}(10).
Check yourself
Let f(x)=x+1x−3f(x) = \frac{x + 1}{x - 3}, for x≠3x \ne 3. The domain of f−1f^{-1} includes 1212. Without finding f−1(x)f^{-1}(x), write down (f∘f−1)(12)(f \circ f^{-1})(12).

Finding the inverse

ff takes xx to yy. Its inverse takes yy back to xx. So to find f−1f^{-1}, make xx the subject of y=f(x)y = f(x).

1. Write y=f(x)y = f(x).

2. Rearrange to make xx the subject.

3. Swap the letters xx and yy, and write the result as f−1(x)=…f^{-1}(x) = \ldots.

4. Check: the of f−1f^{-1} is the of ff. Test one value to be sure.

You may also swap xx and yy first, then rearrange. Either way, end with f−1(x)f^{-1}(x) in terms of xx.

Worked exampleLet f(x)=7−2xf(x) = 7 - 2x, for x∈Rx \in \mathbb{R}. Find f−1(x)f^{-1}(x).

Try it first, then reveal one step at a time.

  1. Write y=7−2xy = 7 - 2x.
Check yourself
Let f(x)=x4−3f(x) = \frac{x}{4} - 3, for x∈Rx \in \mathbb{R}. Find f−1(x)f^{-1}(x).
Worked exampleLet f(x)=2x+1x−3f(x) = \frac{2x + 1}{x - 3}, for x≠3x \ne 3. Find f−1(x)f^{-1}(x) and state the domain of f−1f^{-1}.

Try it first, then reveal one step at a time.

  1. Write y=2x+1x−3y = \frac{2x + 1}{x - 3} and multiply both sides by x−3x - 3: y(x−3)=2x+1y(x - 3) = 2x + 1.
Worked exampleLet f(x)=(x−2)2+1f(x) = (x - 2)^{2} + 1, for x≥2x \ge 2. Find f−1(x)f^{-1}(x) and state its domain.

Try it first, then reveal one step at a time.

  1. Find the range of ff first. For x≥2x \ge 2, (x−2)2(x - 2)^{2} takes every value ≥0\ge 0, so f(x)≥1f(x) \ge 1. So the domain of f−1f^{-1} is x≥1x \ge 1.
Check yourself
Let f(x)=5−x2f(x) = 5 - x^{2}, for x≥0x \ge 0. State the domain of f−1f^{-1}.

When an inverse exists, and its graph

An sends each output back to the input it came from. But x↦x2x \mapsto x^{2}, for x∈Rx \in \mathbb{R}, sends both 33 and −3-3 to 99. Undoing 99 has no single answer, so this function has no inverse.

Test this on a graph with horizontal lines. If any horizontal line meets the graph twice, two inputs share an output, so the function is not one-to-one.

Two graphs with a horizontal line drawn across each. The line meets y equals x squared twice, and meets y equals half x cubed once. y x y x two crossings: not one-to-one one crossing: one-to-one y = x² y = ½x³
A horizontal line meets y=x2y = x^{2} twice but meets y=12x3y = \tfrac{1}{2}x^{3} only once.
Worked exampleLet f(x)=x2−6xf(x) = x^{2} - 6x, for x∈Rx \in \mathbb{R}. Show that ff does not have an inverse.

Try it first, then reveal one step at a time.

  1. Find two different inputs with the same output. The parabola is symmetric about x=3x = 3, so try 11 and 55.
Check yourself
Each function below has domain x∈Rx \in \mathbb{R}. Which one has an inverse?

Now the graph of f−1f^{-1}. If f(a)=bf(a) = b, the point (a,b)(a, b) is on y=f(x)y = f(x). Then f−1(b)=af^{-1}(b) = a, so the point (b,a)(b, a) is on y=f−1(x)y = f^{-1}(x).

Drag the point along y=2xy = 2^{x}. Its mirror image lands on y=log⁡2xy = \log_{2} x, the inverse of 2x2^{x}. The coordinates of the two points are always swapped.

Inverse functions as a reflectionDrag the point or the sliders
−3−2−11234567−3−2−11234567y = aˣy = logₐxy = x (mirror)
2.00
1.0

P = (1.00, 2.00) on y = aˣ

Q = (2.00, 1.00) on y = logₐx

logₐ(2.00) = 1.00

a must be positive and not 1 (now 2).

Swapping x and y reflects the graph in the line y = x, so y = aˣ and y = logₐx are mirror images.
Worked exampleLet f(x)=12x3+4f(x) = \frac{1}{2}x^{3} + 4, for x∈Rx \in \mathbb{R}. Find the coordinates of the point where the graph of y=f−1(x)y = f^{-1}(x) crosses the xx-axis.

Try it first, then reveal one step at a time.

  1. You need the point (c,0)(c, 0) on y=f−1(x)y = f^{-1}(x). Swapping coordinates, (0,c)(0, c) is on y=f(x)y = f(x): where y=f(x)y = f(x) crosses the yy-axis.
Check yourself
The point (5,−2)(5, -2) lies on the graph of y=f(x)y = f(x), where ff is one-to-one. Which point must lie on the graph of y=f−1(x)y = f^{-1}(x)?

Common mistakes

  • Composing in the wrong order. In (f∘g)(x)(f \circ g)(x) the function next to xx acts first, so substitute g(x)g(x) into ff.
  • Treating f−1(x)f^{-1}(x) as 1f(x)\frac{1}{f(x)}. The inverse undoes ff. Find it by making xx the subject of y=f(x)y = f(x).
  • Rearranging for xx but never swapping the letters. Finish with f−1(x)=…f^{-1}(x) = \ldots written in terms of xx.
  • Saying f−1f^{-1} works for every real xx because its formula does, or copying the domain of ff. The domain of f−1f^{-1} is the range of ff.
  • Describing the graph of f−1f^{-1} as "a reflection" without the mirror line. Say "a reflection in the line y=xy = x".

Exam tips

  • "Find (f∘g)(x)(f \circ g)(x)": show the substitution line, such as f(g(x))=f(2x+1)f(g(x)) = f(2x + 1), then simplify.
  • "State the domain of f−1f^{-1}" needs no working: give the range of ff as an inequality in xx, such as x≥1x \ge 1.
  • On Paper 2, write down the equation you solve before giving the GDC's values, and round to 3 s.f. only at the end.

Key takeaways

Learn this(f∘g)(x)=f(g(x))(f \circ g)(x) = f(g(x))
Learn this(f∘f−1)(x)=(f−1∘f)(x)=x(f \circ f^{-1})(x) = (f^{-1} \circ f)(x) = x
Learn thisIn (f∘g)(x)(f \circ g)(x), the function next to xx acts first: do gg, then ff.
Learn thisTo find f−1(x)f^{-1}(x): write y=f(x)y = f(x), make xx the subject, then swap xx and yy.
Learn thisThe domain of f−1f^{-1} is the range of ff. f−1(x)f^{-1}(x) is not 1f(x)\frac{1}{f(x)}.
Learn thisA function has an inverse only if it is one-to-one: no horizontal line meets its graph twice.
Learn thisThe graph of y=f−1(x)y = f^{-1}(x) is the reflection of y=f(x)y = f(x) in the line y=xy = x.

Practise this

14 past-paper questions on 2.5 in the AA HL bank, each with a mark scheme and a worked explanation.

Practise 2.5 →