# 10.6 The chain rule

The chain rule is used to find the derivatives of "functions of a function". Mathematically, these are written as

and it’s possible to find this just by known the derivatives of $y(u)$ and $u(x)$.

The proof is a little involved, so for the moment you can find it at http://kruel.co/math/chainrule.pdf.

The result we’re after is that

###### Example 10.6.1

Find the derivative of

What is the first thing to do when approaching a question (well after having considered that the chain rule might be relevant)? We must find the nested functions. I find it helpful to think about the parts I find hard to differentiate. For example, in our example, I know how to differentiate $\frac{1}{\text{some variable}}$, and also $\sqrt{x}+2$ but not

Therefore, it is not unreasonable to create a variable $u:=\sqrt{x}+2$ and try to use the chain rule. We can write

This can be a little confusing, because $x$ no longer seems to appear in the function, but in reality $u$ is implicitly a function of $x$ (i.e. we know that $u$ depends on $x$). Applying the chain rule we know that

$\displaystyle\frac{df}{dx}=\frac{d}{du}\left(\frac{1}{u}\right)\times\frac{d}{% dx}(\sqrt{x}+2)$ | (10.38) |

We now know how to differentiate all the individual pieces. First we know that

$\displaystyle\frac{d}{du}\left(\frac{1}{u}\right)$ | $\displaystyle=\frac{d}{du}\left(u^{-1}\right)$ | (10.39) | ||

$\displaystyle=-u^{-2}$ | (10.40) | |||

$\displaystyle=-\frac{1}{u^{2}}$ | (10.41) | |||

$\displaystyle=-\frac{1}{(\sqrt{x}+2)^{2}}.$ | (10.42) |

Then we can also differentiate $\sqrt{x}+2$ with respect to $x$, which is just

Therefore we get that overall