Derivative of Composite Function

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


 * $\forall x \in \R: \map h x = \map {f \circ g} x = \map f {\map g x}$

Then:
 * $\map {h'} x = \map {f'} {\map g x} \map {g'} x$

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

Using the $D_x$ notation:


 * $\map {D_x} {\map f {\map g x} } = \map {D_{\map g x} } {\map f {\map g x} } \map {D_x} {\map g x}$

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

Proof
Let $\map g x = y$, and let:

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

and:
 * $(1): \quad \dfrac {\delta y} {\delta x} \to \map {g'} x$

There are two cases to consider:

Case 1
Suppose $\map {g'} x \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 $\map {g'} x = 0$ and that $\delta x$ is small but non-zero.

Again, there are two possibilities:

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

Hence the result.

Case 2b
If $\delta y \ne 0$, then:
 * $\dfrac {\map h {x + \delta x} - \map h x} {\delta x} = \dfrac {\map f {y + \delta y} - \map f y} {\delta y} \dfrac {\delta y} {\delta x}$

As $\delta y \to 0$:


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

Thus:
 * $\ds \lim_{\delta x \mathop \to 0} \frac {\map h {x + \delta x} - \map h x} {\delta x} \to 0 = \map {f'} y \map {g'} x$

Again, hence the result.

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

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

where:
 * $\dfrac {\d y} {\d x}$ is the derivative of $y$ with respect to $x$
 * $\dfrac {\d y} {\d u}$ is the derivative of $y$ with respect to $u$
 * $\dfrac {\d u} {\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