Lesson 10: The Chain Rule
Warm-up Problems
For each function \(y\), find functions \(f(x)\) and \(g(x)\) such that \(y = f(g(x))\).
Warm-up Problem 1
\(y = e^{5x}\)
Solution:
Let \(f(x) = e^x\) and \(g(x) = 5x\). Then:
\[y = f(g(x)) = e^{g(x)} = e^{5x}\]Warm-up Problem 2
\(y = \sqrt[5]{\sin(x) + 4x}\)
Solution:
Let \(f(x) = \sqrt[5]{x} = x^{1/5}\) and \(g(x) = \sin(x) + 4x\). Then:
\[y = f(g(x)) = \sqrt[5]{g(x)} = \sqrt[5]{\sin(x) + 4x}\]The Chain Rule
The Chain Rule: Suppose \(y = f(g(x))\). Then,
\[y' = \frac{d}{dx}[f(g(x))] = f'(g(x))\cdot g'(x)\]Similarly, if we let \(u = g(x)\), then
\[y' = \frac{d}{dx}[f(g(x))] = \frac{df}{du}\cdot \frac{du}{dx}\]Important: The chain rule is used to differentiate composite functions. The derivative of the outer function is evaluated at the inner function, then multiplied by the derivative of the inner function.
Example 1: Chain Rule with a Polynomial Inside
Suppose \(y = 3(x^2 - x)^4\). Find \(y'\).
Solution:
Let \(f(x) = 3x^4\) and \(g(x) = x^2 - x\). Note that \(y = f(g(x)) = 3(g(x))^4\). Also:
\[f'(x) = 12x^3\] \[g'(x) = 2x - 1\]Using the chain rule:
\[\begin{align}y' &= f'(g(x))\cdot g'(x)\\ &= 12(x^2 - x)^3(2x - 1)\\ &= 12(x(x - 1))^3(2x - 1)\\ &= 12x^3(x - 1)^3(2x - 1)\end{align}\]Example 2: Chain Rule with a Cube Root
Suppose \(y = \sqrt[3]{6x^2 + 5x - 21}\). Find \(y'\).
Solution:
Rewrite as \(y = (6x^2 + 5x - 21)^{1/3}\).
Let \(f(x) = x^{1/3}\) and \(g(x) = 6x^2 + 5x - 21\). Then:
\[f'(x) = \frac{1}{3}x^{-2/3}\] \[g'(x) = 12x + 5\]Using the chain rule:
\[\begin{align} y' &= f'(g(x))\cdot g'(x)\\ &= \frac{1}{3}(6x^2 + 5x - 21)^{-2/3}(12x + 5)\\ &= \frac{12x + 5}{3(6x^2 + 5x - 21)^{2/3}}\end{align}\]Example 3: Chain Rule with a Negative Exponent
Suppose \(y = \frac{5}{(5 - x^4)^{3/2}}\). Find \(y'\).
Solution:
Rewrite as \(y = 5(5 - x^4)^{-3/2}\).
Let \(f(x) = 5x^{-3/2}\) and \(g(x) = 5 - x^4\). Then:
\[f'(x) = 5 \cdot \left(-\frac{3}{2}\right)x^{-5/2} = -\frac{15}{2}x^{-5/2}\] \[g'(x) = -4x^3\]Using the chain rule:
\[\begin{align} y' &= f'(g(x))\cdot g'(x)\\ &= -\frac{15}{2}(5 - x^4)^{-5/2}(-4x^3)\\ &= \frac{30x^3}{(5 - x^4)^{5/2}}\end{align}\]Example 4: Chain Rule with a Quotient Inside
Suppose \(y = \left(\frac{3x^2}{2x + 4}\right)^3\). Find \(y'\).
Solution:
Let \(f(x) = x^3\) and \(g(x) = \frac{3x^2}{2x + 4}\). Then:
\[f'(x) = 3x^2\]For \(g'(x)\), we use the quotient rule:
\[\begin{align} g'(x) &= \frac{6x(2x + 4) - 3x^2 \cdot 2}{(2x + 4)^2}\\ &= \frac{12x^2 + 24x - 6x^2}{(2x + 4)^2}\\ &= \frac{6x^2 + 24x}{(2x + 4)^2}\end{align}\]Using the chain rule:
\[y' = f'(g(x))\cdot g'(x) = 3\left(\frac{3x^2}{2x + 4}\right)^2 \cdot \frac{6x^2 + 24x}{(2x + 4)^2}\]Simplifying:
\[\begin{align}y'&= 3 \cdot \frac{9x^4}{(2x + 4)^2} \cdot \frac{6x^2 + 24x}{(2x + 4)^2}\\ &= \frac{3 \cdot 9x^4(6x^2 + 24x)}{(2x + 4)^4}\\ &= \frac{27x^4 \cdot 6(x^2 + 4x)}{(2(x + 2))^4}\\ &= \frac{162x^5(x + 4)}{2^4(x + 2)^4}\\ &= \frac{81x^5(x + 4)}{8(x + 2)^4}\end{align}\]Example 5: Chain Rule with Exponential and Trigonometric Functions
Suppose \(y = 6(3e^x + 2\sin(x) + 5)^3\). Find \(y'\).
Solution:
Let \(f(x) = 6x^3\) and \(g(x) = 3e^x + 2\sin(x) + 5\). Then:
\[f'(x) = 18x^2\] \[g'(x) = 3e^x + 2\cos(x)\]Using the chain rule:
\[y' = f'(g(x))\cdot g'(x) = 18(3e^x + 2\sin(x) + 5)^2(3e^x + 2\cos(x))\]