Chain Rule

Statement

Consider a function f(u(x)). Then

\frac{d}{dx}f(u(x))=\frac{df}{du}\frac{du}{dx}

Proof

This proof is taken from Khan Academy.

To prove the chain rule, we must first prove 2 lemmas:

  • If a function is differentiable, then it is also continuous
  • If function u is continuous at x, then \Delta u \to 0 as \Delta x \to 0

If a function is differentiable, then it is also continuous

By the definition of the derivative:

\displaystyle \lim_{x\to c} \frac{f(x)-f(c)}{x-c}=f^\prime(c)

A function is continuous at a point, c, if

  • c is in the domain of f(x)
  • \displaystyle \lim_{x\to c} f(x) = f(c)

Assume that f(x) is differentiable at c. Then,

\begin{array}{rcl}  \displaystyle \lim_{x\to c} \left( \,f(x)-f(c)\,\right) &=& \displaystyle \lim_{x\to c} (x-c)\frac{f(x)-f(c)}{x-c}\\  \, &\,& \, \\  \text{By the properties of limits:} &\,& \, \\  \, &\,& \, \\  \displaystyle \lim_{x\to c} \left( \,f(x)-f(c)\,\right) &=&\underbrace{\displaystyle \lim_{x\to c} \left( \,f(x)-f(c)\,\right)}_{0}\underbrace{\left(\displaystyle \lim_{x\to c}  \,\frac{f(x)-f(c)}{x-c}\,\right)}_{f^\prime(c)}\\  \, &\,& \, \\  &=& 0  \end{array}

So,

\begin{array}{rcl}  \displaystyle \lim_{x\to c} \left( \,f(x)-f(c)\,\right)&=&0\\  \, &\,& \, \\  \displaystyle \lim_{x\to c} f(x) - \underbrace{\displaystyle \lim_{x\to c}f(c)}_{f(c)}&=&0\\  \, &\,& \, \\  \displaystyle \lim_{x\to c} f(x) &=& f(c)  \end{array}

But \displaystyle \lim_{x\to c} f(x) &=& f(c), by definition, means that f(x) is continuous at c.

If function u is continuous at x, then \Delta u \to 0 as \Delta x \to 0

By definition, u(x) is continuous at x=c if

  • c is in the domain of f(x)
  • \displaystyle \lim_{x\to c} u(x) &=& u(c)

We can rewrite the last equation in a couple of different ways:

\begin{array}{rcl}  \displaystyle \lim_{x\to c} u(x) &=& u(c)\\  \, &\,& \, \\  \displaystyle \lim_{x\to c} u(c) &=& u(c)\\  \, &\,& \, \\  \text{Therefore,} &\,& \, \\  \, &\,& \, \\  \displaystyle \lim_{x\to c} u(x) &=& \displaystyle \lim_{x\to c}u(c)\\  \, &\,& \, \\  \displaystyle \lim_{x\to c} u(x) - \displaystyle \lim_{x\to c}u(c)&=&0\\  \, &\,& \, \\  \displaystyle \lim_{x\to c} \left( \,u(x)-u(c)\,\right)&=&0\\  \end{array}

Let

  • \Delta u = u(x)-u(c)
  • \Delta x = x-c

We can substitute these values into the equation \displaystyle \lim_{x\to c} \left( \,u(x)-u(c)\,\right)=0: We get:

\displaystyle \lim_{\Delta x\to 0} \Delta u = 0

This is equivalent to saying that, as \Delta x \to 0, \Delta u \to 0, which is what we sought to prove.

Proof of the chain rule

With the background laid, we are now ready to prove the chain rule.

We start by assuming that functions y and u are differentiable at x. We can write the chain rule as:

\frac{d}{dx}\left[ y(u(x)) \right] = \frac{dy}{dx} = \frac{dy}{du}\cdot\frac{du}{dx}:

By the definition of the derivative:

\frac{dy}{dx} = \displaystyle \lim_{\Delta x\to 0} \frac{\Delta y}{\Delta x}

Now

\frac{\Delta y}{\Delta u} = \frac{\Delta y}{\Delta u}\cdot\frac{\Delta u}{\Delta x}

Substituting this into our previous definition of \frac{dy}{dx}:

\frac{dy}{dx} = \displaystyle \lim_{\Delta x\to 0} \frac{\Delta y}{\Delta u}\cdot\frac{\Delta u}{\Delta x}=\displaystyle \lim_{\Delta x\to 0} \frac{\Delta y}{\Delta u}\cdot\underbrace{\displaystyle \lim_{\Delta x\to 0}\frac{\Delta u}{\Delta x}}_{\frac{du}{dx}}

We showed in our proof of our second lemma that, as \Delta x \to 0, \Delta u \to 0. We substitute \Delta u \to 0 for \Delta x \to 0 in the limit \displaystyle \lim_{\Delta x\to 0} \frac{\Delta y}{\Delta u}:

\displaystyle \lim_{\Delta x\to 0} \frac{\Delta y}{\Delta u} \to \displaystyle \lim_{\Delta u\to 0} \frac{\Delta y}{\Delta u}

But we know what \displaystyle \lim_{\Delta u\to 0} \frac{\Delta y}{\Delta u} is; it’s the derivative \frac{dy}{du}.

Thus, we have:

\frac{dy}{dx} =\underbrace{\displaystyle \lim_{\Delta u\to 0} \frac{\Delta y}{\Delta u}}_{\frac{dy}{du}}\cdot\underbrace{\displaystyle \lim_{\Delta x\to 0}\frac{\Delta u}{\Delta x}}_{\frac{du}{dx}}

So we end up with

\frac{dy}{dx}=\frac{dy}{du}}\cdot\frac{du}{dx}

which is what we wanted to prove.