Skip to main content

Section 10.2 The Chain Rule

Subsection 10.2.1 Multivariable Composition

We defined partial derivatives to measure rates of change in a particular variable. We extended this to change in any unit direction with directional derivatives. We can extend this even further, but considering the change in a function as we move along a parametric curve in the domain.

Let \(f(x,y,z): \RR^3 \rightarrow\RR\text{,}\) be a potential energy function. Let \(\gamma(t) = (x(t), y(t), z(t))\) be a curve moving through \(\RR^3\text{.}\) I want to know how quickly energy is gained or lost move along the path \(\gamma\text{.}\) The energy along \(\gamma\) is \(f(\gamma(t)) = f(x(t), y(t), z(t))\text{.}\) The rate of change is \(\frac{df}{dt}\text{.}\) But now \(f\) is a composition, \(f(\gamma(t))\text{,}\) so this must be a chain rule calculation. What is the chain rule when we have three (or more) components?.

Subsection 10.2.2 The Chain Rule

For reference, here is the chain rule in \(\RR^3\text{.}\)

\begin{equation*} \frac{d}{dt} f((x(t), y(t), z(t)) = \frac{\del f}{\del x} \frac{dx}{dt} + \frac{\del f}{\del y} \frac{dy}{dt} + \frac{\del f}{\del z} \frac{dz}{dt} \end{equation*}

This is a slightly strange extension of the single-variable chain rule. Originally, the chain rule was for any composition. However, the chain rule is very specifically for the composition of a scalar field with a parameteric curve. However, upon reflection, you could realize that this is really the only possibility. If \(f\) and \(g\) are both functions \(\RR^3 \rightarrow \RR\text{,}\) then the composition \(f \circ g\) or \(g \circ f\) isn't even defined. The output of one is a scalar, but the input needs to be a vector. The only reasonable composition using the function we already know is to compose with a parametric curce, since a parametric curve outputs a vector. In Calculus IV, we will work with vector fields which could allow for other compositions, but for now, this is the only possibility.

Subsection 10.2.3 Chain Rule Examples

\begin{align*} f(x,y) \amp = x^2y + 3xy \\ \gamma(t) \amp = \left( \frac{t^2}{4}, 1-t^3 \right) \\ \frac{d}{dt} f(\gamma(t)) \amp = \frac{\del f}{\del x} \frac{dx}{dt} + \frac{\del f}{\del y} \frac{dy}{dt} \\ \amp = (2xy + 3y) \frac{t}{2} + (x^2 + 3x) (-3t^2) \end{align*}

The variables are now mixed, so I have to make replacements. I repalce \(x\) and \(y\) with the matching components of the parametric curve. This matches what we do with the single variable chain rule: we differentiate then we replace the variable. The single variable notation, with the evaluation bar, it not typically used in multivariable situations.

\begin{align*} \amp = \left( 2 \frac{t^2}{4} (1-t^3) + 3(1 - t^3) \right) \frac{t}{2} + \left( \left( \frac{t^2}{4} \right)^2 + 3 \frac{t^2}{4} \right) (-3t^2) \\ \amp = \frac{t^2 - t^5}{4} + \frac{3t}{2} - \frac{3t^4}{2} + \frac{-3t^6 + -36t^4}{16} \\ \amp = \frac{24t + 4t^2 - 60t^4 - 4t^5 - 3t^6}{16} \end{align*}

Consider the potential gravitational energy function

\begin{equation*} P = - \frac{GmM}{r} = \frac{-GmM}{\sqrt{x^2 + y^2 + z^2}} \end{equation*}

If we move along a curve \(\gamma\text{,}\) it is nice to know how the potential energy changes. A helical path out of the gravity well might be \(\gamma(t) = (\sin t, \cos t, t)\text{.}\) We differentiate along this path using the chain rule.

\begin{align*} \frac{dP}{dt} \amp = \frac{\del P}{\del x} \frac{dx}{dt} + \frac{\del P}{\del y} \frac{dy}{dt} + \frac{\del P}{\del z} \frac{dz}{dt}\\ \amp = \frac{GmMx}{(x^2 + y^2 + z^2)^{\frac{3}{2}}} \frac{dx}{dt} + \frac{GmMy}{(x^2 + y^2 + z^2)^{\frac{3}{2}}} \frac{dy}{dt} + \frac{GmMz}{(x^2 + y^2 + z^2)^{\frac{3}{2}}} \frac{dz}{dt}\\ \amp = \frac{GmM\sin t}{(1 + t^2)^{\frac{3}{2}}} \cos t + \frac{GmM\cos t}{(1 + t^2)^{\frac{3}{2}}} (-\sin t) + \frac{GmMt}{(1 + t^2)^{\frac{3}{2}}} 1\\ \amp = \frac{GmMt}{\sqrt{(1+t^2)^3}} \end{align*}

Notice that if we let \(|\gamma(t)| = \sqrt{1 + t^2}\) at the start, we could have written \(P(t) = \frac{-GmM}{|\gamma(t)|} = \frac{-GmM}{\sqrt{1+t^2}}\) and the \(P^\prime(t) = \frac{GmMt}{\sqrt{(1+t^2)^3}}\) could have been calculated directly. That would have been easier, but its nice to get confirmation that working with the chain rule leads to the right result.