Step by Step
1
Identify the inner and outer functions
In f(g(x)), g(x) is the inner function and f(x) is the outer function.
2
Evaluate the inner function first
Work out g(x) completely before touching f.
3
Substitute the entire result into the outer function
Take your full result from g(x) and substitute it everywhere an x appears in f(x) — every single x, not just some of them.
4
Simplify the outer function
Simplify the resulting expression, being careful with exponents and distribution, especially when substituting an entire expression rather than a single number.
Applied Walkthrough
1
Given f(x) = x² + 3x + 1 and g(x) = 3x, find f(g(x)).
2
Since g goes first, note that g(x) = 3x is the entire expression you'll substitute into f.
3
Substitute 3x everywhere x appears in f(x): f(3x) = (3x)² + 3(3x) + 1.
4
Simplify carefully: (3x)² = 9x² (not 3x² — square the entire expression, coefficient included), so the final answer is 9x² + 9x + 1.
Exam Application
Exams test whether you correctly identify which function goes first (the inner one), whether you replace every instance of x in the outer function, and whether you correctly square or manipulate the entire substituted expression rather than just part of it.
⚠ Common Trap
The most common trap is squaring only the variable and forgetting the coefficient — (3x)² is 9x², not 3x². When you substitute an entire expression, every part of that expression gets affected by the outer function's operations.
✓ Quick Self-Check
1. In f(g(x)), which function is evaluated first?
g(x), the inner function.
Tap to reveal / hide
2. Given f(x) = x² + 3x + 1 and g(x) = 3x, find f(g(x)).
9x² + 9x + 1.
Tap to reveal / hide
3. What is (3x)²?
9x² — not 3x²; the entire expression, including the coefficient, gets squared.
Tap to reveal / hide
4. When substituting g(x) into f(x), how many x's in f get replaced?
All of them — every instance of x in the outer function.
Tap to reveal / hide
5. What's the most common function composition mistake?
Forgetting to apply an outer operation (like squaring) to the entire substituted expression, not just part of it.
Tap to reveal / hide