Derivative of Composite Function

Theorem
Let $f, g, h$ be continuous real functions such that:


 * $\forall x \in \R: h \left({x}\right) = f \circ g \left({x}\right) = f \left({g \left({x}\right)}\right)$

Then:
 * $h' \left({x}\right) = f' \left({g \left({x}\right)}\right) g' \left({x}\right)$

where $h'$ denotes the derivative of $h$.

Using the $D_x$ notation:


 * $D_x \left({f \left({g \left({x}\right)}\right)}\right) = D_{g \left({x}\right)} \left({f \left({g \left({x}\right)}\right)}\right) D_x \left({g \left({x}\right)}\right)$

This is often informally referred to as the chain rule (for differentiation).

Proof
Let $g \left({x}\right) = y$, and let:

Thus:
 * $\delta y \to 0$ as $\delta x \to 0$

and:
 * $\dfrac {\delta y} {\delta x} \to g' \left({x}\right) \qquad (1)$

There are two cases to consider:

Case 1
Suppose $g' \left({x}\right) \ne 0$ and that $\delta x$ is small but non-zero.

Then $\delta y \ne 0$ from $(1)$ above, and:

hence the result.

Case 2
Now suppose $g' \left({x}\right) = 0$ and that $\delta x$ is small but non-zero.

Again, there are two possibilities:

Case 2a
If $\delta y = 0$, then $\dfrac {h \left({x + \delta x}\right) - h \left({x}\right)} {\delta x} = 0$.

Hence the result.

Case 2b
If $\delta y \ne 0$, then $\dfrac {h \left({x + \delta x}\right) - h \left({x}\right)} {\delta x} = \dfrac {f \left({y + \delta y}\right) - f \left({y}\right)} {\delta y} \dfrac {\delta y} {\delta x}$.

As $\delta y \to 0$:


 * $(1): \quad \dfrac {f \left({y + \delta y}\right) - f \left({y}\right)} {\delta y} \to f' \left({y}\right)$
 * $(2): \quad \dfrac {\delta y} {\delta x} \to 0$

Thus:
 * $\displaystyle \lim_{\delta x \to 0} \frac {h \left({x + \delta x}\right) - h \left({x}\right)} {\delta x} \to 0 = f^{\prime} \left({y}\right) g^{\prime} \left({x}\right)$

Again, hence the result.

All cases have been covered, so by Proof by Cases, the result is complete.

Notation
Leibniz's notation for derivatives $\left({\dfrac{\mathrm d y}{\mathrm d x}}\right)$ allows for a particularly elegant statement of this rule:
 * $\dfrac{\mathrm d y}{\mathrm d x} = \dfrac{\mathrm d y}{\mathrm d u} \cdot \dfrac{\mathrm d u}{\mathrm d x}$

where:
 * $\dfrac {\mathrm d y} {\mathrm d x}$ is the derivative of $y$ with respect to $x$
 * $\dfrac {\mathrm d y} {\mathrm d u}$ is the derivative of $y$ with respect to $u$
 * $\dfrac {\mathrm d u} {\mathrm d x}$ is the derivative of $u$ with respect to $x$

However, this must not be interpreted to mean that derivatives can be treated as fractions. It simply is a convenient notation.

Also see

 * Chain Rule for Real-Valued Functions


 * Faà di Bruno's Formula