AA SL · Functions and their graphs · course

Composite and inverse functions.

AA SL resourcesPDF

Two machines in a row make a composite function: the output of the first is the input of the second. An inverse function is the machine that runs backwards, and its graph is the mirror image of the first in the line $y=x$.

IComposite functionsSL 2.5 · $(f\circ g)(x)=f\big(g(x)\big)$, its domain

I.1 A composite at a number

Definition 1

composite function

$(f\circ g)(x)=f\big(g(x)\big)$: apply $g$ first, then $f$ to the result. It is defined for the $x$ of the domain of $g$ for which $g(x)$ is in the domain of $f$.
Example 1

Let $f(x)=x^{2}$ and $g(x)=x+3$. Find $(f\circ g)(1)$ and $(g\circ f)(1)$.

What you do
What you write
Step 1 Inside first: $g(1)$
$g(1)=4$
Step 2 Then $f$ of it
$(f\circ g)(1)=f(4)=16$
Step 3 Other order: $f(1)$, then $g$Two different answers: the order matters.
$(g\circ f)(1)=g(1)=4$
Figure 1 — Example 1. $x$ goes through $g$ first, then through $f$.

Apply

  1. $f(x)=2x+1$, $g(x)=x^{2}$: find $(f\circ g)(3)$ and $(g\circ f)(3)$.
    Answer$19$; $49$
  2. $f(x)=10-x$, $g(x)=3x$: find $(f\circ g)(2)$.
    Answer$4$
  3. $f(x)=\sqrt x$, $g(x)=x+12$: find $(f\circ g)(4)$.
    Answer$4$

I.2 A composite as an expression

Watch out 1
$(f\circ g)(x)$ is not the product $f(x)\times g(x)$, and $f\circ g$ is usually not $g\circ f$. Read $f\big(g(x)\big)$ from the inside out.
Example 2

Let $f(x)=3x-1$ and $g(x)=x^{2}+2$. Find $(f\circ g)(x)$ and $(g\circ f)(x)$.

What you do
What you write
Step 1 $f\circ g$: put $g(x)$ in place of $x$ in $f$
$3(x^{2}+2)-1$
Step 2 Simplify
$(f\circ g)(x)=3x^{2}+5$
Step 3 $g\circ f$: put $f(x)$ in place of $x$ in $g$
$(3x-1)^{2}+2$
Step 4 Expand and simplify
$(g\circ f)(x)=9x^{2}-6x+3$

Apply

  1. $f(x)=x+4$, $g(x)=5x$: find $(f\circ g)(x)$ and $(g\circ f)(x)$.
    Answer$5x+4$; $5x+20$
  2. $f(x)=x^{2}$, $g(x)=1-2x$: find $(f\circ g)(x)$.
    Answer$4x^{2}-4x+1$
  3. $f(x)=\dfrac2x$, $g(x)=x-3$: find $(f\circ g)(x)$.
    Answer$\dfrac2{x-3}$

I.3 Solving $(f\circ g)(x)=k$

Example 3

Let $f(x)=2x-3$ and $g(x)=x^{2}$. Solve $(f\circ g)(x)=29$.

What you do
What you write
Step 1 Write the composite
$(f\circ g)(x)=2x^{2}-3$
Step 2 Set it equal to $k$
$2x^{2}-3=29$
Step 3 Solve: both signs
$x^{2}=16$: $x=4$ or $x=-4$

Apply

  1. $f(x)=x-5$, $g(x)=x^{2}$: solve $(f\circ g)(x)=31$.
    Answer$x=\pm6$
  2. $f(x)=3x$, $g(x)=x+2$: solve $(f\circ g)(x)=24$.
    Answer$x=6$

I.4 The domain of a composite

Example 4

Let $f(x)=\sqrt x$, for $x\ge0$, and $g(x)=x-7$. Find $(f\circ g)(x)$ and the domain of $f\circ g$.

What you do
What you write
Step 1 Write the composite
$(f\circ g)(x)=\sqrt{x-7}$
Step 2 $g(x)$ must be in the domain of $f$
$x-7\ge0$
Step 3 Solve
domain $x\ge7$

Apply

  1. $f(x)=\ln x$, $g(x)=x+2$: domain of $f\circ g$.
    Answer$x\gt -2$
  2. $f(x)=\dfrac1x$, $g(x)=x-1$: domain of $f\circ g$.
    Answer$x\ne1$
  3. $f(x)=\sqrt x$, $g(x)=6-2x$: domain of $f\circ g$.
    Answer$x\le3$

I.5 The identity

Property 1

the identity

The identity is $x\mapsto x$. A function and its inverse undo each other: $(f\circ f^{-1})(x)=x$ and $(f^{-1}\circ f)(x)=x$.
Example 5

Let $f(x)=4x-3$ and $g(x)=\dfrac{x+3}4$. Show that $(f\circ g)(x)=x$.

What you do
What you write
Step 1 Put $g(x)$ into $f$
$(f\circ g)(x)=4\times\dfrac{x+3}{4}-3$
Step 2 Simplify to $x$
$=x+3-3=x$

Apply

  1. $f(x)=2x+6$, $g(x)=\frac x2-3$: show that $(f\circ g)(x)=x$.
    Answer$2\big(\frac x2-3\big)+6=x$
  2. $f(x)=x^{3}$, $g(x)=\sqrt[3]{x}$: find $(g\circ f)(x)$.
    Answer$x$

IIInverse functionsSL 2.2 · 2.5 · $f^{-1}$, its graph, its domain and range

II.1 The inverse undoes $f$

Definition 2

inverse function

If $f(a)=b$, then $f^{-1}(b)=a$. $f^{-1}$ exists when $f$ is one-to-one (each value comes from one $x$ only). Domain of $f^{-1}$ = range of $f$; range of $f^{-1}$ = domain of $f$.
Example 6

Let $f(x)=2x+7$. Find $f^{-1}(15)$.

What you do
What you write
Step 1 $f^{-1}(15)$ is the $x$ with $f(x)=15$
$2x+7=15$
Step 2 Solve
$x=4$
Step 3 Check with $f$
$f(4)=15$, so $f^{-1}(15)=4$

Apply

  1. $f(x)=5x-2$: find $f^{-1}(13)$.
    Answer$3$
  2. $f(x)=x^{3}$: find $f^{-1}(-8)$.
    Answer$-2$
  3. $f(x)=x^{2}+3$, $x\ge0$: find $f^{-1}(19)$.
    Answer$4$

II.2 Finding $f^{-1}(x)$

Property 2

finding the inverse

Write $y=f(x)$, exchange $x$ and $y$, make $y$ the subject: that $y$ is $f^{-1}(x)$.
Example 7

Let $f(x)=4x+1$. Find $f^{-1}(x)$.

What you do
What you write
Step 1 Write $y=f(x)$, exchange $x$ and $y$
$x=4y+1$
Step 2 Make $y$ the subject
$y=\dfrac{x-1}{4}$
Step 3 Name it
$f^{-1}(x)=\dfrac{x-1}{4}$

Apply

  1. $f(x)=7-2x$: find $f^{-1}(x)$.
    Answer$\dfrac{7-x}2$
  2. $f(x)=\frac x3+2$: find $f^{-1}(x)$.
    Answer$3x-6$
  3. $f(x)=x^{3}-1$: find $f^{-1}(x)$.
    Answer$\sqrt[3]{x+1}$

II.3 The inverse of a rational function

Example 8

Let $f(x)=\dfrac{3x-1}{x+2}$, for $x\ne-2$. Find $f^{-1}(x)$.

What you do
What you write
Step 1 Exchange $x$ and $y$
$x=\dfrac{3y-1}{y+2}$
Step 2 Multiply out the denominator
$xy+2x=3y-1$
Step 3 Collect the $y$ terms on one sideFactorise $y$ out.
$xy-3y=-2x-1$, $y(x-3)=-2x-1$
Step 4 Divide
$f^{-1}(x)=\dfrac{2x+1}{3-x}$

Apply

  1. $f(x)=\dfrac1{x-2}$: find $f^{-1}(x)$.
    Answer$\dfrac{2x+1}{x}$
  2. $f(x)=\dfrac{2x}{x+5}$: find $f^{-1}(x)$.
    Answer$\dfrac{5x}{2-x}$

II.4 The graph of the inverse

Property 3

the graph of the inverse

The graph of $f^{-1}$ is the reflection of the graph of $f$ in the line $y=x$: $(a,\,b)$ becomes $(b,\,a)$. An increasing $f$ meets $f^{-1}$ on the line $y=x$.
Watch out 2
$f^{-1}(x)$ is not $\dfrac1{f(x)}$.
Example 9

Let $f(x)=2x-3$. The point $(3,\,3)$ is on its graph; so is $(5,\,7)$. Write down a point of the graph of $f^{-1}$, then solve $f(x)=f^{-1}(x)$.

What you do
What you write
Step 1 Swap the coordinates
$(7,\,5)$ is on the graph of $f^{-1}$
Step 2 $f$ is increasing: they meet on $y=x$
$2x-3=x$
Step 3 Solve
$x=3$
Figure 2 — $f^{-1}$ is the mirror image of $f$ in $y=x$.

Apply

  1. $(-2,\,5)$ is on the graph of $f$: a point of the graph of $f^{-1}$.
    Answer$(5,\,-2)$
  2. $f(x)=4x-9$: solve $f(x)=f^{-1}(x)$.
    Answer$x=3$
  3. $f(x)=\frac x2+3$: solve $f(x)=f^{-1}(x)$.
    Answer$x=6$

II.5 Restricting the domain

Example 10

Let $f(x)=(x+1)^{2}$, for $x\ge-1$. Find $f^{-1}(x)$, with its domain and range.

What you do
What you write
Step 1 Range of $f$: the square is $\ge0$
$f(x)\ge0$
Step 2 Exchange $x$ and $y$
$x=(y+1)^{2}$
Step 3 Positive root, because $y\ge-1$No $\pm$ in the answer.
$y+1=\sqrt x$, $f^{-1}(x)=\sqrt x-1$
Step 4 Domain and range swap
domain $x\ge0$, range $f^{-1}(x)\ge-1$

Apply

  1. $f(x)=x^{2}-4$, $x\ge0$: $f^{-1}(x)$ and its domain.
    Answer$\sqrt{x+4}$; $x\ge-4$
  2. $f(x)=(x-3)^{2}$, $x\ge3$: $f^{-1}(x)$ and its range.
    Answer$3+\sqrt x$; $f^{-1}(x)\ge3$

II.6 An inverse value on the GDC

Example 11

Let $f(x)=x^{3}+x$. Find $f^{-1}(4)$.

What you do
What you write
Step 1 Write the equation $f(x)=4$
$x^{3}+x=4$
Step 2 Intersection of $y=f(x)$ and $y=4$ on the GDC
$x=1.37879\ldots$
Step 3 Answer to 3 s.f.
$f^{-1}(4)=1.38$

Apply

  1. $f(x)=\mathrm{e}^{x}+x$: find $f^{-1}(3)$.
    Answer$0.792$
  2. $f(x)=x+\ln x$: find $f^{-1}(4)$.
    Answer$2.93$

IIIExam-style questionsfrom the shortest to the longest · every one in steps, with its marks

A Composite functions

Exam-style question 1Paper 1 · no calculator · [Maximum mark: 6]

Let $f(x)=2x-1$ and $g(x)=x^{2}+3$.

(a)Find $(f\circ g)(1)$.[2]
(b)Find $(g\circ f)(x)$. Give your answer in the form $ax^{2}+bx+c$.[2]
(c)Solve $(f\circ g)(x)=21$.[2]
More questions like this

Working (a)

What you do
What you write
Step 1 Inside first: $g(1)$
$g(1)=4$
Inside first.
Step 2 Then $f$ of it
$f(4)=7$

Working (b)

What you do
What you write
Step 1 Put $f(x)$ into $g$
$(2x-1)^{2}+3$
$f(x)$ goes into $g$.
Step 2 Expand and simplify
$=4x^{2}-4x+4$

Working (c)

What you do
What you write
Step 1 Write the composite, set it equal to $21$
$(f\circ g)(x)=2x^{2}+5=21$
Step 2 Solve: both signs
$x=\pm2\sqrt2$
Both values.

Play this question in Mark it: find each mark yourself →

Exam-style question 2Paper 1 · no calculator · [Maximum mark: 5]

Let $f(x)=\ln x$, for $x\gt 0$, and $g(x)=3-x$, for $x\in\mathbb{R}$.

(a)Write down $(f\circ g)(x)$.[1]
(b)Find the domain of $f\circ g$.[2]
(c)Solve $(f\circ g)(x)=0$.[2]
More questions like this

Working (a)

What you do
What you write
Step 1 Put $g(x)$ into $f$
$\ln(3-x)$

Working (b)

What you do
What you write
Step 1 $g(x)$ must suit $\ln$: $\gt 0$
$3-x\gt 0$
The output of $g$ must be in the domain of $f$.
Step 2 Solve
$x\lt 3$

Working (c)

What you do
What you write
Step 1 $\ln u=0$ when $u=1$
$3-x=1$
$\ln u=0$ when $u=1$.
Step 2 Solve
$x=2$

Play this question in Mark it: find each mark yourself →

B Inverse functions

Exam-style question 3Paper 1 · no calculator · [Maximum mark: 6]

Let $f(x)=3x-5$.

(a)Find $f^{-1}(x)$.[2]
(b)Find $f^{-1}(7)$.[1]
(c)Solve $f(x)=f^{-1}(x)$.[3]
More questions like this

Working (a)

What you do
What you write
Step 1 Exchange $x$ and $y$
$x=3y-5$
Exchange $x$ and $y$.
Step 2 Make $y$ the subject
$f^{-1}(x)=\dfrac{x+5}{3}$

Working (b)

What you do
What you write
Step 1 Substitute in $f^{-1}$
$4$
Check: $f(4)=7$.

Working (c)

What you do
What you write
Step 1 Write the equation
$3x-5=\dfrac{x+5}{3}$
Step 2 Clear the fraction
$9x-15=x+5$, $8x=20$
Step 3 Solve
$x=\dfrac52$
Where the graphs meet, on the line $y=x$.

Play this question in Mark it: find each mark yourself →

Exam-style question 4Paper 1 · no calculator · [Maximum mark: 7]

Let $f(x)=(x-2)^{2}+1$, for $x\ge2$.

(a)Write down the range of $f$.[1]
(b)Find $f^{-1}(x)$.[3]
(c)Write down the domain and the range of $f^{-1}$.[2]
(d)Explain why the domain of $f$ is restricted to $x\ge2$.[1]
More questions like this

Working (a)

What you do
What you write
Step 1 Range from the vertex
$f(x)\ge1$

Working (b)

What you do
What you write
Step 1 Exchange $x$ and $y$
$x=(y-2)^{2}+1$
Step 2 Positive root
$y-2=\sqrt{x-1}$
The positive root, because $y\ge2$.
Step 3 Make $y$ the subject
$f^{-1}(x)=2+\sqrt{x-1}$
$\pm$ in the final answer: A0.

Working (c)

What you do
What you write
Step 1 Domain of $f^{-1}$ = range of $f$
domain $x\ge1$
The range of $f$.
Step 2 Range of $f^{-1}$ = domain of $f$
range $f^{-1}(x)\ge2$
The domain of $f$.

Working (d)

What you do
What you write
Step 1 Give the reason in words
on $x\ge2$, $f$ is one-to-one (on $\mathbb{R}$ two values of $x$ give the same $f(x)$)

Play this question in Mark it: find each mark yourself →

Exam-style question 5Paper 1 · no calculator · [Maximum mark: 5]

Let $f(x)=\dfrac{2x+1}{x-3}$, for $x\ne3$.

(a)Find $f^{-1}(x)$.[3]
(b)Write down the domain of $f^{-1}$.[1]
(c)Hence write down the range of $f$.[1]
More questions like this

Working (a)

What you do
What you write
Step 1 Exchange $x$ and $y$
$x=\dfrac{2y+1}{y-3}$
Step 2 Collect the $y$ terms on one side
$xy-3x=2y+1\Rightarrow y(x-2)=3x+1$
Collect the terms in $y$ on one side.
Step 3 Divide
$f^{-1}(x)=\dfrac{3x+1}{x-2}$

Working (b)

What you do
What you write
Step 1 The denominator $\ne0$
$x\ne2$

Working (c)

What you do
What you write
Step 1 Range of $f$ = domain of $f^{-1}$
$f(x)\ne2$
The range of $f$ is the domain of $f^{-1}$.

Play this question in Mark it: find each mark yourself →

C With the GDC (Paper 2)

Exam-style question 6Paper 2 · calculator · [Maximum mark: 5]

Let $f(x)=\mathrm{e}^{0.5x}+x$, for $x\in\mathbb{R}$, and $g(x)=\ln x$, for $x\gt 0$.

(a)Explain why $f$ has an inverse.[1]
(b)Find $f^{-1}(5)$.[2]
(c)Find $(g\circ f)(2)$.[2]
More questions like this

Working (a)

What you do
What you write
Step 1 Give the reason in words
$f$ is increasing, so it is one-to-one
Or: $f'(x)=0.5\mathrm{e}^{0.5x}+1\gt 0$.

Working (b)

What you do
What you write
Step 1 Write the equation $f(x)=5$
$\mathrm{e}^{0.5x}+x=5$
Step 2 Solve on the GDC
$2.12$ ($2.11739\ldots$)

Working (c)

What you do
What you write
Step 1 Inside first: $f(2)$
$f(2)=\mathrm{e}+2=4.71828\ldots$
Step 2 Then $g$ of it
$\ln(4.71828\ldots)=1.55$ ($1.55144\ldots$)

Play this question in Mark it: find each mark yourself →

Exam-style question 7Paper 2 · calculator · [Maximum mark: 5]

Let $f(x)=2^{x}$ and $g(x)=x^{2}-3$.

(a)Find $(f\circ g)(1.5)$.[2]
(b)Solve $(f\circ g)(x)=5$.[3]
More questions like this

Working (a)

What you do
What you write
Step 1 Inside first: $g(1.5)$
$g(1.5)=-0.75$
Step 2 Then $f$ of it
$2^{-0.75}=0.595$ ($0.594603\ldots$)

Working (b)

What you do
What you write
Step 1 Write the equation
$2^{x^{2}-3}=5$
On the GDC: $y=2^{x^{2}-3}$ and $y=5$.
Step 2 Solve on the GDC
$x=-2.31$ ($-2.30693\ldots$)
$x=2.31$ ($2.30693\ldots$)

Play this question in Mark it: find each mark yourself →

IVWhich method? Read the questionthe whole topic on one page

The question says
You write
Two functions $f$ and $g$ are given and you must “find $(f\circ g)(a)$” for a number $a$: work from the inside first.
$g(a)$, then $f$ of it D1
You must “find $(f\circ g)(x)$” as an expression: $g(x)$ goes into $f$ in place of its variable.
replace every $x$ of $f$ by $g(x)$; simplify D1
You must find “the domain of $f\circ g$”, or say why it is restricted: $g(x)$ must suit $f$, it has to lie in the domain of $f$.
solve the condition of $f$ on $g(x)$ D1
You must “find $f^{-1}(x)$”, the inverse function, as an expression: exchange $x$ and $y$, then make $y$ the subject.
$x=f(y)$, then $y=\ldots$ P2
You must “find $f^{-1}(a)$” for one number $a$: no need for the whole inverse, it is the $x$ such that $f(x)=a$.
solve $f(x)=a$, or use $f^{-1}(x)$ D2
You must give the “domain and range of $f^{-1}$” once those of $f$ are known: they swap.
domain of $f^{-1}$ = range of $f$, and back D2
The graph of $f$ is drawn and you must “sketch $f^{-1}$” on the same axes: it is the mirror image in $y=x$.
each $(a,\,b)$ becomes $(b,\,a)$; asymptotes swap too P3
In the exam 1

command terms

Find $f^{-1}(x)$: an expression in $x$. Write down the domain: the values of $x$, with the inequality sign. Hence: use the inverse just found. Explain why: a reason in words, such as “$f$ is one-to-one”.