AS & A Level · Practice questions · Functions: domain, range and composition

Which one acts first?

Six original Cambridge-style questions on domain, range, one-one functions and composite functions, ending with a shopping problem where the order of the functions matters.

Original questions All questions on this page are original work, written in the Cambridge AS & A Level style. They are not from past papers. They test the same concepts and skills the syllabus rewards.
The method

Sketch for the range, inside-out for composites.

01
Recall
[2 marks]

The function f is defined by \(f(x) = 5 - 2x\) for \(-1 \le x \le 3\). Find the range of f.

  • \(f\) is decreasing: \(f(-1) = 7\) and \(f(3) = -1\). ✓
  • Range: \(-1 \le f(x) \le 7\). ✓
02
Calculation
[4 marks]

\(f(x) = x^{2} + 2\) and \(g(x) = 2x - 3\) for \(x \in \mathbb{R}\).

(a) Find \(fg(x)\) and \(gf(x)\).

(b) Solve \(fg(x) = gf(x)\).

  • (a) \(fg(x) = (2x - 3)^{2} + 2 = 4x^{2} - 12x + 11\). ✓
  • \(gf(x) = 2(x^{2} + 2) - 3 = 2x^{2} + 1\). ✓
  • (b) \(4x^{2} - 12x + 11 = 2x^{2} + 1 \Rightarrow 2x^{2} - 12x + 10 = 0 \Rightarrow x^{2} - 6x + 5 = 0\). ✓
  • \((x - 1)(x - 5) = 0\), so \(x = 1\) or \(x = 5\). ✓
03
Calculation
[3 marks]

The function f is defined by \(f(x) = 2x^{2} - 8x + 5\) for \(x \in \mathbb{R}\). Express \(f(x)\) in the form \(a(x + b)^{2} + c\) and hence state the range of f.

  • \(2(x^{2} - 4x) + 5 = 2\big[(x - 2)^{2} - 4\big] + 5\). ✓
  • \(= 2(x - 2)^{2} - 3\). ✓
  • \(2(x - 2)^{2} \ge 0\), so the range is \(f(x) \ge -3\). ✓
04
Analysis
[4 marks]

The function f is defined by \(f(x) = (x + 1)^{2} - 4\) for \(x \ge k\), and g is defined by \(g(x) = 2x + 5\) for \(x \in \mathbb{R}\).

(a) State the least value of \(k\) for which f is one-one, and the range of f for this value of \(k\).

(b) For this value of \(k\), find \(gf(x)\) and state its range.

  • (a) The vertex is at \(x = -1\), so the least \(k\) is \(-1\). ✓
  • Range of f: \(f(x) \ge -4\). ✓
  • (b) \(gf(x) = 2\big[(x + 1)^{2} - 4\big] + 5 = 2(x + 1)^{2} - 3\). ✓
  • Since \(f(x) \ge -4\), \(gf(x) \ge 2(-4) + 5 = -3\). Range: \(gf(x) \ge -3\). ✓
05
Proof
[3 marks]

The functions f and g are defined by \(f : x \mapsto \sqrt{x}\) for \(x \ge 0\) and \(g : x \mapsto x - 5\) for \(x \in \mathbb{R}\).

Explain why the composite function \(gf\) exists but \(fg\) does not.

  • Range of f is \(f(x) \ge 0\), which lies inside the domain of g (all real numbers), so \(gf(x) = \sqrt{x} - 5\) exists. ✓
  • Range of g is all real numbers, including negative values such as \(g(0) = -5\). ✓
  • f cannot take a negative input (\(\sqrt{-5}\) is undefined), so the range of g is not within the domain of f and \(fg\) does not exist. ✓
06
Analysis
[5 marks]

A shop sells items priced from $20 to $100. It offers 20% off, given by \(f(x) = 0.8x\), and a $5 voucher, given by \(g(x) = x - 5\), where \(x\) is a price in dollars.

(a) Find \(fg(x)\) and \(gf(x)\), and describe in words what each represents.

(b) Which order is better for the customer, and by how much?

(c) Using \(gf\), find the original price of an item that costs $35, and the range of \(gf\) for the shop's prices.

  • (a) \(fg(x) = 0.8(x - 5) = 0.8x - 4\): voucher first, then 20% off. ✓
  • \(gf(x) = 0.8x - 5\): 20% off first, then the voucher. ✓
  • (b) \(gf(x)\) is always $1 less than \(fg(x)\), so taking the discount first saves the customer $1. ✓
  • (c) \(0.8x - 5 = 35 \Rightarrow 0.8x = 40 \Rightarrow x = 50\): the original price was $50. ✓
  • \(gf\) is increasing: \(gf(20) = 11\) and \(gf(100) = 75\), so the range is \(11 \le gf(x) \le 75\). ✓

Mark this once you have attempted all six and checked your working. It records a Practiced badge on the topic and adds a one-time bonus. Revealing the solutions alone does not count.