Chain Rule

 

Chain Rule

Given {y=f(x)} and {x=g(u)} the chain rule tells us that:

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

The chain rule also extends to functions of multiple variables. Given {z=f(x(t), y(t))} where both {x} and {y} are functions of another variable {t}, differentiating gives:

\displaystyle \frac{dz}{dt}=\frac{\partial f}{\partial x}\frac{dx}{dt}+\frac{\partial f}{\partial y}\frac{dy}{dt}

This is the rate of change of the surface height with respect to a change in {t}.

An easy way of conceptualising the chain rule is by using a dependency tree. Lets consider a more complex example where again {z=f(x,y)} but now {x=h(s,t)} and {y=k(s,t)}. The dependency tree with partial derivatives looks like:

dependencytree

To find the derivative of {z} with respect to {s} we multiply the partial derivatives along each branch leading to {s} and then add together each of these products. For example:
\displaystyle \frac{dz}{ds}=\frac{\partial z}{\partial x}\frac{\partial x}{\partial t}+\frac{\partial z}{\partial y}\frac{\partial y}{\partial t}

Then we simply compute all the partial derivatives, multiply and add together to find the change in surface height {z} with respect to {t}.