Sub topic 5
Breaking a Function into a Chain of Simpler Ones
Assume you know function notation, domains and ranges, and how to read basic graphs. This chapter focuses on decomposition, which means writing one complicated function as a composition of simpler functions.
What decomposition means
A composite function feeds the output of one function into another:
\[ (f\circ g)(x)=f(g(x)). \]
To decompose a function \(h\), identify an inner function \(g\), which acts first, and an outer function \(f\), which acts second. Then write
\[ h(x)=f(g(x)). \]
The order matters. The expression inside the outermost operation usually suggests the inner function.
Example: a square root function
Consider
\[ h(x)=\sqrt{3x-2}. \]
The expression \(3x-2\) is calculated first. The square root is calculated second. Define
\[ g(x)=3x-2 \]
and
\[ f(u)=\sqrt{u}. \]
The variable \(u\) shows that \(f\) accepts the output of another function. Therefore,
\[ h(x)=f(g(x))=(f\circ g)(x). \]
The domain also follows the chain. Since the square-root function requires a nonnegative input,
\[ 3x-2\geq 0, \]
so \(x\geq \frac23\).
A function can have more than one valid decomposition. For example,
\[ h(x)=(2x+1)^3 \]
can be decomposed as
\[ g(x)=2x+1,\qquad f(u)=u^3. \]
Then \(h=f\circ g\). It can also be viewed as a power applied to a linear expression, but choosing the inner function \(2x+1\) makes the order clear.
A chain with several steps
Some functions contain several nested operations:
\[ h(x)=\sqrt{(x-4)^2+1}. \]
One useful decomposition is
\[ g(x)=(x-4)^2+1,\qquad f(u)=\sqrt{u}. \]
You can decompose \(g\) further:
\[ p(x)=x-4,\qquad q(u)=u^2+1. \]
The full chain is
\[ h(x)=f(q(p(x))). \]
The input passes through \(p\), then \(q\), then \(f\).
def p(x):
return x - 4
def q(u):
return u ** 2 + 1
def f(v):
return v ** 0.5
def h(x):
return f(q(p(x)))
print(h(7)) # 2.0Checking a decomposition
To check your work, substitute the inner function into the outer function. If
\[ f(u)=u^2+5 \]
and
\[ g(x)=3x-1, \]
then
\[ f(g(x))=(3x-1)^2+5. \]
If this matches the original function, the decomposition is correct.
Common errors
- Reversing the order: \(f(g(x))\) is generally different from \(g(f(x))\).
- Choosing only part of a grouped expression as the inner function.
- Forgetting that the outer function's domain must include every output produced by the inner function.
- Assuming there is only one valid decomposition.
Exercise
Decompose h(x) = (5x - 2)^4 into an inner function g and an outer function f, then write h as a composition.
Show answer
Let g(x) = 5x - 2 and f(u) = u^4. Then h(x) = f(g(x)) = (f∘g)(x).