CSEC Mathematics · relations, functions and graphs
Composition of Functions
Before you start
In functional notation, f(x) represents the output when x is fed into the function rule f. To evaluate f(3), you simply substitute 3 everywhere x appears in the formula.
Builds on: Functional Notation
1. Understanding Composite Functions and the Order of Operations
Imagine two machines linked together on a factory floor in Kingston. You drop raw sugar cane into Machine g, which crushes it into juice. Then, that juice is fed directly into Machine f, which boils it into syrup. The output of the first machine becomes the input of the second.
In mathematics, combining two functions this way is called the composition of functions, and the result is a composite function.
When we write fg(x), we mean f(g(x)). Notice the order carefully:
- The function written closest to the variable acts first.
- For fg(x), the inner function g acts on x first, and the result is substituted into f.
- For gf(x), the function f acts on x first, and that result is substituted into g.
Important: Composite functions do not mean multiplication! fg(x) does not mean f(x)×g(x). Furthermore, in almost every case, fg(x)=gf(x). The order in which you apply the functions changes the outcome.
Worked example
Given the functions f(x)=3x−2 and g(x)=4x+1, derive expressions in simplest form for:
(a) fg(x)
(b) gf(x)
- For fg(x), substitute the entire expression g(x)=4x+1 into f(x) wherever x appears: fg(x)=f(4x+1)
- Apply the rule for f: f(4x+1)=3(4x+1)−2
- Expand the brackets and simplify: 12x+3−2=12x+1
- For gf(x), substitute f(x)=3x−2 into g(x): gf(x)=g(3x−2)
- Apply the rule for g: g(3x−2)=4(3x−2)+1
- Expand the brackets and simplify: 12x−8+1=12x−7
Answer: fg(x)=12x+1 and gf(x)=12x−7
Quick check
If h(x)=2x and k(x)=x+5, which expression represents hk(x)?
2. Evaluating Composite Functions for Specific Values
In CSEC exams, you will often be asked to find a numerical value such as fg(4) or gf(−2).
You can solve these using one of two methods:
1. Inside-out method (Recommended): Work out the number from the inside function first, then feed that answer into the outer function. For example, to find fg(4), first calculate the value of g(4), and then plug that resulting number into f.
2. Algebraic method: Find the general formula for fg(x) first, and then substitute the number into your simplified expression.
The inside-out method is generally faster and less prone to algebraic slip-ups, especially under exam pressure.
Worked example
Given f(x)=2x2−3 and g(x)=34x−1, calculate the value of fg(4).
- Evaluate the inner function g(4) first: g(4)=34(4)−1
- Simplify the fraction: g(4)=316−1=315=5
- Now substitute this output 5 into the outer function f: f(5)=2(5)2−3
- Square the 5 first according to BODMAS: 2(25)−3=50−3=47
Answer: 47
Quick check
Given f(x)=3x+2 and g(x)=x2−5, determine the value of gf(1).
3. Composing Rational Functions and Simplifying Expressions
Many Paper 2 questions involve algebraic fractions (rational functions). When substituting one function into a fraction, take your time with the algebraic simplification:
- Put brackets around the substituted expression so signs and multipliers are distributed correctly.
- Combine like terms in the denominator carefully.
- Factorise where possible to write the expression in its simplest form.
Remember that a rational expression is undefined when its denominator equals zero.
Worked example
Two functions are defined by f(x)=x−312 and g(x)=2x+5.
(a) Find an expression in its simplest form for fg(x).
(b) State the value of x for which fg(x) is undefined.
- Substitute g(x) into f(x): fg(x)=f(2x+5)=(2x+5)−312
- Simplify the denominator by collecting like terms: 2x+212
- Factorise the common factor of 2 from the denominator: 2(x+1)12
- Divide numerator and denominator by 2 to write in simplest form: x+16
- The function is undefined when the denominator equals zero: x+1=0⟹x=−1
Answer: (a) fg(x)=x+16, (b) x=−1
Quick check
Given p(x)=3x+28 and q(x)=x−4, derive an expression in simplest form for pq(x).
Common mistakes
- Treating composition as multiplication: writing fg(x)=(3x−2)(4x+1) instead of substituting (4x+1) into the x position of f(x).
- Working from left to right instead of right to left: calculating f first when asked for fg(x), rather than evaluating g(x) first.
- Forgetting brackets during substitution: writing 3×4x+1 instead of 3(4x+1), which leads to incorrect expansion.
In the exam
- For numerical questions like fg(3), calculate the inner value g(3) first; CXC awards method marks for this intermediate step.
- Always state restrictions if asked (e.g. where the denominator is zero), as this often carries an independent 1-mark question in Paper 2.
- Show every expansion step clearly when asked for an expression 'in its simplest form' to secure full algebraic working marks.
Key terms
- Composite function
- A function formed by applying one function to the result of another, written as fg(x)=f(g(x)).
- Inner function
- The function that acts first on the input value (in fg(x), g is the inner function).
- Undefined
- A point where a function cannot produce a real value, such as division by zero in a fraction.
Practice
Easier to harder. Use paper for your working.
Practice 1
The functions f and g are defined by f(x)=5x−4 and g(x)=2x+3. Calculate the value of fg(2).
Practice 2
The functions f and g are defined as f(x)=x2+1 and g(x)=2x−3. Determine an expression in its simplest form for gf(x).
Practice 3
Given that h(x)=x−12x+5 and k(x)=3x−2, calculate the exact value of hk(−1).
Now try real past-paper questions
3 Paper 2 questions on this topic. Quelpr marks your working point by point, like an examiner.
- CSEC Mathematics · 2021 · Paper 2 · Q4 4(b)(ii) · 2 marksGiven that f(x)=31x+4 and g(x)=x+13x, Calculate the value of fg(−3).
- Mathematics Q8 8(a)(ii)a) · 2 marksThe functions f and g are defined by f(x) = 9 / (2x + 1) and g(x) = x - 3. Find, in its simplest form, expressions for fg(x).
- Mathematics Q4 4(a)(ii) · 2 marksGiven functions f(x) = 4x - 7 and g(x) = (3x + 1)/2. Determine the values of: fg(5)
Finished the lesson?
0 of 6 checks right on this device.
Read more
- algebra-and-trigonometry-2e_-_WEB, p. 245
- CSEC Maths Study Guide - Maths Crash Course, pp. 176, 197, 210, 211
- Mathematics for CSEC, pp. 320, 321
- Collins - Concise Revision Course for CSEC Mathematics, p. 347
- precalculus-2e_-_WEB, p. 82