← MATH 161 MathScape 0 MATH161

Identifying Composite Functions

6 min read

Jump to a section
Reference: Stewart §2.5

Textbook Reference

Primary source OpenStax Calculus Volume 1, Section 3.6: “The Chain Rule”
Book URL https://openstax.org/details/books/calculus-volume-1

Freely available and openly licensed.


Try This First

Look at the function $h(x) = \sin(x^2)$.

Suppose you evaluate $h$ step by step for $x = 3$:

  1. Compute $x^2 = 9$.
  2. Compute $\sin(9)$.

That is two operations, in order. The chain rule asks: what are those two operations, as functions?

Write $h$ as $f(g(x))$ where:

Before reading on: can you do the same decomposition for $h(x) = (3x^2 + 5)^4$? For $h(x) = \sqrt{\cos x}$?


Prerequisite Check

Before this lesson, make sure you can do all of the following:


Quick Reference

Composite function. $h(x) = f(g(x))$ is the composition of $f$ (outer) and $g$ (inner).

Recognition test. Ask: “What would I compute last if evaluating step by step?” That final operation is the outer function $f$.

Chain rule preview. $h'(x) = f'(g(x)) \cdot g'(x)$: derivative of outer (evaluated at inner) times derivative of inner.


Key Concepts

1. What Makes a Function Composite?

A function is composite when the output of one function ($g$) becomes the input of another ($f$). The key insight: order matters. $f(g(x)) \neq g(f(x))$ in general.

Non-composite (product): $x^2 \sin x$ -- the two functions are multiplied, not composed. Product rule applies.

Composite: $\sin(x^2)$ -- the output of $x^2$ is fed into $\sin$. Chain rule applies.

This distinction drives which differentiation rule you need.


2. Standard Decompositions

Method. Ask: “What would I evaluate last?” That is the outer function $f$. Whatever is the input to that last step is the inner function $g$.

$h(x)$ Outer $f(t)$ Inner $g(x)$ Check: $f(g(x))$
$\sin(x^2)$ $\sin(t)$ $x^2$ $\sin(x^2)$
$(x^3 + 1)^5$ $t^5$ $x^3 + 1$ $(x^3+1)^5$
$\sqrt{3x - 2}$ $\sqrt{t}$ $3x - 2$ $\sqrt{3x-2}$
$e^{x^2}$ $e^t$ $x^2$ $e^{x^2}$
$\ln(\cos x)$ $\ln(t)$ $\cos x$ $\ln(\cos x)$
$\cos^3 x$ $t^3$ $\cos x$ $(\cos x)^3 = \cos^3 x$

3. The Outer vs. Inner Distinction

A common confusion: for $h(x) = \cos^3 x$, students sometimes say the outer function is $\cos$ and the inner is $x^3$. This is backwards.

To evaluate $\cos^3(x)$ for a specific $x$, you first compute $\cos x$, then cube the result. So $\cos x$ is computed first (inner = $g(x) = \cos x$) and cubing happens last (outer = $f(t) = t^3$).

The outer function is always the last operation.


4. Multiple Representations

Verbal description. For $h(x) = \sqrt{\cos x}$:

Function notation. $g(x) = \cos x$, $f(t) = \sqrt{t}$. So $h(x) = f(g(x)) = \sqrt{\cos x}$.

Arrow diagram. $x \xrightarrow{g} \cos x \xrightarrow{f} \sqrt{\cos x}$.

All three representations say the same thing. Choose whichever makes the decomposition clearest.


5. Ask Why: Why Does Correct Decomposition Matter?

The chain rule is $h'(x) = f'(g(x)) \cdot g'(x)$. The two factors come from the outer and inner functions. If you misidentify which is outer and which is inner, the formula gives the wrong answer.

Example. For $h(x) = (2x+1)^3$:

Correct: outer $f(t) = t^3$, inner $g(x) = 2x+1$.

$h'(x) = 3(2x+1)^2 \cdot 2 = 6(2x+1)^2$.

Wrong decomposition (outer $= 2x+1$, inner $= t^3$):

$h'(x) = 2 \cdot 3x^2 = 6x^2$. This is incorrect.

The decomposition determines the differentiation. Getting it wrong is not a small error.


Named Misconception: “It Must Be a Composition”

Not every expression involving a function applied to something is a composition in the chain-rule sense. The chain rule applies only when you have $f(g(x))$ -- a function of a non-trivial function of $x$.

The chain rule does not help with products. Use the product rule for those.


Common Errors

Error Example Correction
Reversed decomposition For $\cos^3 x$: saying outer $= \cos$, inner $= x^3$ Outer is the last step: $f(t) = t^3$, inner is $g(x) = \cos x$
Calling a product a composition Writing $\frac{d}{dx}[x\sin x]$ with the chain rule $x\sin x$ is a product; use the product rule
Forgetting the inner function Saying $h(x) = (x^3+1)^5$ has inner function $x$ The inner function is the entire expression $x^3 + 1$, not just $x$


Common Misconceptions

Common misconception

for $\cos^3 x$, the outer function is cosine and the inner function is cubing.

This is the action-view-of-function error. Reading $\cos^3 x$ procedurally suggests “apply cosine to $x^3$,” but $\cos^3 x$ means $(\cos x)^3$: cosine is applied to $x$ first, then the result is cubed. The outer function is cubing ($f(t) = t^3$) and the inner function is cosine ($g(x) = \cos x$). Reversing the decomposition and applying the chain rule yields $3x^2 \cdot (-\sin(x^3))$, which is the derivative of $\cos(x^3)$, not of $\cos^3 x$. The correct derivative is $3\cos^2 x \cdot (-\sin x) = -3\cos^2 x \sin x$.

Common misconception

every function applied to an expression involving $x$ is a composite that requires the chain rule.

This is a structural identification error. Products of functions are not compositions. The expression $x \sin x$ places $x$ and $\sin x$ in a product relationship; neither function receives the other’s output as its input. Applying the chain rule and writing $\cos(x) \cdot 1 = \cos x$ ignores the factor $x$ and is wrong. The correct rule for products is the product rule: $\frac{d}{dx}[x \sin x] = \sin x + x \cos x$.


Leveled Practice

Level 1 -- Decompose Each Function

Problem 1. For each function, identify the outer function $f$ and the inner function $g$ such that $h(x) = f(g(x))$.

(a) $h(x) = (5x - 3)^7$

(b) $h(x) = \cos(x^4)$

(c) $h(x) = \sqrt{x^2 + 1}$

Show answer

(a) $f(t) = t^7$, $g(x) = 5x - 3$.

(b) $f(t) = \cos t$, $g(x) = x^4$.

(c) $f(t) = \sqrt{t}$, $g(x) = x^2 + 1$.


Problem 2. Which of these require the chain rule, which require the product rule, and which require neither?

(a) $h(x) = x\cos x$

(b) $h(x) = \cos(x^2)$

(c) $h(x) = 3\cos x$

Show answer

(a) $x\cos x$ is a product: product rule.

(b) $\cos(x^2)$ is a composition: chain rule.

(c) $3\cos x$ is a constant multiple: constant multiple rule (no product or chain rule needed).


Level 2 -- Decompose and Preview the Chain Rule

Problem 3. For $h(x) = e^{3x}$: identify $f$ and $g$, then write (but do not yet simplify) the chain rule expression $f'(g(x)) \cdot g'(x)$.

Show answer

$f(t) = e^t$, $g(x) = 3x$.

$f'(t) = e^t$; evaluated at $g(x)$: $f'(g(x)) = e^{3x}$.

$g'(x) = 3$.

Chain rule expression: $e^{3x} \cdot 3 = 3e^{3x}$.


Problem 4. Decompose $h(x) = \sin^4(3x)$ into nested composites. Identify two levels of composition.

Show answer

This has two levels. Start from the outside in:

Outermost: $f(t) = t^4$.

Middle: $m(u) = \sin u$.

Innermost: $g(x) = 3x$.

So $h(x) = f(m(g(x))) = (\sin(3x))^4$.

For the chain rule on nested composites, differentiate from outside in.


Level 3 -- Low-Floor-High-Ceiling Extension

Problem 5 (Extension).

(a) (Floor) Is $h(x) = x^2 + \sin x$ a composite function? Explain.

(b) (Mid) Show that if $h(x) = f(g(x))$ and $g(x) = x$ (the identity), then the chain rule gives $h'(x) = f'(x) \cdot 1 = f'(x)$. Why does this make sense?

(c) (Ceiling) Can a function be both a product and a composition? Give an example and show how it could be differentiated two ways.

Show answer

(a) $x^2 + \sin x$ is NOT a composite; it is a sum. No function is applied to the output of another function here. Use the sum rule.

(b) If $g(x) = x$, then $g'(x) = 1$. The chain rule gives $f'(g(x)) \cdot g'(x) = f'(x) \cdot 1 = f'(x)$. This makes sense: composing $f$ with the identity function does not change $f$, so the derivative should be unchanged.

(c) Yes. Example: $h(x) = x \cdot (x^2 + 1)^{1/2}$. This is a product of $x$ and $\sqrt{x^2+1}$.

Method 1 (product rule): $h'(x) = 1 \cdot \sqrt{x^2+1} + x \cdot \frac{x}{\sqrt{x^2+1}} = \sqrt{x^2+1} + \frac{x^2}{\sqrt{x^2+1}} = \frac{x^2+1+x^2}{\sqrt{x^2+1}} = \frac{2x^2+1}{\sqrt{x^2+1}}$.

Method 2 (rewrite as composite then differentiate): $h(x) = x(x^2+1)^{1/2}$ -- same answer via product rule since the outer product structure cannot be eliminated here. Both methods use the product rule; the $(x^2+1)^{1/2}$ term additionally requires the chain rule to differentiate.


Mastery Checklist

You have mastered this skill when you can do all of the following without referring to notes:


Mental Model

Composition is a pipeline. Input $x$ enters the pipeline, is transformed by $g$ (the first machine), and the result enters $f$ (the second machine). The output is $f(g(x))$.

Identifying a composite means reading the pipeline from right to left: what happens first is $g$ (inner), what happens last is $f$ (outer). The last operation determines the “shape” of the function and is what the derivative must account for first in the chain rule.

When you are unsure, ask: “If I evaluate this by hand for a specific $x$, what operations do I perform in what order?” The last operation is the outer function.


Connections

Within Calculus I (MATH161)


Back to Calculus I Skills | Next: The Chain Rule