Skip to main content

Subsection 2.9.3 Chain Rule Examples

We'll now use the chain rule to compute some more derivatives.

Find \(\diff{}{x}\big(1+3x\big)^{75}\text{.}\)

This is a concrete version of Example 2.9.8. We are to find the derivative of a function that is built up by first computing \(1+3x\) and then taking the \(75^{\rm th}\) power of the result. So we set

\begin{align*} f(u)&=u^{75} & f'(u)&=75 u^{74}\\ g(x)&=1+3x & g'(x)&=3\\ F(x)&=f\big(g(x)\big)=g(x)^{75}=\big(1+3x\big)^{75} \end{align*}

By the chain rule

\begin{align*} F'(x)&= f'\big(g(x)\big)\,g'(x) = 75\, g(x)^{74} \,g'(x) = 75\, \big(1+3x\big)^{74} \cdot 3\\ &= 225\, \big(1+3x\big)^{74} \end{align*}

Find \(\diff{}{x}\sin(x^2)\text{.}\)

In this example we are to compute the derivative of \(\sin\) with a (slightly) complicated argument. So we apply the chain rule with \(f\) being \(\sin\) and \(g(x)\) being the complicated argument. That is, we set

\begin{align*} f(u)&=\sin u & f'(u)&=\cos u\\ g(x)&=x^2 & g'(x)&=2x\\ F(x)&=f\big(g(x)\big)=\sin\big(g(x)\big)=\sin(x^2) \end{align*}

By the chain rule

\begin{align*} F'(x)&= f'\big(g(x)\big)\,g'(x) = \cos\big(g(x)\big) \,g'(x) = \cos(x^2) \cdot 2x\\ &= 2x\cos(x^2) \end{align*}

Find \(\diff{}{x}\root{3}\of{\sin(x^2)}\text{.}\)

In this example we are to compute the derivative of the cube root of a (moderately) complicated argument, namely \(\sin(x^2)\text{.}\) So we apply the chain rule with \(f\) being “cube root” and \(g(x)\) being the complicated argument. That is, we set

\begin{align*} f(u)&=\root{3}\of{u}=u^{\tfrac{1}{3}} & f'(u)&=\tfrac{1}{3}u^{-\tfrac{2}{3}}\\ g(x)&=\sin(x^2) & g'(x)&=2x\cos(x^2)\\ F(x)&=f\big(g(x)\big)=\root{3}\of{g(x)}=\root{3}\of{\sin(x^2)} \end{align*}

In computing \(g'(x)\) here, we have already used the chain rule once (in Example 2.9.12). By the chain rule

\begin{align*} F'(x)&= f'\big(g(x)\big)\,y'(x) = \tfrac{1}{3} g(x)^{-\tfrac{2}{3}} \cdot 2x\cos(x^2)\\ &= \frac{2x}{3}\,\frac{\cos(x^2)}{[\sin(x^2)]^{\frac{2}{3}}} \end{align*}

Find the derivative of \(\diff{}{x} f(g(h(x)))\text{.}\)

This is very similar to the previous example. Let us set \(F(x) = f(g(h(x)))\) with \(u=g(h(x))\) then the chain rule tells us

\begin{align*} \diff{F}{x} &= \diff{f}{u} \cdot \diff{u}{x}\\ &= f'(g(h(x))) \cdot \diff{}{x} g(h(x))\\ \end{align*}

We now just apply the chain rule again

\begin{align*} &= f'(g(h(x))) \cdot g'(h(x)) \cdot h'(x). \end{align*}

Indeed it is not too hard to generalise further (in the manner of Example 2.6.6 to find the derivative of the composition of 4 or more functions (though things start to become tedious to write down):

\begin{align*} \diff{}{x} f_1(f_2(f_3(f_4(x)))) &= f'_1(f_2(f_3(f_4(x)))) \cdot \diff{}{x} f_2(f_3(f_4(x)))\\ &= f'_1(f_2(f_3(f_4(x)))) \cdot f'_2(f_3(f_4(x))) \cdot \diff{}{x} f_3(f_4(x))\\ &= f'_1(f_2(f_3(f_4(x)))) \cdot f'_2(f_3(f_4(x))) \cdot f'_3(f_4(x)) \cdot f'_4(x) \end{align*}

We can also use the chain rule to recover Corollary 2.4.6 and from there we can use the product rule to recover the quotient rule.

We want to differentiate \(F(x) = \frac{1}{g(x)}\) so set \(f(u) = \frac{1}{u}\) and \(u=g(x)\text{.}\) Then the chain rule tells us

\begin{align*} \diff{}{x} \left\{\frac{1}{g(x)}\right\} = \diff{F}{x} &= \diff{f}{u} \cdot \diff{u}{x}\\ &= \frac{-1}{u^2} \cdot g'(x)\\ &= -\frac{g'(x)}{g(x)^2}. \end{align*}

Once we know this, a quick application of the product rule will give us the quotient rule.

\begin{align*} \amp\diff{}{x} \left\{ \frac{f(x)}{g(x)} \right\} = \diff{}{x} \left\{ f(x) \cdot \frac{1}{g(x)} \right\} & \text{use PR}\\ &= f'(x)\cdot \frac{1}{g(x)} + f(x) \cdot \diff{}{x} \left\{\frac{1}{g(x)}\right\} & \text{use the result from above}\\ &= f'(x)\cdot \frac{1}{g(x)} - f(x) \cdot \frac{g'(x)}{g(x)^2} & \text{place over a common denominator}\\ &= \frac{f'(x) \cdot g(x) - f(x) \cdot g'(x)}{g(x)^2} \end{align*}

which is exactly the quotient rule.

Compute the following derivative:

\begin{gather*} \diff{}{x}\cos\left(\frac{x^5\sqrt{3+x^6}}{{(4+x^2)}^3}\right) \end{gather*}

This time we are to compute the derivative of \(\cos\) with a really complicated argument.

  • So, to start, we apply the chain rule with \(g(x)=\frac{x^5\sqrt{3+x^6}}{{(4+x^2)}^3}\) being the really complicated argument and \(f\) being \(\cos\text{.}\) That is, \(f(u)=\cos(u)\text{.}\) Since \(f'(u)=-\sin(u)\text{,}\) the chain rule gives
    \begin{gather*} \diff{}{x}\cos\bigg(\frac{x^5\sqrt{3+x^6}}{{(4+x^2)}^3}\,\bigg) =-\sin\bigg(\frac{x^5\sqrt{3+x^6}}{{(4+x^2)}^3}\,\bigg)\ \diff{}{x} \left\{\frac{x^5\sqrt{3+x^6}}{{(4+x^2)}^3} \right\} \end{gather*}
  • This reduced our problem to that of computing the derivative of the really complicated argument \(\tfrac{x^5\sqrt{3+x^6}}{{(4+x^2)}^3}\text{.}\) We can think of the argument as being built up out of three pieces, namely \(x^5\text{,}\) multiplied by \(\sqrt{3+x^6}\text{,}\) divided by \({(4+x^2)}^3\text{,}\) or, equivalently, multiplied by \({(4+x^2)}^{-3}\text{.}\) So we may rewrite \(\tfrac{x^5\sqrt{3+x^6}}{{(4+x^2)}^3}\) as \(x^5\,\big(3+x^6\big)^{\frac{1}{2}}\ {(4+x^2)}^{-3}\text{,}\) and then apply the product rule to reduce the problem to that of computing the derivatives of the three pieces.
  • Here goes (recall Example 2.6.6):
    \begin{align*} \diff{}{x}\big[x^5\,{(3+x^6)}^{\frac{1}{2}}\ {(4+x^2)}^{-3}\big] &=\diff{}{x}\big[x^5\big] \cdot {(3+x^6)}^{\frac{1}{2}}\cdot {(4+x^2)}^{-3}\\ &\phantom{=} +x^5\cdot \diff{}{x}\big[{(3+x^6)}^{\frac{1}{2}}\big] \cdot {(4+x^2)}^{-3}\\ &\phantom{=} +x^5\cdot {(3+x^6)}^{\frac{1}{2}}\cdot \diff{}{x}\big[{(4+x^2)}^{-3}\big] \end{align*}
    This has reduced our problem to computing the derivatives of \(x^5\text{,}\) which is easy, and of \({(3+x^6)}^{\frac{1}{2}}\) and \({(4+x^2)}^{-3}\text{,}\) both of which can be done by the chain rule. Doing so,
    \begin{align*} \diff{}{x}\big[x^5\,{(3+x^6)}^{\frac{1}{2}}\ {(4+x^2)}^{-3}\big] &=\overbrace{\diff{}{x}\big[x^5\big]}^{5x^4} \cdot{(3+x^6)}^{\frac{1}{2}}\cdot {(4+x^2)}^{-3}\\ & \phantom{=}+x^5\cdot \overbrace{\diff{}{x}\big[{(3+x^6)}^{\frac{1}{2}}\big]}^ {\frac{1}{2}(3+x^6)^{-\frac{1}{2}}\cdot 6x^5} \cdot {(4+x^2)}^{-3}\\ &\phantom{=} +x^5\cdot{(3+x^6)}^{\frac{1}{2}}\cdot \overbrace{\diff{}{x}\big[{(4+x^2)}^{-3}\big]}^ {-3{(4+x^2)}^{-4}\cdot 2x} \end{align*}
  • Now we can clean things up in a sneaky way by observing

    • differentiating \(x^5\text{,}\) to get \(5x^4\text{,}\) is the same as multiplying \(x^5\) by \(\frac{5}{x}\text{,}\) and
    • differentiating \({(3+x^6)}^{\frac{1}{2}}\) to get \(\frac{1}{2}(3+x^6)^{-\frac{1}{2}}\cdot 6x^5\) is the same as multiplying \({(3+x^6)}^{\frac{1}{2}}\) by \(\frac{3x^5}{3+x^6}\text{,}\) and
    • differentiating \({(4+x^2)}^{-3}\) to get \(-3{(4+x^2)}^{-4}\cdot 2x\) is the same as multiplying \({(4+x^2)}^{-3}\) by \(-\frac{6x}{4+x^2}\text{.}\)

    Using these sneaky tricks we can write our solution quite neatly:

    \begin{align*} \amp\diff{}{x}\cos\bigg(\frac{x^5\sqrt{3+x^6}}{{(4+x^2)}^3}\,\bigg)\\ \amp=-\sin\bigg(\frac{x^5\sqrt{3+x^6}}{{(4+x^2)}^3}\,\bigg)\ \frac{x^5\sqrt{3+x^6}}{{(4+x^2)}^3}\ \bigg\{\frac{5}{x}+\frac{3x^5}{3+x^6}-\frac{6x}{4+x^2}\bigg\} \end{align*}
  • This method of cleaning up the derivative of a messy product is actually something more systematic in disguise — namely logarithmic differentiation. We will come to this later.