Lemmara logoLemmaraFree lesson

Composite Functions

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

In the exam for Cambridge IGCSE Maths 0580, Edexcel IGCSE Maths 4MA1, Cambridge O Level Maths 4024 · 66 real past-paper questions below

اقرأ هذا الدرس مشروحاً بالعربي ←

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!

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.

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.

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.

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.

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.

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 .

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.

Practise composite functions now

Interactive visual aids, then real past-paper questions marked on your working like the exam. Free to start.

Practise free on Lemmara

Real past-paper questions on composite functions

Each with a full worked solution.

All 66 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.