Functions – Composite Functions (IGCSE Additional Mathematics 0606)
Learning Objective
Students will be able to:
- Form and use composite functions.
- Explain why the order of composition matters.
- Determine the domain and range of a composite function.
- Restrict domains to obtain one‑to‑one functions, find inverses, and interpret graphs (including absolute‑value forms).
1. Key Definitions and Notation
| Concept | Definition | Typical Example |
| Function |
A rule that assigns to each element of a set domain exactly one element of a set range. |
\(f(x)=2x+3\) Domain \(\mathbb R\) Range \(\mathbb R\) |
| Domain |
All real numbers for which the expression defining the function is defined. |
\(g(x)=\sqrt{x+5}\) Domain \(x\ge -5\) |
| Range |
All possible output values of the function. |
\(h(x)=x^{2}\) Range \(y\ge0\) |
| One‑to‑one (injective) |
Each element of the range is produced by at most one element of the domain. |
\(f(x)=3x+1\) is one‑to‑one; \(g(x)=x^{2}\) is not (because \(g(2)=g(-2)\)). |
| Many‑to‑one |
Two or more different domain values give the same range value. |
\(g(x)=x^{2}\) on \(\mathbb R\). |
| Inverse function \((f^{-1})\) |
If \(f\) is one‑to‑one, \(f^{-1}\) reverses the mapping: \(f^{-1}(f(x))=x\) and \(f(f^{-1}(x))=x\). |
\(f(x)=2x+3\;\Rightarrow\;f^{-1}(x)=\tfrac12(x-3)\) |
| Composite function |
Applying one function to the result of another.
Notation:
- \((f\circ g)(x)=f\bigl(g(x)\bigr)\) – “first \(g\), then \(f\)”.
- \((g\circ f)(x)=g\bigl(f(x)\bigr)\) – “first \(f\), then \(g\)”.
- \((f\circ g\circ h)(x)=f\bigl(g(h(x))\bigr)\) – read from right to left.
|
\(f(x)=2x+3,\;g(x)=x^{2}-1\)
\((f\circ g)(x)=2x^{2}+1,\;(g\circ f)(x)=4x^{2}+12x+8\). |
| Absolute‑value form \(|f(x)|\) |
Replaces every output \(y\) of \(f\) by its distance from the \(x\)-axis; the graph is reflected above the axis wherever \(f(x)<0\). |
\(f(x)=x-2\) → \(|f(x)|=\begin{cases}x-2,&x\ge2\\-(x-2),&x<2\end{cases}\) |
2. Why the Order of Composition Matters
- In general \((f\circ g)(x)eq(g\circ f)(x)\). Swapping the order changes the algebraic expression, the domain, and often the range.
- Only when two functions *commute* (a rare situation) will the two compositions be identical.
- Reading the notation from right to left helps avoid mistakes: the right‑most function acts first.
3. Forming a Composite Function – Step‑by‑Step Procedure
- Identify the inner function. This is the function that acts on the variable \(x\) first.
- Replace every occurrence of \(x\) in the outer function with the whole inner expression. Keep the parentheses.
- Simplify algebraically. Expand, factor, combine fractions, etc., only as far as needed.
- Determine the domain.
- Start with the domain of the inner function.
- From that set keep only the values for which the inner output lies in the domain of the outer function (watch for denominators, square‑roots, logarithms, etc.).
4. Worked Example (Linear ↔ Quadratic)
Let \(f(x)=2x+3\) and \(g(x)=x^{2}-1\).
- \((f\circ g)(x)\) – “\(g\) first, then \(f\)”
(f∘g)(x)=f(g(x))=2\bigl(x^{2}-1\bigr)+3
=2x^{2}-2+3=2x^{2}+1.
Domain: \(g\) is defined for all real \(x\); \(f\) has no restriction ⇒ domain \(\mathbb R\).
- \((g\circ f)(x)\) – “\(f\) first, then \(g\)”
(g∘f)(x)=g(f(x))=(2x+3)^{2}-1
=4x^{2}+12x+9-1=4x^{2}+12x+8.
Domain: both \(f\) and \(g\) are defined for all real numbers ⇒ domain \(\mathbb R\).
Since the two results differ, the order of composition is essential.
5. Domain & Range of Composite Functions
For a composite \((f\circ g)\):
- Domain: \(\{x\in\text{Dom}(g)\mid g(x)\in\text{Dom}(f)\}\).
- Range: Apply the range of \(g\) to the function \(f\); often found by algebraic manipulation or by testing extreme values.
| Functions | Domain of \((\text{outer}\circ\text{inner})\) | Resulting Range (brief) |
| \(h(x)=\sqrt{x+5},\;k(x)=\dfrac{1}{x-2}\) |
\(xeq2\) (from \(k\)) and \(\dfrac{1}{x-2}+5\ge0\) ⇒ \(x\le2-\dfrac15\) or \(x\ge2+\dfrac15\). |
Since a square‑root is taken, range \(y\ge0\). |
| \(p(x)=\ln x,\;q(x)=x^{2}\) |
\(x^{2}>0\) ⇒ \(xeq0\). |
\(\ln(x^{2})\) can be any real number ⇒ range \(\mathbb R\). |
6. Inverses – Restricting Domains and Sketching
6.1 Making a function one‑to‑one
Many useful functions (e.g. \(x^{2},\sqrt{x},\sin x\)) are not one‑to‑one on their natural domains. To obtain an inverse we restrict the domain so that the function becomes injective.
- Example: \(f(x)=x^{2}\) on \([0,\infty)\) is one‑to‑one. Its inverse is \(f^{-1}(x)=\sqrt{x}\) with domain \(x\ge0\).
- Example: \(g(x)=\sqrt{x-2}\) (domain \(x\ge2\)) → \(g^{-1}(x)=x^{2}+2\) (domain \(x\ge0\)).
6.2 Finding the inverse (algebraic method)
- Replace \(f(x)\) by \(y\). Write the equation \(y = \text{(expression in }x\text{)}\).
- Swap \(x\) and \(y\) (solve for the new \(y\)).
- Write the result as \(f^{-1}(x)\) and state its domain (the original range).
Example (rational function)
f(x)=\frac{1}{x-1},\;xeq1
y=\frac{1}{x-1}\;\Longrightarrow\;x=\frac{1}{y}+1
\Rightarrow f^{-1}(x)=\frac{1}{x}+1,\;xeq0
6.3 Sketching a function and its inverse
- Draw the graph of \(y=f(x)\) on a set of axes.
- Draw the line \(y=x\) (the line of symmetry for an inverse).
- Reflect each point of the original graph across the line \(y=x\); the reflected curve is the graph of \(y=f^{-1}(x)\).
- Only the portion of the original graph that lies on one side of the horizontal‑line test (i.e., is one‑to‑one) can be reflected.
6.4 Why a function may have **no** inverse
A function fails to have an inverse when it is not one‑to‑one. The horizontal‑line test provides a quick visual check: if any horizontal line cuts the graph in more than one point, the function is not invertible.
Illustration: The parabola \(y=x^{2}\) fails the test because the line \(y=4\) meets it at \(x=2\) and \(x=-2\). Hence no single‑valued inverse exists unless the domain is restricted (e.g., to \(x\ge0\)).
7. Absolute‑Value Forms
The absolute‑value transformation \(|f(x)|\) leaves positive outputs unchanged and reflects negative outputs above the \(x\)-axis.
- Algebraically: \(|f(x)|=\begin{cases}f(x),&f(x)\ge0\\-f(x),&f(x)<0\end{cases}\).
- Graphically: take the part of the graph of \(y=f(x)\) that lies below the axis, flip it upwards, and keep the part already above unchanged.
Example \(f(x)=x-2\):
\(|f(x)|=\begin{cases}x-2,&x\ge2\\-(x-2)=2-x,&x<2\end{cases}\). The vertex of the V‑shape occurs at \((2,0)\).
8. Common Pitfalls & How to Avoid Them
- Swapping the order of composition. Write the inner function first in your working notes.
- Dropping parentheses. When substituting, replace \(x\) with the **entire** inner expression, e.g. \(f(2x+3)\), not \(f(2)x+3\).
- Ignoring domain restrictions. After substitution, re‑check for zero denominators, negative radicands, or non‑positive logarithm arguments.
- Assuming a function has an inverse. Apply the horizontal‑line test; if it fails, restrict the domain or state that no inverse exists.
- Forgetting the absolute‑value effect. Remember that \(|f(x)|\) never yields negative values; adjust the graph accordingly.
9. Practice Questions
- Given \(h(x)=3x-4\) and \(k(x)=\sqrt{x+5}\) (domain \(x\ge-5\)), find \((h\circ k)(x)\) and state its domain.
- For \(p(x)=\dfrac{1}{x}\) and \(q(x)=x-2\), compute \((q\circ p)(x)\), simplify, and give the domain.
- Determine whether \(f(x)=x^{3}\) and \(g(x)=x^{2}\) commute; i.e. check if \(f\circ g = g\circ f\).
- Let \(r(x)=\dfrac{2x+1}{x-3}\) and \(s(x)=\dfrac{5}{x}\). Find \((r\circ s)(x)\) and list all values of \(x\) that must be excluded.
- Find the domain of the composite \((\ln\circ\sqrt{\;})(x)=\ln\bigl(\sqrt{x}\bigr)\). Explain each restriction.
- Given \(f(x)=\dfrac{1}{x-1}\), \(g(x)=\dfrac{x+2}{x}\), and \(h(x)=\sqrt{x-3}\), write \((f\circ g\circ h)(x)\) and state its domain.
- Restrict the domain of \(u(x)=x^{2}\) so that an inverse exists, then find \(u^{-1}(x)\) and sketch both curves (use a simple hand‑drawn sketch or describe the shape).
- Sketch the graph of \(v(x)=|x-2|\) and its inverse (if it exists). Explain why an inverse does or does not exist.
- Find the inverse of the radical function \(w(x)=\sqrt{x-2}\) and state the domain of the inverse.
- Consider the three‑function composition from the extension activity:
- \(f(x)=\dfrac{1}{x}\), \(g(x)=x+2\), \(h(x)=\sqrt{x-1}\) (domain \(x\ge1\)).
- Write \((f\circ g\circ h)(x)\) and \((h\circ g\circ f)(x)\); simplify and give the domains.
10. Answers & Explanations
-
\((h\circ k)(x)=h\bigl(k(x)\bigr)=3\sqrt{x+5}-4\).
Domain: \(x\ge-5\) (required by the square‑root). No further restriction from the linear function.
-
\((q\circ p)(x)=q\bigl(p(x)\bigr)=\dfrac{1}{x}-2=\dfrac{1-2x}{x}\).
Domain: \(xeq0\) (denominator of \(p\)). No extra restriction from \(q\).
-
\(f\circ g(x)=f(g(x))=(x^{2})^{3}=x^{6}\).
\(g\circ f(x)=g(f(x))=(x^{3})^{2}=x^{6}\).
The two expressions are identical ⇒ the functions commute.
-
\[
(r\circ s)(x)=r\!\left(\frac{5}{x}\right)=\frac{2\left(\frac{5}{x}\right)+1}{\frac{5}{x}-3}
=\frac{\frac{10}{x}+1}{\frac{5-3x}{x}}
=\frac{10+x}{5-3x}.
\]
Exclusions: \(x=0\) (from \(s\)) and \(5-3x=0\Rightarrow x=\frac{5}{3}\) (final denominator).
Domain: \(\mathbb R\setminus\{0,\frac{5}{3}\}\).
-
\((\ln\circ\sqrt{\;})(x)=\ln(\sqrt{x})=\tfrac12\ln x\).
Restrictions: \(\sqrt{x}\) needs \(x\ge0\); \(\ln\) needs its argument \(>0\). Hence \(x>0\) (zero is excluded because \(\ln0\) is undefined).
Domain: \(x>0\).
-
First \(h\): \(h(x)=\sqrt{x-3}\) ⇒ \(x\ge3\).
Next \(g\): \(g\bigl(h(x)\bigr)=\dfrac{\sqrt{x-3}+2}{\sqrt{x-3}}\) – denominator \(eq0\) ⇒ \(\sqrt{x-3}eq0\) ⇒ \(x>3\).
Finally \(f\): \(f\bigl(g(h(x))\bigr)=\dfrac{1}{\dfrac{\sqrt{x-3}+2}{\sqrt{x-3}}-1}
=\dfrac{1}{\dfrac{2}{\sqrt{x-3}}}= \dfrac{\sqrt{x-3}}{2}\).
Domain: \(x>3\).
-
Restrict \(u(x)=x^{2}\) to \(x\ge0\). Then \(u\) is one‑to‑one.
Inverse: \(y=x^{2}\Rightarrow x=\sqrt{y}\) ⇒ \(u^{-1}(x)=\sqrt{x}\) with domain \(x\ge0\).
Sketch: a right‑hand half of the parabola for \(u\); the inverse is the same curve reflected across \(y=x\) (still a right‑hand half‑parabola). Both meet at \((0,0)\).
-
\(v(x)=|x-2|\) is V‑shaped, vertex \((2,0)\). Because the graph fails the horizontal‑line test (e.g., the line \(y=1\) meets it at two points), no single‑valued inverse exists. (If the domain were restricted to \(x\ge2\) or \(x\le2\), an inverse could be defined.)
-
Let \(y=\sqrt{x-2}\) ⇒ \(y^{2}=x-2\) ⇒ \(x=y^{2}+2\).
Hence \(w^{-1}(x)=x^{2}+2\) with domain \(x\ge0\) (the range of the original square‑root).
-
(i) \((f\circ g\circ h)(x)\):
\[
h(x)=\sqrt{x-1},\;
g(h)=\sqrt{x-1}+2,\;
f(g(h))=\frac{1}{\sqrt{x-1}+2}.
\]
Domain: \(x\ge1\) (from \(h\)).
(ii) \((h\circ g\circ f)(x)\):
\[
f(x)=\frac{1}{x},\;
g(f)=\frac{1}{x}+2,\;
h(g(f))=\sqrt{\frac{1}{x}+2-1}
=\sqrt{\frac{1}{x}+1}.
\]
Domain: \(\frac{1}{x}+1\ge0\) and denominator \(eq0\) ⇒ \(x>0\).
The two results differ, confirming that order matters.
11. Quick Checklist for Composite Functions
- Write the inner (right‑most) function first.
- Substitute the whole inner expression for every \(x\) in the outer function; keep parentheses.
- Simplify step‑by‑step; expand only when it helps.
- Determine the domain:
- Start with the inner function’s domain.
- Apply any extra restrictions that arise when the inner output is used in the outer function (denominator ≠ 0, radicand ≥ 0, log argument > 0, etc.).
- Check whether the two functions commute only after you have both explicit expressions.
- When an inverse is required, first verify the function is one‑to‑one (or restrict the domain appropriately).
- Remember: \(|f(x)|\) never produces negative values; adjust the graph accordingly.
12. Summary Table
| Notation | Interpretation | Example Result |
| \(f\circ g\) |
Apply \(g\) first, then \(f\). |
\((f\circ g)(x)=2x^{2}+1\) (linear ∘ quadratic). |
| \(g\circ f\) |
Apply \(f\) first, then \(g\). |
\((g\circ f)(x)=4x^{2}+12x+8\). |
| Domain of \((f\circ g)\) |
\(\{x\in\text{Dom}(g)\mid g(x)\in\text{Dom}(f)\}\). |
For \((h\circ k)\) above: \(x\ge-5\). |
| Range of \((f\circ g)\) |
Apply the range of the inner function to the outer function; often found by algebraic analysis. |
For \((f\circ g)\) with \(f(x)=2x+3,\;g(x)=x^{2}-1\), range \(\mathbb R\). |
| Inverse (restricted domain) |
Find \(f^{-1}\) after ensuring \(f\) is one‑to‑one (often by limiting the domain). |
\(f(x)=x^{2},\;x\ge0\;\Rightarrow\;f^{-1}(x)=\sqrt{x},\;x\ge0\). |
| Absolute‑value transformation |
\(|f(x)|\) reflects any negative part of the graph above the \(x\)-axis. |
\(|x-2|=\begin{cases}x-2,&x\ge2\\2-x,&x<2\end{cases}\). |
13. Extension Activity – Three‑Function Composition
Let \(f(x)=\dfrac{1}{x}\), \(g(x)=x+2\), \(h(x)=\sqrt{x-1}\) (domain \(x\ge1\)).
- Write and simplify \((f\circ g\circ h)(x)=f\bigl(g(h(x))\bigr)\).
Answer: \(\displaystyle \frac{1}{\sqrt{x-1}+2},\; \text{domain }x\ge1.\)
- Write and simplify \((h\circ g\circ f)(x)=h\bigl(g(f(x))\bigr)\).
Answer: \(\displaystyle \sqrt{\frac{1}{x}+1},\; \text{domain }x>0.\)
- Compare the two results. Discuss how the order changes both the algebraic form and the domain, reinforcing the central idea that composition is not commutative.