Year 2 Pure · Chapter 3

Functions

Specification: Edexcel Pure 2.8, 2.11 — Algebra and functions  ·  AQA section B8, B11

In this chapter
  1. 1. Domain and range
  2. 2. Composite functions
  3. 3. Inverse functions
  4. 4. Functions in modelling
  5. Practice

Key facts — this chapter

  • A function sends each input in its domain to exactly one output. The set of outputs is its range.
  • A function is one-to-one if each output comes from only one input, and many-to-one otherwise.
  • Composite functions: fg(x)=f(g(x))fg(x) = f(g(x)). Apply gg first, then ff. In general fg≠gffg \neq gf.
  • The inverse f−1f^{-1} undoes ff. Find it by writing y=f(x)y = f(x) and rearranging for xx. Only one-to-one functions have inverses.
  • The domain of f−1f^{-1} is the range of ff, and the range of f−1f^{-1} is the domain of ff.
  • The 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.

You have used f(x)f(x) notation since Year 1. This chapter makes it precise. A function comes with a domain, the inputs it accepts, and a range, the outputs it can give. That precision is what lets you chain functions together and run them backwards.

1. Domain and range

Key result

A function is a rule that gives exactly one output for each input.

  • The domain is the set of inputs, written after the rule: f(x)=x2f(x) = x^2, x∈Rx \in \mathbb{R}.
  • The range is the set of outputs. Describe it with f(x)f(x), not xx, as in f(x)≥0f(x) \geq 0.
  • A function is one-to-one if different inputs always give different outputs, and many-to-one if some output comes from more than one input.

A rule that gives some input two outputs, like y=±xy = \pm\sqrt{x}, is not a function at all.

Three mapping diagrams from inputs to outputs: one-to-one, where each input has its own output; many-to-one, where two inputs share an output; and one-to-many, where one input has two outputs, which is not a function
One-to-one and many-to-one are both functions. One-to-many is not.

Worked example 3.1 · The range of a quadratic

Find the range of f(x)=x2−4x+7f(x) = x^2 - 4x + 7, x∈Rx \in \mathbb{R}.


  1. Complete the square:

    f(x)=(x−2)2+3f(x) = (x - 2)^2 + 3
  2. (x−2)2≥0(x - 2)^2 \geq 0, and it equals 00 when x=2x = 2. So the smallest output is 33, and every value above 33 is reached too.

  3. The range is f(x)≥3f(x) \geq 3.

Worked example 3.2 · A restricted domain

Find the range of g(x)=2x+1g(x) = 2x + 1, −1≤x≤3-1 \leq x \leq 3.


gg is increasing, so its smallest and largest outputs come from the ends of the domain: g(−1)=−1g(-1) = -1 and g(3)=7g(3) = 7. The range is −1≤g(x)≤7-1 \leq g(x) \leq 7.

Common mistake

Write the range in terms of the output: f(x)≥3f(x) \geq 3 or y≥3y \geq 3, never x≥3x \geq 3. The letter xx belongs to the domain.

2. Composite functions

Feeding the output of one function into another makes a composite function.

Key result

fg(x)=f(g(x))fg(x) = f\big(g(x)\big)

Work from the inside out: apply gg first, then ff. The order matters, and fg(x)fg(x) and gf(x)gf(x) are usually different.

A flow diagram: x goes into the machine g, its output g of x goes into the machine f, and f of g of x comes out, labelled fg of x
fg(x): x goes through g first, and g's output goes through f.

Worked example 3.3 · Two orders, two answers

f(x)=3x−1f(x) = 3x - 1 and g(x)=x2+2g(x) = x^2 + 2, both for x∈Rx \in \mathbb{R}. Find fg(x)fg(x) and gf(x)gf(x), and solve fg(x)=32fg(x) = 32.


  1. For fg(x)fg(x), put g(x)g(x) into ff:

    fg(x)=3(x2+2)−1=3x2+5fg(x) = 3(x^2 + 2) - 1 = 3x^2 + 5
  2. For gf(x)gf(x), put f(x)f(x) into gg:

    gf(x)=(3x−1)2+2=9x2−6x+3\begin{aligned} gf(x) &= (3x - 1)^2 + 2 \\ &= 9x^2 - 6x + 3 \end{aligned}
  3. Solve 3x2+5=323x^2 + 5 = 32: x2=9x^2 = 9, so x=3x = 3 or x=−3x = -3.

Common mistake

fg(x)fg(x) does not mean ff first. It reads right to left, like f(g(x))f(g(x)): the function nearest the xx acts first.

3. Inverse functions

The inverse of a function runs it backwards: if ff takes 22 to 77, then f−1f^{-1} takes 77 back to 22.

Key result

To find f−1(x)f^{-1}(x):

  1. Write y=f(x)y = f(x).
  2. Rearrange to make xx the subject.
  3. Swap the letters to write the result as a function of xx.

The domain of f−1f^{-1} is the range of ff, and the range of f−1f^{-1} is the domain of ff. Also ff−1(x)=f−1f(x)=xff^{-1}(x) = f^{-1}f(x) = x.

Worked example 3.4 · The inverse of a fraction

f(x)=2x+3x−1f(x) = \dfrac{2x + 3}{x - 1}, x>1x > 1. Find f−1(x)f^{-1}(x) and state its domain.


  1. Write y=2x+3x−1y = \dfrac{2x + 3}{x - 1} and clear the fraction:

    y(x−1)=2x+3⇒xy−y=2x+3\begin{aligned} y(x - 1) &= 2x + 3 \\ \Rightarrow \quad xy - y &= 2x + 3 \end{aligned}
  2. Collect the xx terms and factorise:

    x(y−2)=y+3⇒x=y+3y−2\begin{aligned} x(y - 2) &= y + 3 \\ \Rightarrow \quad x &= \frac{y + 3}{y - 2} \end{aligned}
  3. So f−1(x)=x+3x−2f^{-1}(x) = \dfrac{x + 3}{x - 2}.

  4. Its domain is the range of ff. Since f(x)=2+5x−1f(x) = 2 + \dfrac{5}{x - 1} and the fraction is positive for x>1x > 1, the range of ff is f(x)>2f(x) > 2. So the domain of f−1f^{-1} is x>2x > 2.

Common mistake

f−1(x)f^{-1}(x) is the inverse function, not the reciprocal. For f(x)=2xf(x) = 2x, f−1(x)=12xf^{-1}(x) = \tfrac{1}{2}x, but 1f(x)=12x\dfrac{1}{f(x)} = \dfrac{1}{2x}.

A many-to-one function has no inverse: running it backwards would give one input two outputs. The fix is to restrict the domain until the function is one-to-one.

Worked example 3.5 · Restricting the domain

f(x)=x2−4x+7f(x) = x^2 - 4x + 7, x≥2x \geq 2. Find f−1(x)f^{-1}(x) and state its domain and range.


  1. On x≥2x \geq 2 the function is one-to-one: it is the right half of the parabola, from its vertex (2,3)(2, 3). Its range is f(x)≥3f(x) \geq 3.

  2. Write y=(x−2)2+3y = (x - 2)^2 + 3 and rearrange:

    (x−2)2=y−3⇒x=2+y−3\begin{aligned} (x - 2)^2 &= y - 3 \\ \Rightarrow \quad x &= 2 + \sqrt{y - 3} \end{aligned}

    Take the positive root, because x≥2x \geq 2.

  3. So f−1(x)=2+x−3f^{-1}(x) = 2 + \sqrt{x - 3}, with domain x≥3x \geq 3 and range f−1(x)≥2f^{-1}(x) \geq 2.

The graph of the inverse

The 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.

Why it works

If the point (a,b)(a, b) is on y=f(x)y = f(x), then f(a)=bf(a) = b, so f−1(b)=af^{-1}(b) = a and the point (b,a)(b, a) is on y=f−1(x)y = f^{-1}(x). Swapping the coordinates of every point is exactly a reflection in y=xy = x.

The curve y = x squared minus 4x plus 7 for x at least 2, starting at (2, 3), and its inverse y = 2 plus root of x minus 3 starting at (3, 2), mirror images of each other in the dashed line y = x
f and f⁻¹ are mirror images in y = x: the point (2, 3) becomes (3, 2).

Step the point along y = f(x) and watch its mirror image in y = x trace the inverse. For x² − 2 on all real numbers, the mirror gives one input two outputs, so there is no inverse until you restrict the domain.

Function

4. Functions in modelling

A function used as a model needs a domain that makes sense in the context, and its range then tells you what the model predicts.

Worked example 3.6 · A thrown ball

A ball is thrown upwards from a height of 1.51.5 m. Its height after tt seconds is modelled by h(t)=1.5+14t−4.9t2h(t) = 1.5 + 14t - 4.9t^2. Find the greatest height, a suitable domain for hh, and the range.


  1. Complete the square:

    h(t)=11.5−4.9(t−107)2h(t) = 11.5 - 4.9\left(t - \tfrac{10}{7}\right)^2

    so the greatest height is 11.511.5 m, when t=107=1.43t = \tfrac{10}{7} = 1.43 s (3 s.f.).

  2. The ball lands when h(t)=0h(t) = 0:

    (t−107)2=11.54.9⇒t=2.96 s (3 s.f.)\begin{aligned} \left(t - \tfrac{10}{7}\right)^2 &= \frac{11.5}{4.9} \\ \Rightarrow \quad t &= 2.96 \text{ s (3 s.f.)} \end{aligned}

    taking the positive root, because the ball lands after it is thrown.

  3. So a suitable domain is 0≤t≤2.960 \leq t \leq 2.96, and the range is 0≤h(t)≤11.50 \leq h(t) \leq 11.5.

In context

The model says the ball rises to 11.511.5 m and lands about 33 seconds after it is thrown. Outside 0≤t≤2.960 \leq t \leq 2.96 it predicts nonsense, such as negative heights, which is why the domain is part of the model. It also ignores air resistance, so the real ball won’t go quite as high.

Practice

Twelve questions in three tiers. Try each one properly before opening the solution — the solutions show full method, not just answers.

Warm-up

1 [3 marks]

f(x)=5−2xf(x) = 5 - 2x and g(x)=x2+1g(x) = x^2 + 1, both for x∈Rx \in \mathbb{R}. Find:

  1. fg(3)fg(3)
  2. gf(3)gf(3)
  3. ff(x)ff(x), in its simplest form
Show solution

(a) g(3)=10g(3) = 10, so fg(3)=f(10)=5−20=−15fg(3) = f(10) = 5 - 20 = -15.

(b) f(3)=−1f(3) = -1, so gf(3)=g(−1)=2gf(3) = g(-1) = 2.

(c) ff(x)=5−2(5−2x)=4x−5ff(x) = 5 - 2(5 - 2x) = 4x - 5.

2 [3 marks]

State whether each function is one-to-one or many-to-one.

  1. f(x)=3x+2f(x) = 3x + 2, x∈Rx \in \mathbb{R}
  2. g(x)=x2g(x) = x^2, x∈Rx \in \mathbb{R}
  3. h(x)=x2h(x) = x^2, x≥0x \geq 0
Show solution

(a) One-to-one: a straight line with non-zero gradient never repeats an output.

(b) Many-to-one: for example g(2)=g(−2)=4g(2) = g(-2) = 4.

(c) One-to-one: with the negative inputs removed, each output comes from a single input.

3 [3 marks]

Find the range of each function.

  1. f(x)=4x−1f(x) = 4x - 1, 0≤x≤50 \leq x \leq 5
  2. g(x)=x2+6x+13g(x) = x^2 + 6x + 13, x∈Rx \in \mathbb{R}
Show solution

(a) ff is increasing, with f(0)=−1f(0) = -1 and f(5)=19f(5) = 19. The range is −1≤f(x)≤19-1 \leq f(x) \leq 19.

(b) g(x)=(x+3)2+4g(x) = (x + 3)^2 + 4, and (x+3)2≥0(x + 3)^2 \geq 0, so the range is g(x)≥4g(x) \geq 4.

4 [3 marks]

f(x)=x+43f(x) = \dfrac{x + 4}{3}, x∈Rx \in \mathbb{R}. Find f−1(x)f^{-1}(x), and check that ff−1(x)=xff^{-1}(x) = x.

Show solution

Write y=x+43y = \dfrac{x + 4}{3}, so 3y=x+43y = x + 4 and x=3y−4x = 3y - 4. So

f−1(x)=3x−4f^{-1}(x) = 3x - 4

Check: ff−1(x)=(3x−4)+43=3x3=xff^{-1}(x) = \dfrac{(3x - 4) + 4}{3} = \dfrac{3x}{3} = x. ✓

Standard

5 [4 marks]

f(x)=2x+3f(x) = 2x + 3, x∈Rx \in \mathbb{R}, and g(x)=1x−1g(x) = \dfrac{1}{x - 1}, x≠1x \neq 1.

  1. Find gf(x)gf(x) in its simplest form. [2]
  2. Solve gf(x)=14gf(x) = \tfrac{1}{4}. [2]
Show solution

(a)

gf(x)=1(2x+3)−1=12x+2gf(x) = \frac{1}{(2x + 3) - 1} = \frac{1}{2x + 2}

(b) 12x+2=14\dfrac{1}{2x + 2} = \dfrac{1}{4} gives 2x+2=42x + 2 = 4, so x=1x = 1.

6 [4 marks]

f(x)=x−2f(x) = \sqrt{x - 2}, x≥2x \geq 2.

  1. State the range of ff. [1]
  2. Find f−1(x)f^{-1}(x) and state its domain. [3]
Show solution

(a) A square root is never negative, and f(2)=0f(2) = 0, so the range is f(x)≥0f(x) \geq 0.

(b) Write y=x−2y = \sqrt{x - 2}. Squaring, y2=x−2y^2 = x - 2, so x=y2+2x = y^2 + 2. So

f−1(x)=x2+2,x≥0f^{-1}(x) = x^2 + 2, \qquad x \geq 0

The domain of f−1f^{-1} is the range of ff.

7 [4 marks]

f(x)=3x+1f(x) = \dfrac{3}{x + 1}, x>−1x > -1. Find f−1(x)f^{-1}(x) and state its domain.

Show solution

Write y=3x+1y = \dfrac{3}{x + 1}, so x+1=3yx + 1 = \dfrac{3}{y} and x=3y−1x = \dfrac{3}{y} - 1. So

f−1(x)=3x−1f^{-1}(x) = \frac{3}{x} - 1

For x>−1x > -1 the denominator x+1x + 1 is positive, so f(x)>0f(x) > 0, and it takes every positive value. The domain of f−1f^{-1} is x>0x > 0.

8 [5 marks]

f(x)=x2−6x+10f(x) = x^2 - 6x + 10, x≥3x \geq 3.

  1. Show that f(x)=(x−3)2+1f(x) = (x - 3)^2 + 1, and state the range of ff. [2]
  2. Find f−1(x)f^{-1}(x), stating its domain. [3]
Show solution

(a) (x−3)2+1=x2−6x+9+1=x2−6x+10(x - 3)^2 + 1 = x^2 - 6x + 9 + 1 = x^2 - 6x + 10. ✓ Since (x−3)2≥0(x - 3)^2 \geq 0, with 00 at x=3x = 3, the range is f(x)≥1f(x) \geq 1.

(b) Write y=(x−3)2+1y = (x - 3)^2 + 1. Then (x−3)2=y−1(x - 3)^2 = y - 1, and because x≥3x \geq 3 take the positive root: x=3+y−1x = 3 + \sqrt{y - 1}. So

f−1(x)=3+x−1,x≥1f^{-1}(x) = 3 + \sqrt{x - 1}, \qquad x \geq 1
9 [4 marks]

f(x)=2x−5f(x) = 2x - 5 and g(x)=x2g(x) = x^2, both for x∈Rx \in \mathbb{R}. Solve fg(x)=gf(x)fg(x) = gf(x), giving your answers in surd form.

Show solution

fg(x)=2x2−5fg(x) = 2x^2 - 5 and gf(x)=(2x−5)2=4x2−20x+25gf(x) = (2x - 5)^2 = 4x^2 - 20x + 25. Setting them equal:

2x2−20x+30=0⇒x2−10x+15=0\begin{aligned} 2x^2 - 20x + 30 &= 0 \\ \Rightarrow \quad x^2 - 10x + 15 &= 0 \end{aligned}

By the quadratic formula,

x=10±100−602=5±10x = \frac{10 \pm \sqrt{100 - 60}}{2} = 5 \pm \sqrt{10}

Exam style

10 [6 marks]

f(x)=2x+1x−3f(x) = \dfrac{2x + 1}{x - 3}, x>3x > 3.

  1. Show that f(x)=2+7x−3f(x) = 2 + \dfrac{7}{x - 3}, and hence state the range of ff. [3]
  2. Find f−1(x)f^{-1}(x), stating its domain. [3]
Show solution

(a)

2+7x−3=2(x−3)+7x−3=2x+1x−32 + \frac{7}{x - 3} = \frac{2(x - 3) + 7}{x - 3} = \frac{2x + 1}{x - 3}

✓ For x>3x > 3, 7x−3\dfrac{7}{x - 3} takes every positive value, so the range is f(x)>2f(x) > 2.

(b) Write y=2x+1x−3y = \dfrac{2x + 1}{x - 3}. Then xy−3y=2x+1xy - 3y = 2x + 1, so x(y−2)=3y+1x(y - 2) = 3y + 1 and x=3y+1y−2x = \dfrac{3y + 1}{y - 2}.

f−1(x)=3x+1x−2,x>2f^{-1}(x) = \frac{3x + 1}{x - 2}, \qquad x > 2
11 [6 marks]

A company models its weekly profit, PP thousand pounds, when it sells a product at a price of xx pounds, by

P(x)=−2x2+48x−160P(x) = -2x^2 + 48x - 160
  1. Write P(x)P(x) in the form a−b(x−c)2a - b(x - c)^2, where aa, bb and cc are constants. [2]
  2. State the greatest weekly profit the model predicts, and the price that gives it. [2]
  3. The company only uses prices for which the model predicts a profit. Find a suitable domain for PP. [1]
  4. Give one limitation of the model. [1]
Show solution

(a)

P(x)=−2(x2−24x)−160=−2((x−12)2−144)−160=128−2(x−12)2\begin{aligned} P(x) &= -2(x^2 - 24x) - 160 \\ &= -2\big((x - 12)^2 - 144\big) - 160 \\ &= 128 - 2(x - 12)^2 \end{aligned}

(b) The greatest profit is £128 000£128\,000 a week, at a price of £12£12.

(c) P(x)=0P(x) = 0 when (x−12)2=64(x - 12)^2 = 64, so at x=4x = 4 and x=20x = 20. A suitable domain is 4<x<204 < x < 20.

(d) For example, the model assumes the profit changes smoothly with price in exactly this quadratic way; in practice sales also depend on competitors’ prices and demand, which the model ignores.

12 [6 marks]

f(x)=e2x+1f(x) = e^{2x} + 1, x∈Rx \in \mathbb{R}, and g(x)=ln⁡xg(x) = \ln x, x>0x > 0.

  1. State the range of ff. [1]
  2. Find f−1(x)f^{-1}(x), stating its domain. [3]
  3. Solve fg(x)=10fg(x) = 10. [2]
Show solution

(a) e2xe^{2x} takes every positive value, so the range is f(x)>1f(x) > 1.

(b) Write y=e2x+1y = e^{2x} + 1. Then e2x=y−1e^{2x} = y - 1, so 2x=ln⁡(y−1)2x = \ln(y - 1) and

f−1(x)=12ln⁡(x−1),x>1f^{-1}(x) = \tfrac{1}{2}\ln(x - 1), \qquad x > 1

(c) fg(x)=e2ln⁡x+1=eln⁡x2+1=x2+1fg(x) = e^{2\ln x} + 1 = e^{\ln x^2} + 1 = x^2 + 1. So x2+1=10x^2 + 1 = 10 gives x2=9x^2 = 9. The domain of gg is x>0x > 0, so x=3x = 3.