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^{\prime} \left({x}\right) = f^{\prime} \left({g \left({x}\right)}\right) g^{\prime} \left({x}\right)$$.

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).

Leibniz's notation for derivatives ($$\frac{dy}{dx}$$) allows for a particularly elegant statement of this rule:
 * $$\frac{dy}{dx}=\frac{dy}{du}\cdot\frac{du}{dx}$$

where:
 * $$\frac{dy}{dx}$$ is the derivative of $$y$$ with respect to $$x$$;
 * $$\frac{dy}{du}$$ is the derivative of $$y$$ with respect to $$u$$, and
 * $$\frac{du}{dx}$$ 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.

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

Thus:
 * $$\delta y \to 0$$ as $$\delta x \to 0$$, and
 * $$\frac {\delta y} {\delta x} \to g^{\prime} \left({x}\right)$$ (eqn. 1)

There are two cases to consider:

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

Then $$\delta y \ne 0$$ from eqn. 1 above, and:

$$ $$ $$

hence the result.

Case 2
Now suppose $$g^{\prime} \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 $$\frac {h \left({x + \delta x}\right) - h \left({x}\right)} {\delta x} = 0$$.

Hence the result.

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

As $$\delta y \to 0$$:


 * 1) $$\frac {f \left({y + \delta y}\right) - f \left({y}\right)} {\delta y} \to f^{\prime} \left({y}\right)$$;
 * 2) $$\frac {\delta y} {\delta x} \to 0$$.

Thus $$\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.