Skip to main content

Section 1.22 Chain rule

Our current list of derivative rules take into account how the derivative operation interacts with various function arithmetic operations: e.g., addition, scalar multiplication, product, quotient. We round out this discussion by considering another very important function operation: namely, function composition.
The main difficulty in using the chain rule is being able to recognize how a given function \(f\) can be described as a composition of functions \(f(x)=g(u(x))\text{.}\) The procedure below is designed to help you identify the inner function \(u\) in this representation. You do not need to use it when computing derivatives with the chain rule, but it may help you get the hang of this technique. See the first computation in ExampleΒ 1.22.3 for an illustration of ProcedureΒ 1.22.2.

Example 1.22.3. Chain rule.

Compute the derivative of the given function. Your answer should be a chain of equalities with steps justified.
  1. \(\displaystyle h(s)=\sqrt{3s^2+1}\)
  2. \(\displaystyle f(x)=\frac{1}{x^2+2x+3}\)
  3. \(\displaystyle g(x)=\sqrt{\sqrt{x}}\)
  4. \(\displaystyle f(t)=(t^3-t+1)^{100}\sqrt{t^2+t+1}\)
Solution.
  1. We will illustrate ProcedureΒ 1.22.2 for this example. We declare
    \begin{equation*} u=3s^2+1\text{,} \end{equation*}
    from whence we have
    \begin{align*} f(s) \amp = \sqrt{u}\\ u'(s) \amp = 6s\text{.} \end{align*}
    We now compute
    \begin{align*} f'(s) \amp = \frac{d}{du}(\sqrt{u})\cdot u'(s) \amp \text{(chain rule)}\\ \amp = \frac{1}{2\sqrt{u}}\cdot 6s\\ \amp = \frac{3s}{\sqrt{3s^2+1}}\text{.} \end{align*}
    Note that we are careful to leave our final answer entirely in terms of the original variable.
  2. That this is a chain rule computation is more clearly seen after a little algebra:
    \begin{equation*} f(x)=\frac{1}{x^2+2x+3}=(x^2+2x+3)^{-1}\text{.} \end{equation*}
    Thus we have \(f(x)=\frac{1}{u}\text{,}\) where \(u=x^2+2x+3\text{.}\) Following ProcedureΒ 1.22.2, we have
    \begin{align*} f'(x) \amp = \frac{d}{du}\left(\frac{1}{u}\right)\cdot u'(x) \\ \amp = (-1)(u)^{-2}\cdot (X^2+2X+3)' \amp \\ \amp = -(x^2+2x+3)^{-2}(2x+2)\\ \amp = -\frac{2x+2}{(x^2+2x+3)^2}\text{.} \end{align*}
  3. We have \(g(x)=\sqrt{u}\text{,}\) where \(u=\sqrt{x}\text{.}\) Using the chain rule, we thus have
    \begin{align*} g'(x) \amp =\frac{d}{du}(\sqrt{u})\cdot u'(x)\\ \amp = \frac{1}{2\sqrt{u}}\cdot \frac{1}{2\sqrt{x}} \amp (\frac{d}{dx}(\sqrt{x})=1/(2\sqrt{x}))\\ \amp = \frac{1}{2\sqrt{\sqrt{x}}}\cdot \frac{1}{2\sqrt{x}}\\ \amp =\frac{1}{4\sqrt{x\sqrt{x}}}\text{.} \end{align*}
  4. Here we must use the chain rule and the product rule. Let \(g(t)=(t^3-t+1)^{100}\) and \(h(t)=\sqrt{t^2+t+1}\text{.}\) We have
    \begin{align*} f'(t) \amp =g'(t)h(t)+g(t)h'(t)\\ \amp = 100(t^3-t+1)^{99}(t^3-t+1)'h(t)+g(t)\cdot \frac{1}{2\sqrt{t^2+t+1}}\cdot (t^2+t+1)\\ \amp = 100(t^3-t+1)^{99}(3t^2-1)\sqrt{t^2+t+1}\\ \amp + (t^3-t+1)^{100}\cdot \frac{2t+1}{2\sqrt{t^2+t+1}}\text{.} \end{align*}

Remark 1.22.4. β€œBlah formulation” of the chain rule.

The main purpose of ProcedureΒ 1.22.2 is to give you a streamlined, procedural way of identifying a function as a composition of an inner function \(u\) and outer function \(g\text{,}\) and then applying the chain rule appropriately. As you get more accustomed to these computations, you may be able proceed more fluidly. A slightly more casual approach might be described as the β€œblah formulation” of the chain rule. Here is how it works:
  • We describe a function of the form \(f(x)=g(u(x))\) as β€œ\(g\)-of-blah”, where β€œblah” stands for \(u(x)\text{.}\)
  • We remember the chain rule
    \begin{equation*} f'(x)=g(u(x))u'(x) \end{equation*}
    by reciting its blah formulation: the derivative of \(g\)-of-blah is the derivative of \(g\text{,}\) evaluated at blah, times the derivative of blah.
  • The computation is finished by computing the derivative of \(g\text{,}\) evaluating this at blah, and multiplying by the derivative of blah.
Consider the application of the chain rule formula to \(f(x)=\sqrt{x^2+1}\text{.}\) We consider this function as the square root of blah, where blah is \(x^2+1\text{.}\) The chain rule then says the derivative of \(f\) should be the derivative of the square root function, evaluated at blah, times the derivative of blah. This yields
\begin{equation*} f'(x)=\frac{1}{2\sqrt{x^2+1}}\cdot (2x)=\frac{x}{\sqrt{x^2+1}}\text{.} \end{equation*}

Remark 1.22.5. Chain rule enhanced formulas.

Using the chain rule in combination of our existing derivative formulas, leads to simple generalizations of these formulas where we replace the variable \(x\) with an arbitrary differentiable function \(u(x)\text{.}\) We call these β€œchain rule enhanced formulas”.
For example, starting with the power formula
\begin{equation*} \frac{d}{dx}(x^r)=rx^{r-1}\text{,} \end{equation*}
replacing \(x\) with an arbitrary differentiable function \(u=u(x)\text{,}\) and using the chain rule, we obtain the chain rule enhanced formula
\begin{equation} \frac{d}{dx} u^r=ru^{r-1}\cdot u'(x)\text{.}\tag{1.101} \end{equation}
We can expressed the formula (1.101) using our blah formulation of the chain rule as follows:
\begin{equation*} \text{the derivative of blah-to-the-r, is r times blah-to-the-(r-1), times the derivative of blah}\text{.} \end{equation*}
We get various \(n\)-th root derivative formulas by setting \(r=1/n\) for various values of \(n\text{.}\) For example we have
\begin{align} \frac{d}{dx}\sqrt{u} \amp =\frac{1}{2\sqrt{u}}\cdot u'(x)=\frac{u'(x)}{2\sqrt{u}}\tag{1.102}\\ \frac{d}{dx}\sqrt[3]{u} \amp = \frac{1}{3\sqrt[3]{u^2}}\cdot u'(x)=\frac{u'(x)}{3\sqrt[3]{u^2}}\text{,}\tag{1.103} \end{align}
and more generally
\begin{equation} \frac{d}{dx}\sqrt[n]{u}=\frac{1}{n\sqrt[n]{u^{n-1}}}\cdot u'(x)=\frac{u'(x)}{n\sqrt[n]{u^{n-1}}}\text{.}\tag{1.104} \end{equation}
Similarly, for \(n=1,2,\dots\text{,}\) we have
\begin{equation} \frac{d}{dx}\frac{1}{u^n}=-\frac{1}{nu^{n+1}}\cdot u'(x)=-\frac{u'(x)}{nu^{n+1}}\text{.}\tag{1.105} \end{equation}
We end this section with an application of the chain to a physical setting, where we investigate the rate of change of volume of an inflating balloon. Not surprisingly this depends both on the current radius of the balloon, and how fast that radius itself is expanding. The chain rule makes this observation much more precise! This is a first example of what is called a related rates problem. We will see more of these in SectionΒ 1.24.

Example 1.22.6. Inflating a balloon.

The volume \(V\) (in cm\(^3\)) of a spherical inflatable balloon is computed as \(V=\frac{4}{3}\pi r^3\text{,}\) where \(r\) is the radius of the balloon (in cm).
  1. Compute the rate of change of the volume \(V\) with respect to the radius \(r\text{.}\)
  2. Suppose now that while inflating the balloon, the radius \(r\) is given by the function \(r=h(t)\text{.}\) Compute the rate of change of \(V\) with respect to \(t\text{.}\) Leave your answer in terms of \(h\) and \(h'\text{.}\)
Solution.
  1. We have
    \begin{align*} \frac{dV}{dr} \amp =\frac{4}{3}\pi \frac{d}{dr}(r^3) \amp \text{(scal. mult.)}\\ \amp = 4\pi\, r^2 \text{.} \end{align*}
  2. When \(r=h(t)\) is a function of time, the volume \(V\) of the ballon is also a function of time:
    \begin{equation*} V=V(t)=\frac{4}{3}\pi r^3=\frac{4}{3}\pi (h(t))^3\text{.} \end{equation*}
    Using the chain rule, we have
    \begin{align*} \frac{dV}{dt} \amp = \frac{4}{3}\pi \frac{d}{dt}((h(t)^3)' \amp \text{(scal. mult.)}\\ \amp =\frac{4}{3}\pi \cdot 3 (h(t))^2\, h'(t) \amp \text{(chain)}\\ \amp =\underset{\frac{dV}{dr}}{\underbrace{4\pi r^2}}\cdot \underset{\frac{dr}{dt}}{\underbrace{h'(t)}} \text{.} \end{align*}
    We thus see that at any given time \(t_0\text{,}\) the rate of change with respect to \(t\) is the product of the rate of change of volume with respect to \(r\) for the radius value at \(t_0\) (i.e., for \(r_0=h(t_0)\)) and the rate of change of \(r\) with respect to time at that time \(t_0\text{.}\) (Of course this is just as the chain rule predicts: $\frac{dV}{dt}=\frac{dV}{dr}\cdot \frac{dr}{dt}$.) This makes general sense, physically. The rate of change of the radius is acting as a multiplier for the rate of change of the volume with respect to \(t\text{:}\) in particular the greater the rate at which the radius increases, the greater the rate at which the volume increases.