Lemmara logo

Composite Functions

fg(3) and fg(x), solving fg(x) = k and fg(x) > 0, and the inverse of a composite function (Higher).

83real exam questions on this topic
  • 8 steps
  • 5 min
  • 4 syllabuses

Try a real exam question on this

0580/42 · Feb/Mar 2025 · Q14 · 5 marks · Solve it step by step, the way the examiner marks it.

Loading the animated solution…

See the solution as text
Text version of the solution

For f(x) = 5 − 4x, evaluate the function at a value, form a composite expression in x, and find the inverse function.

(a) 1 mark

Calculate f(−3) using f(x) = 5 − 4x.

  1. Understand the question. The function f of x is five minus four x, and we must find the value of f at minus three.
  2. Substitute minus three into the function. The rule is five minus four times x, so replace x with minus three.
  3. f(−3) = 5 − 4 × (−3) = 5 + 12 = 17

Answer 17

(b) 2 marks

Substitute 3 − 2x into f and simplify the resulting expression.

  1. Understand the question. The function f of x is five minus four x, and we must find f of three minus two x, in its simplest form.
  2. Substitute the expression into the function. The rule is five minus four times x, so replace x with three minus two x.
  3. f(3 − 2x) = 5 − 4(3 − 2x)
  4. Expand the bracket. Four times three is twelve and four times minus two x is minus eight x, so subtracting gives minus twelve plus eight x.
  5. = 5 − 12 + 8x
  6. Collect like terms. Five minus twelve is minus seven, and the x term stays eight x.
  7. = 8x − 7

Answer 8x − 7

(c) 2 marks

Determine f⁻¹(x) for the function f(x) = 5 − 4x.

  1. Understand the question. The function f of x is five minus four x, and we must find its inverse, f to the power minus one of x.
  2. Find the inverse function. Start with y as the output, then swap x and y and make y the subject.
  3. Why does this work? The inverse function undoes the function. Its inputs are the function's outputs, and its outputs are the inputs.
  4. So swap x and y, then rearrange to make y the subject. That writes the undoing as a formula.
  5. y = 5 − 4x, swap: x = 5 − 4y
  6. Rearrange for y. Add four y to both sides and subtract x, so four y is five minus x.
  7. 4y = 5 − x
  8. Divide by four. y is five minus x all divided by four, so the inverse is that expression.
  9. f⁻¹(x) = (5 − x)/4

Answer (5 − x)/4

The lesson, step by step

Step 1 of 8

What fg Means (Higher)

fg(x) means put x into g, then put the answer into f. The function next to x goes first.

Worked example

  1. 1

    — the two functions; find fg(3)

  2. 2

    — g first: it is next to the 3

  3. 3

    — then f takes the 7

Common mistake

Working out f(3) first. Read fg(3) as f(g(3)): the inside bracket comes first.

Key idea

Getting dressed is a composite function: first socks, then shoes. Swap the order and you get shoes, then socks on top. Now you know why and are usually different!

See this step move in Lemmara

Step 2 of 8

fg(x) as an Expression

“Find fg(x)” means put the whole of g(x) in place of x in f. Use a bracket.

Worked example

  1. 1

    — g(x) goes into f, so the x in f is replaced by g(x).

  2. 2

    — Every x in f becomes (2x + 1). Keep the bracket.

  3. 3

    — A square means times itself, so write the bracket twice.

  4. 4

    — Multiply each term of one bracket by each term of the other.

  5. 5

    — Collect like terms: 2x + 2x = 4x, and 1 − 4 = −3.

fg(x)

g first, then f.

gf(x)

f first, then g.

See this step move in Lemmara

Step 3 of 8

A Function Twice

Putting a function into itself is a composite function too. The inside goes first, as always.

Worked example

  1. 1

    — pp(−1) means p(p(−1)). Work out the inside p(−1) first.

  2. 2

    — Put −1 into p. Use a bracket to keep the negative sign.

  3. 3

    — 4 × −1 = −4, then −4 − 7 = −11.

  4. 4

    — Now put that answer, −11, into p.

  5. 5

    — 4 × −11 = −44, then −44 − 7 = −51.

Worked example

  1. 1

    — For the expression, put the whole of p(x) into p.

  2. 2

    — Every x in p becomes (4x − 7). Keep the bracket.

  3. 3

    — Multiply out the bracket: 4 × 4x and 4 × −7.

  4. 4

    — −28 − 7 = −35.

Key idea

Check with the number: . It matches above.

See this step move in Lemmara

Step 4 of 8

Solving fg(x) = k

Find fg(x) first. Then it is an ordinary equation.

Worked example

  1. 1

    — This is fg(x) from the fg(x) card, set equal to 5.

  2. 2

    — Take 5 from both sides, so one side is 0.

  3. 3

    — Divide every term by 4 to make the numbers smaller.

  4. 4

    — Factorise: the numbers +2 and −1 multiply to −2 and add to 1.

  5. 5

    — One of the brackets must be 0, so solve each one.

  6. 6

    — Check x = −2: g first, then f. The answer is 5, so it works.

  7. 7

    — Check x = 1 the same way. It also gives 5.

See this step move in Lemmara

Step 5 of 8

Solving fg(x) > 0

Some 4-mark questions ask for an inequality. Find where it equals 0, then use the shape.

Worked example

  1. 1

    — This is fg(x) > 0. First find where it equals 0.

  2. 2

    — Factorise the expression.

  3. 3

    — Set each bracket to 0: 2x + 3 = 0 gives −3/2, and 2x − 1 = 0 gives 1/2. These are the crossing points.

  4. 4

    — So the graph is a U-shape, opening upwards.

  5. 5

    — A U-shape is above 0 outside the two crossing points.

Common mistake

Writing −3/2 < x < 1/2. That part is below the x-axis, where fg(x) < 0.

See this step move in Lemmara

Step 6 of 8

Inverse of a Composite (Higher)

The 5-mark question: find fg(x), complete the square, then find the inverse.

Worked example

  1. 1

    — Here h = fg for x ≥ −2. First put g into f.

  2. 2

    — Every x in f becomes (x + 3). Keep the brackets.

  3. 3

    — Expand (x + 3)². Then multiply both terms of the second bracket by −2.

  4. 4

    — Collect like terms.

  5. 5

    — Complete the square: half of 4 is 2, and (x + 2)² has an extra 4, so take 4 away.

  6. 6

    — −4 + 3 = −1.

  7. 7

    — Write y for h(x), then add 1 to both sides.

  8. 8

    — Square root both sides. A square has two roots.

  9. 9

    — x ≥ −2 means x + 2 is 0 or more, so keep the plus. Then take 2 from both sides.

  10. 10

    — Swap y for x.

Key idea

For swap and solve, see Inverse Functions.

See this step move in Lemmara

Step 7 of 8

Inverse of fg Without Expanding (Higher)

Sometimes you need the inverse of fg. You can skip the expanding: undo the functions in the reverse order.

Formula

Rule

does first, then . To undo it, undo first, then . So goes in first and goes outside.

Worked example

  1. 1

    — Undo +1 with −1, then undo ×2 with ÷2.

  2. 2

    — Undo −3 with +3.

  3. 3

    — f⁻¹ goes in first, because f was the last function to be applied.

  4. 4

    — Put f⁻¹(x) into g⁻¹, which adds 3.

  5. 5

    — Write 3 as 6/2, so the fractions have the same bottom.

  6. 6

    — Add the tops: x − 1 + 6 = x + 5.

  7. 7

    — Check: expand fg first, then swap and solve 2x − 5. It gives the same answer.

Common mistake

Using the same order as fg. The inverse of is , not .

See this step move in Lemmara

Step 8 of 8

Which Method? Read the Question

Find what goes in first.

You seeYou do
fg(3)g(3) first, then f
fg(x)Put g(x) into f, with a bracket
fg(x) = 5Find fg(x), then solve
fg(x) > 0Solve = 0, then use the shape
(fg)⁻¹ or h⁻¹Find fg(x), then swap and solve

Key idea

fg and gf are usually different. Always check which letter is next to x.

See this step move in Lemmara

More real exam questions on this

Solve one in Lemmara and see where every mark goes.

All 83 questions on this topic

Lemmara is an independent study tool, not affiliated with or endorsed by Cambridge International Education or Pearson Edexcel. The lessons and worked examples are Lemmara’s own.

Try a real exam question on this

Solve it →