← Back to FractionRush

Advanced Functions

Grade 10 · Algebra · Cambridge IGCSE · Age 14–15

Welcome to Advanced Functions!

Functions are one of the most powerful tools in mathematics. In this topic you will master composite functions (combining two functions), inverse functions (reversing a function), and domain & range (understanding valid inputs and outputs). These ideas underpin all of A-Level mathematics.

f∘g(x) = fg(x) = f(g(x))  |  f⁻¹ reverses f  |  ff⁻¹(x) = x

Composite Functions

fg(x) = f(g(x)) — apply g first, then f

Inverse Functions

Swap x↔y and rearrange for f⁻¹(x)

Domain & Range

Valid inputs and possible outputs

Worked Examples

6 step-by-step examples

Visualiser

Function machine — plot fg and gf

Exercises

5 sets × 8 questions + Practice + Challenge

1. Composite Functions

A composite function is one function applied to the output of another. The notation fg(x) means "apply g first, then apply f to the result."

fg(x) = f(g(x)) — evaluate g(x) first, then substitute into f
Example: f(x) = 2x + 1, g(x) = x²
fg(x) = f(g(x)) = f(x²) = 2(x²) + 1 = 2x² + 1
gf(x) = g(f(x)) = g(2x+1) = (2x+1)² = 4x² + 4x + 1

Notice: fg(x) ≠ gf(x) — order matters!
Evaluating fg(3):
Step 1: g(3) = 3² = 9
Step 2: f(9) = 2(9) + 1 = 19

Alternatively: fg(3) = 2(3²) + 1 = 2(9) + 1 = 19 ✓
Memory trick: fg(x) — read right to left. g is closer to x so g acts first. Think of it like getting dressed: socks (g) go on before shoes (f).

Three-Function Composition

For fgh(x), apply h first, then g, then f — always work right to left.

f(x) = x+1, g(x) = 2x, h(x) = x²:
fgh(x) = f(g(h(x))) = f(g(x²)) = f(2x²) = 2x² + 1
fgh(3) = h(3)=9, g(9)=18, f(18)=19 → 19

Solving fg(x) = k

Solve fg(x) = 19 where f(x)=2x+1, g(x)=x²:
fg(x) = 2x² + 1 = 19
2x² = 18 → x² = 9 → x = ±3

2. Inverse Functions

The inverse function f⁻¹(x) reverses the effect of f(x). If f maps x to y, then f⁻¹ maps y back to x.

Method: write y = f(x) → swap x and y → rearrange to make y the subject → that's f⁻¹(x)
Find f⁻¹(x) for f(x) = 3x − 2:
Step 1: y = 3x − 2
Step 2: swap: x = 3y − 2
Step 3: rearrange: x + 2 = 3y → y = (x+2)/3
So: f⁻¹(x) = (x+2)/3

Verify: f(f⁻¹(x)) = 3·(x+2)/3 − 2 = x+2−2 = x ✓
Find f⁻¹(x) for f(x) = (2x+1)/(x−3):
y = (2x+1)/(x−3)
Swap: x = (2y+1)/(y−3)
Multiply: x(y−3) = 2y+1
xy − 3x = 2y + 1
xy − 2y = 3x + 1
y(x−2) = 3x + 1
f⁻¹(x) = (3x+1)/(x−2)
Key fact: The graph of f⁻¹(x) is the reflection of the graph of f(x) in the line y = x. The domain of f⁻¹ equals the range of f, and the range of f⁻¹ equals the domain of f.
One-to-one requirement: An inverse only exists if the function is one-to-one (each output comes from exactly one input). f(x) = x² is NOT one-to-one over all reals, so its inverse only exists when the domain is restricted to x ≥ 0.

3. Domain, Range and Restrictions

The domain is the set of all valid input values (x-values). The range is the set of all possible output values (y-values).

f(x) = 1/(x−2):
Domain: x ≠ 2 (cannot divide by zero)
Range: f(x) ≠ 0 (the fraction can never equal zero)
f(x) = √(x+3):
Domain: x+3 ≥ 0 → x ≥ −3
Range: f(x) ≥ 0 (square root is never negative)
Domain of fg(x): first need g(x) to be in the domain of f
Example: f(x) = √x, g(x) = x−4 — find domain of fg(x):
fg(x) = f(g(x)) = √(x−4)
Need: x−4 ≥ 0 → domain of fg is x ≥ 4
Piecewise function example:
f(x) = 2x + 1 for x ≥ 0; f(x) = x² for x < 0
f(3) = 2(3)+1 = 7;   f(−2) = (−2)² = 4
Domain: all real numbers; Range: f(x) ≥ 0
Watch out for: division by zero (exclude that value), square roots of negatives (need ≥ 0 inside), logarithms (need > 0 inside).

Example 1 — Find fg(x) and gf(x)

Given: f(x) = 3x + 2, g(x) = x² − 1
fg(x) = f(g(x)) = f(x²−1) = 3(x²−1) + 2 = 3x² − 3 + 2 = 3x² − 1
gf(x) = g(f(x)) = g(3x+2) = (3x+2)² − 1 = 9x² + 12x + 4 − 1 = 9x² + 12x + 3
Note: fg ≠ gf in general — always check the order carefully.

Example 2 — Evaluate fg(a) for specific value

Given: f(x) = 2x − 5, g(x) = x + 3. Find fg(4).
Step 1: g(4) = 4 + 3 = 7
Step 2: f(7) = 2(7) − 5 = 14 − 5 = 9
Check via formula: fg(x) = 2(x+3)−5 = 2x+1; fg(4) = 9 ✓

Example 3 — Find inverse of a linear function

Given: f(x) = 5x − 3. Find f⁻¹(x).
y = 5x − 3 → swap: x = 5y − 3
x + 3 = 5y → y = (x+3)/5
f⁻¹(x) = (x+3)/5

Example 4 — Inverse of a fractional function

Given: f(x) = (x+1)/(x−2). Find f⁻¹(x).
x = (y+1)/(y−2) → x(y−2) = y+1 → xy−2x = y+1
xy − y = 2x + 1 → y(x−1) = 2x+1
f⁻¹(x) = (2x+1)/(x−1)

Example 5 — Domain and Range

f(x) = √(2x−6): need 2x−6 ≥ 0 → x ≥ 3
Domain: x ≥ 3. Range: f(x) ≥ 0.
g(x) = 3/(x+5): need x+5 ≠ 0 → x ≠ −5. Range: g(x) ≠ 0.

Example 6 — Solve fg(x) = k

f(x) = x + 3, g(x) = x². Solve fg(x) = 12.
fg(x) = x² + 3 = 12 → x² = 9 → x = ±3

Common Mistakes

  • Mistake 1: fg(x) = f(x) × g(x)
    Wrong! fg means composition — apply g first, then f. It is NOT multiplication. f(x)·g(x) is written f(x)g(x) or [f(x)][g(x)], never fg(x).
  • Mistake 2: Reversing the order — thinking fg means f first
    fg(x) = f(g(x)) — g is applied FIRST. The function nearest to x is always applied first. Many students apply f first and get the wrong answer.
  • Mistake 3: Inverse rearrangement error — not swapping x and y
    You MUST swap x and y before rearranging. A common error is to just rearrange y=f(x) for x without swapping, which gives the wrong expression.
  • Mistake 4: Domain errors — forgetting to exclude values
    For 1/(x−3), the domain is x ≠ 3, not x > 3. For √(x−5), you need x−5 ≥ 0, so domain is x ≥ 5, not x > 5 (equality is included).
  • Mistake 5: Range of f⁻¹ = domain of f (not range of f)
    The domain and range swap when you take an inverse. Domain of f⁻¹ = Range of f. Range of f⁻¹ = Domain of f. Don't mix these up.

Key Formulas & Notation

ConceptNotation / FormulaMeaning
Composite functionfg(x) or f∘g(x)f(g(x)) — apply g first, then f
Evaluate compositefg(a): g(a) first, then f(result)Work step by step
Inverse functionf⁻¹(x)Reverses f: write y=f(x), swap x↔y, rearrange for y
Verify inverseff⁻¹(x) = x and f⁻¹f(x) = xBoth compositions give x
Domain restrictionf(x)=1/(x−a): x ≠ aExclude value making denominator zero
Square root domainf(x)=√(g(x)): g(x) ≥ 0Expression under root must be non-negative
Domain of fgNeed g(x) in domain of fg(x) must produce values f can accept
Inverse graphf⁻¹ is reflection of f in y = xCoordinates swap: (a,b) → (b,a)

Function Machine Visualiser

Enter simple polynomial expressions for f and g (use x as variable, e.g. "2*x+1" or "x*x"). The visualiser will plot fg(x) in pink and gf(x) in blue, and compute f⁻¹ for linear f.

Enter expressions and click Plot.

Exercise 1 — Evaluating Composite Functions

f(x) = 2x + 3, g(x) = x². Give exact numeric answers.

1. Find fg(2). [fg(x)=2x²+3; fg(2)=2(4)+3]

2. Find gf(2). [gf(x)=(2x+3)²; gf(2)=(7)²]

3. Find fg(3).

4. Find gf(1). [gf(1)=(2+3)²=25]

5. Find fg(0). [fg(0)=2(0)+3=3]

6. Find gf(0). [gf(0)=(3)²=9]

7. Find fg(−1). [fg(−1)=2(1)+3=5]

8. Find gf(−1). [gf(−1)=(−2+3)²=(1)²=1]

Exercise 2 — Inverse Functions

Find f⁻¹(a) for the given value. Show your working on paper.

1. f(x) = x + 5. Find f⁻¹(8). [f⁻¹(x)=x−5]

2. f(x) = 2x − 1. Find f⁻¹(7). [f⁻¹(x)=(x+1)/2]

3. f(x) = 3x + 6. Find f⁻¹(0). [f⁻¹(x)=(x−6)/3]

4. f(x) = 4x − 8. Find f⁻¹(4). [f⁻¹(x)=(x+8)/4]

5. f(x) = (x+3)/2. Find f⁻¹(5). [f⁻¹(x)=2x−3]

6. f(x) = x/3 + 2. Find f⁻¹(5). [f⁻¹(x)=3(x−2)=3x−6]

7. f(x) = 5x + 10. Find f⁻¹(−5). [f⁻¹(x)=(x−10)/5]

8. f(x) = 2x + 4. Find f⁻¹(10). [f⁻¹(x)=(x−4)/2]

Exercise 3 — Domain and Range

Enter the boundary or excluded value as a number.

1. f(x)=1/(x−4). Enter the excluded domain value.

2. f(x)=√(x−7). Enter the minimum domain value.

3. f(x)=1/(x+3). Enter the excluded domain value.

4. f(x)=√(x+9). Enter the minimum domain value.

5. f(x)=√(3x−12). Enter the minimum domain value.

6. f(x)=1/(2x−10). Enter the excluded domain value.

7. fg(x) where f(x)=√x and g(x)=x−6. Enter minimum domain value for fg.

8. fg(x) where f(x)=1/x and g(x)=x−5. Enter excluded domain value for fg.

Exercise 4 — Solving fg(x) = k

Find the positive solution for x (or the single solution given).

1. f(x)=x+1, g(x)=x². Solve fg(x)=5. Give positive x. [x²+1=5 → x²=4]

2. f(x)=2x, g(x)=x+3. Solve fg(x)=10. [2(x+3)=10 → x+3=5]

3. f(x)=x−4, g(x)=x². Solve fg(x)=0. Give positive x. [x²−4=0]

4. f(x)=3x+1, g(x)=x−2. Solve fg(x)=7. [3(x−2)+1=7 → 3x−5=7]

5. f(x)=x², g(x)=2x+1. Solve gf(x)=9. Give positive x. [(2x+1)=9 → nope: gf(x)=(2x+1)² wait — gf means f first... gf(x)=g(f(x))=g(x²)=2x²+1=9 → x²=4]

6. f(x)=x+2, g(x)=x². Solve fg(x)=11. Give positive x. [x²+2=11 → x²=9]

7. f(x)=4x, g(x)=x−1. Solve fg(x)=12. [4(x−1)=12 → x−1=3]

8. f(x)=x+5, g(x)=x². Solve fg(x)=14. Give positive x. [x²+5=14 → x²=9]

Exercise 5 — Combined and Three-Function Composition

f(x)=x+1, g(x)=2x, h(x)=x². Give exact numeric answers.

1. Find fgh(2). [h(2)=4, g(4)=8, f(8)=9]

2. Find fgh(3). [h(3)=9, g(9)=18, f(18)=19]

3. Find ghf(2). [f(2)=3, h(3)=9, g(9)=18]

4. Find hgf(1). [f(1)=2, g(2)=4, h(4)=16]

5. Find fhg(2). [g(2)=4, h(4)=16, f(16)=17]

6. Find ggf(1). g∘g∘f: f(1)=2, g(2)=4, g(4)=8]

7. Find ffg(3). [g(3)=6, f(6)=7, f(7)=8]

8. Find hfg(2). [g(2)=4, f(4)=5, h(5)=25]

Practice — 25 Questions

Mixed questions. f(x)=3x+1, g(x)=x²−2, h(x)=2x unless stated.

1. fg(2): g(2)=2, f(2)=3(2)+1 → fg(2)=3(x²−2)+1 at x=2 → 3(2)+1

2. fg(3): g(3)=7, f(7)=22

3. gf(2): f(2)=7, g(7)=47

4. gf(1): f(1)=4, g(4)=14

5. hf(3): f(3)=10, h(10)=20

6. fh(4): h(4)=8, f(8)=25

7. f⁻¹(x)=(x−1)/3. Find f⁻¹(10).

8. f⁻¹(4).

9. f⁻¹(−2).

10. p(x)=2x−8. Find p⁻¹(0). [p⁻¹(x)=(x+8)/2]

11. p⁻¹(6). [(6+8)/2=7]

12. q(x)=x/4+3. Find q⁻¹(5). [q⁻¹(x)=4(x−3)]

13. q⁻¹(7).

14. f(x)=1/(x−5). Excluded domain value?

15. f(x)=√(x−9). Minimum domain value?

16. f(x)=1/(x+7). Excluded domain value?

17. fg(x)=x²+1 with f(x)=x+1. Solve fg(x)=10. Give positive x. [x²=9]

18. fg(x)=2x²+1. Solve fg(x)=19. Give positive x. [2x²=18 → x²=9]

19. gf(x)=(3x+1)²−2. Find gf(0). [(1)²−2=−1]

20. gf(−1). gf(−1)=(−2)²−2=2

21. fgh(2): h(2)=4, g(4)=14, f(14)=43

22. fgh(1): h(1)=1, g(1)=−1, f(−1)=−2

23. s(x)=4x−12. Find s⁻¹(0). [s⁻¹(x)=(x+12)/4]

24. s⁻¹(8). [(8+12)/4=5]

25. f(x)=√(2x−4). Minimum domain value? [2x≥4 → x≥2]

Challenge — 12 Questions

Harder problems involving inverse of fractional functions and combined domain restrictions.

1. f(x)=(2x+1)/(x−3). Find f⁻¹(x). Evaluate f⁻¹(5). [y=(3x+1)/(x−2); f⁻¹(5)=(16)/(3)≈5.33]

2. f(x)=(x+4)/(x−1). Find f⁻¹(3). [f⁻¹(x)=(x+4)/(x−1); swap: x=(y+4)/(y−1) → y=(x+4)/(x−1); f⁻¹(3)=7/2=3.5]

3. f(x)=3x−7, g(x)=x²+1. Solve fg(x)=20. Give positive x. [3(x²+1)−7=20 → 3x²=24 → x²=8 → x=2√2≈2.83]

4. f(x)=(5x−1)/(2). Find f⁻¹(7). [f⁻¹(x)=(2x+1)/5; (14+1)/5=3]

5. f(x)=2x+3, g(x)=√x. Domain of gf(x)? Enter minimum value. [gf(x)=√(2x+3); 2x+3≥0 → x≥−1.5]

6. f(x)=x+2, g(x)=x², h(x)=3x. Find fgh(1). [h(1)=3, g(3)=9, f(9)=11]

7. f(x)=(x−1)/(x+2). Find f⁻¹(0). [x=(y−1)/(y+2) → x(y+2)=y−1 → y(x−1)=−2x−1 → y=(−2x−1)/(x−1); f⁻¹(0)=(0−1)/(0−1)=1]

8. p(x)=x²−5, q(x)=2x+1. Solve pq(x)=−1. Give positive x. [p(2x+1)=(2x+1)²−5=−1 → (2x+1)²=4 → 2x+1=2 → x=0.5]

9. f(x)=1/(2x+6). Excluded domain value? [2x+6=0 → x=−3]

10. f(x)=√(4−x). Maximum domain value? [4−x≥0 → x≤4; boundary=4]

11. f(x)=2x+1, g(x)=3x−2. Find fg⁻¹(4). [g⁻¹(x)=(x+2)/3; g⁻¹(4)=2; f(2)=5]

12. f(x)=x³. Find f⁻¹(27). [f⁻¹(x)=∛x; f⁻¹(27)=3]

Exam Style — 5 Questions

Cambridge IGCSE style questions. Show all working on paper. Enter numeric answers.

[3 marks] f(x) = 4x − 3 and g(x) = x² + 2.
(a) Find fg(x) as an expression. The coefficient of x² in fg(x) is 4.
Enter the coefficient of x².

[3 marks] f(x) = 5x + 2. Find f⁻¹(x) and evaluate f⁻¹(17). [f⁻¹(x)=(x−2)/5; f⁻¹(17)=15/5=3]

[4 marks] f(x) = (3x+1)/(x−2). Find f⁻¹(x). Evaluate f⁻¹(4). [swap: x=(3y+1)/(y−2) → x(y−2)=3y+1 → xy−2x=3y+1 → y(x−3)=2x+1 → y=(2x+1)/(x−3); f⁻¹(4)=9/1=9]

[3 marks] f(x) = 2x − 6 and g(x) = x². Solve fg(x) = 12. Give positive x. [2x²−6=12 → 2x²=18 → x²=9 → x=3]

[3 marks] f(x) = 1/(x+k) has excluded domain value x = −4. State the value of k. [x+k=0 when x=−4 → k=4]