Matheno - Learn Well and Excel

Chain Rule: Problems and Solutions

Are you working to use the Chain Rule in Calculus? Students often initially find it confusing; let’s break it down and develop an easy can’t-fail approach.

Jump down this page to using the Chain rule and: [Power rule] [Exponentials] [Trig Functions] [Product rule & Quotient rule] [Chain rule multiple times] [More problems and University exam problems]

Update: We now have much more more fully developed materials for you to learn about and practice computing derivatives, including several screens on the Chain Rule with more complex problems for you to try. Please visit Chain Rule – Introduction to get started.

It’s all free, and waiting for you! (Why? Just because we’re educators who believe you deserve the chance to develop a better understanding of Calculus for yourself, and so we’re aiming to provide that. We hope you’ll take advantage!)

If you just need practice with calculating derivative problems for now, previous students have found what’s below super-helpful. And if you have questions, please ask on our Forum!

Matheno Essentials: Chain Rule
You can always access our Handy Table of Derivatives and Differentiation Rules via the Key Formulas menu item at the top of every page.
Click to Show/Hide Summary
You must use the Chain rule to find the derivative of any function that is comprised of one function inside of another function.

     For instance, $\left(x^2+1\right)^7$ is comprised of the inner function $x^2 + 1$ inside the outer function $(\boxed{\phantom{\cdots}})^7.$
As another example, $e^{\sin x}$ is comprised of the inner function $\sin x$ inside the outer function $e^{\boxed{\phantom{\cdots}}}.$
As yet another example, $\ln{(t^3 – 2t^2 +5)}$ is comprised of the inner function $t^3 – 2t^2 +5$ inside the outer function $\ln(\boxed{\phantom{\cdots}}).$
Since each of these functions is comprised of one function inside of another function — known as a composite function — we must use the Chain rule to find its derivative, as shown in the problems below.


Tips iconHow can I tell what the inner and outer functions are?
Here’s a foolproof method: Imagine calculating the value of the function for a particular value of $x$ and identify the steps you would take, because you’ll always automatically start with the inner function and work your way out to the outer function.
For example, imagine computing $\left(x^2+1\right)^7$ for $x=3.$ Without thinking about it, you would first calculate $x^2 + 1$ (which equals $3^2 +1 =10$), so that’s the inner function, guaranteed. Then you would next calculate $10^7,$ and so $(\boxed{\phantom{\cdots}})^7$ is the outer function.
This imaginary computational process works every time to identify correctly what the inner and outer functions are.

Chain Rule

Consider a composite function whose outer function is $f(x)$ and whose inner function is $g(x).$ The composite function is thus $f(g(x)).$ Its derivative is given by: \[\bbox[yellow,8px]{ \begin{align*}\left[ f\Big(g(x)\Big)\right]’ &= f’\Big(g(x)\Big) \cdot g'(x) \\[5px]&=\text{[derivative of the outer function, evaluated at the inner function] } \\[5px]&\qquad \times \text{ [derivative of the inner function]}
\end{align*}}\] Alternatively, if we write $y = f(u)$ and $u = g(x),$ then \[\bbox[yellow,8px]{\dfrac{dy}{dx} = \dfrac{dy}{du} \cdot \dfrac{du}{dx} }\]

Informally:

\[ \bbox[10px,border:2px solid blue]{\dfrac{df}{dx} = \left[\dfrac{df}{d\text{(stuff)}}\text{, with the same stuff inside} \right] \times \dfrac{d}{dx}\text{(stuff)} }\] Tips iconEven though few people admit it, almost everyone thinks along the lines of the informal approach in the blue boxes above. We’ll illustrate in the problems below.
Chain Rule Example #1
Differentiate $f(x) = (x^2 + 1)^7$.

Solutions.
We’ll solve this using three different approaches — but we encourage you to become comfortable with the third approach as quickly as possible, because that’s the one you’ll use to compute derivatives quickly as the course progresses.
Solution 1. Let’s use the first form of the Chain rule above: \[\bbox[10px,border:2px dashed blue]{\begin{align*}\left[ f\Big(g(x)\Big)\right]’ &= f’\Big(g(x)\Big) \cdot g'(x) \\[5px]&=\text{[derivative of the outer function, evaluated at the inner function] } \\[5px]&\qquad \times \text{ [derivative of the inner function]}
\end{align*}}\] We have the outer function $f(u) = u^7$ and the inner function $u = g(x) = x^2 +1.$
Then $f'(u) = 7u^6,$ and $g'(x) = 2x.$ Then \begin{align*} f'(x) &= 7u^6 \cdot 2x \\[8px] &= 7(x^2+1)^6 \cdot 2x \quad \cmark \end{align*} We could of course simplify the result algebraically to $14x(x^2+1)^2,$ but we’re leaving the result as written to emphasize the Chain rule term $2x$ at the end.

Solution 2.
Let’s use the second form of the Chain rule above: \[\bbox[10px,border:2px dashed blue]{\dfrac{dy}{dx} = \dfrac{dy}{du} \cdot \dfrac{du}{dx} }\] We have $y = u^7$ and $u = x^2 +1.$
Then $\dfrac{dy}{du} = 7u^6,$ and $\dfrac{du}{dx} = 2x.$ Hence \begin{align*} \dfrac{dy}{dx} &= 7u^6 \cdot 2x \\[8px] &= 7(x^2+1)^6 \cdot 2x \quad \cmark \end{align*} • Solution 3.
Tips iconWith some experience, you won’t introduce a new variable like $u = \cdots$ as we did above.
Instead, you’ll think something like: “The function is a bunch of stuff to the 7th power. So the derivative is 7 times that same stuff to the 6th power, times the derivative of that stuff.” \[ \bbox[10px,border:2px dashed blue]{\dfrac{df}{dx} = \left[\dfrac{df}{d\text{(stuff)}}\text{, with the same stuff inside} \right] \times \dfrac{d}{dx}\text{(stuff)}}\] \begin{align*} f(x) &= (\text{stuff})^7; \quad \text{stuff} = x^2 + 1 \\[12px] \text{Then}\phantom{f(x)= }\\ \frac{df}{dx} &= 7(\text{stuff})^6 \cdot \left(\frac{d}{dx}(x^2 + 1)\right) \\[8px] &= 7(x^2 + 1)^6 \cdot (2x) \quad \cmark \end{align*} Note: You’d never actually write out “stuff = ….” Instead just hold in your head what that “stuff” is, and proceed to write down the required derivatives.
There are lots more completely solved example problems below!
[collapse]
Chain Rule & Power Rule
\begin{align*} \text{If} && f(x) &= (\text{stuff})^n, \\[8px] \text{then} &&\dfrac{df}{dx} &= n(\text{that stuff})^{n-1} \cdot \dfrac{d}{dx}(\text{that stuff}) \end{align*} You'll usually see this written as $$\dfrac{d}{dx}\left(u^n \right) = n u^{n-1} \cdot \dfrac{du}{dx}$$ The following six problems illustrate.
Chain Rule Problem #1
Given $f(x) = \left(3x^2 - 4x + 5\right)^8,$ $f'(x) =$
\begin{array}{lll} \text{(A) }8\left(3x^2 - 4x + 5\right)^7 && \text{(B) }8\left(3x^2 - 4x + 5\right)^7 \cdot (6x -4) && \text{(C) }8(6x - 4)^7 \end{array}
\begin{array}{ll} \ \text{(D) }\left(3x^2 - 4x + 5\right)^8 && \text{(E) none of these} \end{array}
Show/Hide Solution
We’ll solve this two ways. The first is the way most experienced people quickly develop the answer, and that we hope you’ll soon be comfortable with. The second is more formal.

Solution 1 (quick, the way most people reason).
Think something like: “The function is some stuff to the eighth-power. So the derivative is eight times that same stuff to the seventh power, times the derivative of that stuff.” \[ \bbox[10px,border:2px dashed blue]{\dfrac{df}{dx} = \left[\dfrac{df}{d\text{(stuff)}}\text{, with the same stuff inside} \right] \times \dfrac{d}{dx}\text{(stuff)}}\] \begin{align*} f(x) &= (\text{stuff})^8; \quad \text{stuff} = 3x^2 – 4x + 5 \\[12px] \text{Then}\phantom{f(x)= }\\ \dfrac{df}{dx} &= 8(\text{stuff})^7 \cdot \dfrac{d}{dx}\left(3x^2 – 4x + 5\right) \\[8px] &= 8\left(3x^2 – 4x + 5\right)^7 \cdot (6x -4) \implies \text{ (B)} \quad \cmark \end{align*} Note: You’d never actually write out “stuff = ….” Instead just hold in your head what that “stuff” is, and proceed to write down the required derivatives.

Solution 2 (more formal).
Let’s use the first form of the Chain rule above: \[\bbox[10px,border:2px dashed blue]{\begin{align*}\left[ f\Big(g(x)\Big)\right]’ &= f’\Big(g(x)\Big) \cdot g'(x) \\[5px]&=\text{[derivative of the outer function, evaluated at the inner function] } \\[5px]&\qquad \times \text{ [derivative of the inner function]}\end{align*}}\] We have the outer function $f(u) = u^8$ and the inner function $u = g(x) = 3x^2 – 4x + 5.$
Then $f'(u) = 8u^7,$ and $g'(x) = 6x -4.$ Hence \begin{align*} f'(x) &= 8u^7 \cdot (6x – 4) \\[8px] &= 8\left(3x^2 – 4x + 5\right)^7 \cdot (6x-4) \implies \text{ (B)} \quad \cmark \end{align*}
[hide solution]
Chain Rule Problem #2

Given $f(x) = \tan^3 x,$ $f'(x) =$

Hint: Recall $\tan^3 x = \big[\tan x\big]^3.$ Also recall that $\dfrac{d}{dx}\tan x = \sec^2 x.$

\begin{array}{lllll} \text{(A) }3\sec^4 x && \text{(B) }3\tan^2 x && \text{(C) }\tan^3 x \sec^2 x && \text{(D) }3\tan^2 x \cdot \sec^2 x && \text{(E) none of these} \end{array}
Show/Hide Solution
We’ll again solve this two ways. The first is the way most experienced people quickly develop the answer, and that we hope you’ll soon be comfortable with. The second is more formal.

Solution 1 (quick, the way most people reason).
Think something like: “The function is some stuff to the power of 3. So the derivative is 3 times that same stuff to the power of 2, times the derivative of that stuff.” \[ \bbox[10px,border:2px dashed blue]{\dfrac{df}{dx} = \left[\dfrac{df}{d\text{(stuff)}}\text{, with the same stuff inside} \right] \times \dfrac{d}{dx}\text{(stuff)}}\] \begin{align*} f(x) &= \big[\text{stuff}\big]^3; \quad \text{stuff} = \tan x \\[12px] \text{Then}\phantom{f(x)= }\\ \dfrac{df}{dx} &= 3\big[\text{stuff}\big]^2 \cdot \dfrac{d}{dx}(\tan x) \\[8px] &= 3\big[\tan x\big]^2 \cdot \sec^2 x \\[8px] &= 3\tan^2 x \cdot \sec^2 x \implies \text{ (D)} \quad \cmark \end{align*} Note: You’d never actually write out “stuff = ….” Instead just hold in your head what that “stuff” is, and proceed to write down the required derivatives.

Solution 2 (more formal) .
Let’s use the first form of the Chain rule above: \[\bbox[10px,border:2px dashed blue]{\begin{align*}\left[ f\Big(g(x)\Big)\right]’ &= f’\Big(g(x)\Big) \cdot g'(x) \\[5px]&=\text{[derivative of the outer function, evaluated at the inner function] } \\[5px]&\qquad \times \text{ [derivative of the inner function]}
\end{align*}}\] We have the outer function $f(u) = u^3$ and the inner function $u = g(x) = \tan x.$
Then $f'(u) = 3u^2,$ and $g'(x) = \sec^2 x.$ (Recall that $(\tan x)’ = \sec^2 x.$)
Hence \begin{align*} f'(x) &= 3u^2 \cdot (\sec^2 x) \\[8px] &= 3\big[\tan x\big]^2 \cdot \sec^2 x \\[8px] &= 3\tan^2 x \cdot \sec^2 x \implies \text{ (D)} \quad \cmark \\[8px] \end{align*}
[hide solution]
Chain Rule Problem #3
Given $f(x) = (\cos x - \sin x)^{-2}, \, f'(x)=$
\begin{array}{ll} \text{(A) }-2(\cos x - \sin x)^{-1} \cdot (-\sin x - \cos x) && \text{(B) }-2(\cos x - \sin x)^{-3} && \end{array}
\begin{array}{ll} \text{(C) }-2(\cos x - \sin x)^{-3} \cdot (-\sin x - \cos x) && \text{(D) }-2(-\sin x - \cos x)^{-3} \cdot (\cos x - \sin x) \end{array}
\[\text{(E) none of these}\]
Show/Hide Solution
We’ll again solve this two ways. The first is the way most experienced people quickly develop the answer, and that we hope you’ll soon be comfortable with. The second is more formal.

Solution 1 (quick, the way most people reason).
Think something like: “The function is some stuff to the $-2$ power. So the derivative is $-2$ times that same stuff to the $-3$ power, times the derivative of that stuff.” \[ \bbox[10px,border:2px dashed blue]{\dfrac{df}{dx} = \left[\dfrac{df}{d\text{(stuff)}}\text{, with the same stuff inside} \right] \times \dfrac{d}{dx}\text{(stuff)}}\] \begin{align*} f(x) &= (\text{stuff})^{-2}; \quad \text{stuff} = \cos x – \sin x \\[12px] \text{Then}\phantom{f(x)= }\\ \dfrac{df}{dx} &= -2(\text{stuff})^{-3} \cdot \dfrac{d}{dx}(\cos x – \sin x) \\[8px] &= -2(\cos x – \sin x)^{-3} \cdot (-\sin x – \cos x) \implies \text{ (C)} \quad \cmark \\[8px] \end{align*} We could simplify the answer by factoring out the negative signs from the last term, but we prefer to stop there to keep the focus on the Chain rule.

Note: You’d never actually write out “stuff = ….” Instead just hold in your head what that “stuff” is, and proceed to write down the required derivatives.

Solution 2 (more formal).
Let’s use the first form of the Chain rule above: \[\bbox[10px,border:2px dashed blue]{\begin{align*}\left[ f\Big(g(x)\Big)\right]’ &= f’\Big(g(x)\Big) \cdot g'(x) \\[5px]&=\text{[derivative of the outer function, evaluated at the inner function] } \\[5px]&\qquad \times \text{ [derivative of the inner function]}
\end{align*}}\] We have the outer function $f(u) = u^{-2}$ and the inner function $u = g(x) = \cos x – \sin x.$
Then $f'(u) = -2u^{-3},$ and $g'(x) = -\sin x – \cos x.$ (Recall that $(\cos x)’ = -\sin x,$ and $(\sin x)’ = \cos x.$)
Hence \begin{align*} f'(x) &= -2u^{-3} \cdot (-\sin x – \cos x) \\[8px] &= -2(\cos x – \sin x)^{-3} \cdot (-\sin x – \cos x) \implies \text{ (C)} \quad \cmark \end{align*} We could simplify the answer by factoring out the negative signs from the last term, but we prefer to stop there to keep the focus on the Chain rule.

[hide solution]
Chain Rule Problem #4
Given $f(x) = \left(x^5 + e^x\right)^{99}, \, f'(x) =$
\begin{array}{lll} \text{(A) }99\left(x^5 + e^x \right)^{98} \cdot (5x^4 + e^x) && \text{(B) }99\left(x^5 + e^x \right)^{98} && \text{(C) }99\left(x^5 + e^x \right)^{98} \cdot (5x^4 + e^{x-1}) \end{array}
\begin{array}{ll} \text{(D) }99\left(5x^4 + e^x \right)^{98} && \text{(E) none of these} \end{array}
Show/Hide Solution
Solution 1 (quick, the way most people reason).
Think something like: “The function is some stuff to the 99th power. So the derivative is 99 times that same stuff to the 98th power, times the derivative of that stuff.” \[ \bbox[10px,border:2px dashed blue]{\dfrac{df}{dx} = \left[\dfrac{df}{d\text{(stuff)}}\text{, with the same stuff inside} \right] \times \dfrac{d}{dx}\text{(stuff)}}\] \begin{align*} f(x) &= (\text{stuff})^{99}; \quad \text{stuff} = x^5 + e^x \\[12px] \text{Then}\phantom{f(x)= }\\ \dfrac{df}{dx} &= 99(\text{stuff})^{98} \cdot \dfrac{d}{dx}\left(x^5 + e^x \right) \\[8px] &= 99\left(x^5 + e^x \right)^{98} \cdot (5x^4 + e^x) \implies \text{ (A)} \quad \cmark \end{align*} Note: You’d never actually write out “stuff = ….” Instead just hold in your head what that “stuff” is, and proceed to write down the required derivatives.

Solution 2 (more formal).
Let’s use the first form of the Chain rule above: \[\bbox[10px,border:2px dashed blue]{\begin{align*}\left[ f\Big(g(x)\Big)\right]’ &= f’\Big(g(x)\Big) \cdot g'(x) \\[5px]&=\text{[derivative of the outer function, evaluated at the inner function] } \\[5px]&\qquad \times \text{ [derivative of the inner function]}
\end{align*}}\] We have the outer function $f(u) = u^{99}$ and the inner function $u = g(x) = x^5 + e^x.$
Then $f'(u) = 99u^{98},$ and $g'(x) = 5x^4 + e^x.$
Hence \begin{align*} f'(x) &= 99u^{98} \cdot (5x^4 + e^x) \\[8px] &= 99\left(x^5 + e^x\right)^{98} \cdot \left(5x^4 + e^x\right) \implies \text{ (A)} \quad \cmark \end{align*}
[hide solution]
Chain Rule Problem #5
Given $f(x) = \sqrt{x^2+1}, \, f'(x) =$
\begin{array}{lllll} \text{(A) }\dfrac{1}{2}\dfrac{1}{\sqrt{{x^2 + 1}}}\cdot ( 2x ) && \text{(B) }\dfrac{1}{2}\dfrac{1}{\sqrt{{x^2 + 1}}} && \text{(C) } \dfrac{1}{2}\dfrac{1}{\sqrt{{2x}}} && \text{(D) }\dfrac{1}{2}\sqrt{x^2 + 1} && \text{(E) none of these} \end{array}
Show/Hide Solution
Solution 1.
Think something like: “The function is $\sqrt{\text{stuff}}$. So the derivative is $\dfrac{1}{2}\dfrac{1}{\sqrt{\text{that same stuff}}}$, times the derivative of that stuff.”
(Open to develop those derivatives.)
Recall that $\dfrac{d}{du}\left(u^n\right) = nu^{n-1}.$ The rule also holds for fractional powers: \begin{align*} \dfrac{d}{du}\left(\sqrt{u} \right) &= \dfrac{d}{du}\left(u^{\frac{1}{2}} \right) \\[8px] &= \frac{1}{2}u^{\left(\frac{1}{2} – 1 \right)} \\[8px] &= \frac{1}{2}u^{-1/2} \\[8px] &= \frac{1}{2}\frac{1}{\sqrt{u}} \end{align*} And let’s show $\left(x^2 + 1 \right)’ = 2x:$ \[ \begin{align*} \dfrac{d}{dx}\left(x^2 + 1 \right) &= \dfrac{d}{dx}\left( x^2\right) + \cancelto{0}{\dfrac{d}{dx}(1)} \\[8px] &= 2x^1 \\[8px] &= 2x \end{align*} \]
[collapse]
\[ \bbox[10px,border:2px dashed blue]{\dfrac{df}{dx} = \left[\dfrac{df}{d\text{(stuff)}}\text{, with the same stuff inside} \right] \times \dfrac{d}{dx}\text{(stuff)}}\] \begin{align*} f(x) &= \sqrt{\text{stuff}}; \quad \text{stuff} = x^2 + 1 \\[12px] \text{Then}\phantom{f(x)= }\\ \dfrac{df}{dx} &= \frac{1}{2}\frac{1}{\sqrt{\text{stuff}}} \cdot \left(\frac{d}{dx}(\text{stuff})\right) \\[8px] &= \frac{1}{2}\frac{1}{\sqrt{{x^2 + 1}}}\cdot ( 2x ) \implies \text{ (A)} \quad \cmark \end{align*} We could of course cancel the 2’s, but we’re leaving the result as-is so you can easily see how we applied the Chain rule.

Solution 2.
Let’s use the first form of the Chain rule above: \[\bbox[10px,border:2px dashed blue]{\begin{align*}\left[ f\Big(g(x)\Big)\right]’ &= f’\Big(g(x)\Big) \cdot g'(x) \\[5px]&=\text{[derivative of the outer function, evaluated at the inner function] } \\[5px]&\qquad \times \text{ [derivative of the inner function]}
\end{align*}}\] We have the outer function $f(u) = \sqrt{u}$ and the inner function $u = g(x) = x^2 + 1.$
Then $\left(\sqrt{u} \right)’ = \dfrac{1}{2}\dfrac{1}{ \sqrt{u}},$ and $\left(x^2 + 1 \right)’ = 2x.$ Hence \begin{align*} f'(x) &= \dfrac{1}{2}\dfrac{1}{ \sqrt{u}} \cdot 2x \\[8px] &= \dfrac{1}{2}\dfrac{1}{ \sqrt{x^2+1}} \cdot 2x \implies \text{ (A)} \quad \cmark \end{align*}
[hide solution]
Chain Rule Problem #6
Given $f(x) = \sqrt{\sin x}, \, f'(x) =$
\begin{array}{ll} \text{(A) } \dfrac{1}{2}\dfrac{1}{\sqrt{\sin x}} && \text{(B) } \dfrac{1}{2}\sqrt{\sin x}\cdot \cos x && \text{(C) } \dfrac{1}{2}\dfrac{1}{\sqrt{\sin x}}\cdot \cos x \end{array}
\begin{array}{ll} \text{(D) } -\dfrac{1}{2}\dfrac{1}{\sqrt{\sin x}}\cdot \cos x && \text{(E) none of these} \end{array}
Show/Hide Solution
Solution 1 (quick, the way most people reason).
Think something like: “The function is $\sqrt{\text{stuff}}$. So the derivative is $\dfrac{1}{2}\dfrac{1}{\sqrt{\text{that same stuff}}}$, times the derivative of that stuff.” \[ \bbox[10px,border:2px dashed blue]{\dfrac{df}{dx} = \left[\dfrac{df}{d\text{(stuff)}}\text{, with the same stuff inside} \right] \times \dfrac{d}{dx}\text{(stuff)}}\] \begin{align*} f(x) &= \sqrt{\text{stuff}}; \quad \text{stuff} = \sin x \\[12px] \text{Then}\phantom{f(x)= }\\ \dfrac{df}{dx} &= \frac{1}{2}\frac{1}{\sqrt{\text{stuff}}} \cdot \left(\frac{d}{dx}(\text{stuff})\right) \\[8px] &= \frac{1}{2}\frac{1}{\sqrt{\sin x}}\cdot \cos x \implies \text{ (C)} \quad \cmark \end{align*}
Solution 2 (more formal).
Let’s use the first form of the Chain rule above: \[\bbox[10px,border:2px dashed blue]{\begin{align*}\left[ f\Big(g(x)\Big)\right]’ &= f’\Big(g(x)\Big) \cdot g'(x) \\[5px]&=\text{[derivative of the outer function, evaluated at the inner function] } \\[5px]&\qquad \times \text{ [derivative of the inner function]}
\end{align*}}\] We have the outer function $f(u) = \sqrt{u}$ and the inner function $u = g(x) = \sin x.$
Then $\left(\sqrt{u} \right)’ = \dfrac{1}{2}\dfrac{1}{ \sqrt{u}},$ and $(\sin x)’ = \cos x.$ Hence \begin{align*} f'(x) &= \dfrac{1}{2}\dfrac{1}{ \sqrt{u}} \cdot \cos x \\[8px] &= \dfrac{1}{2}\dfrac{1}{ \sqrt{\sin x}} \cdot \cos x \implies \text{ (C)} \quad \cmark \end{align*}
[hide solution]

Buy us a coffee We're working to add more,
and would appreciate your help
to keep going! 😊

Chain Rule & Exponentials
\begin{align*} \text{If} && f(x) &= e^{\text{(stuff)}}, \\[8px] \text{then} &&\dfrac{df}{dx} &= e^{\text{(that stuff)}}\cdot \dfrac{d}{dx}(\text{that stuff}) \end{align*} You'll usually see this written as $$\dfrac{d}{dx}e^u = e^u \cdot \dfrac{du}{dx}$$ The next three problems illustrate.
Chain Rule Problem #7

Given $f(x) = e^{\sin x}, \, f'(x) =$

\begin{array}{lllll} \text{(A) }e^{\cos x} \cos x && \text{(B) }e^{(\sin x -1)}e^{\cos x} && \text{(C) }e^{-\sin x} \cos x && \text{(D) }e^{\sin x} \cos x && \text{(E) none of these} \end{array}

Show/Hide Solution
Solution 1 (quick, the way most people reason).
Think something like: “The function is $e$ to the power of some stuff. So the derivative is $e$ to the power of exactly the same stuff, times the derivative of that stuff.” \[ \bbox[10px,border:2px dashed blue]{\dfrac{df}{dx} = \left[\dfrac{df}{d\text{(stuff)}}\text{, with the same stuff inside} \right] \times \dfrac{d}{dx}\text{(stuff)}}\] \begin{align*} f(x) &= e^{\text{stuff}}; \quad \text{stuff} = \sin x \\[12px] \text{Then}\phantom{f(x)= }\\ \dfrac{df}{dx} &= \left(e^{\text{stuff}} \right) \left(\dfrac{d}{dx}\text{(stuff)} \right) \\[8px] &= e^{\sin x} \cos x \implies \text{ (D)} \quad \cmark \\[8px] \end{align*} Note: You’d never actually write out “stuff = ….” Instead just hold in your head what that “stuff” is, and proceed to write down the required derivatives.

Solution 2 (more formal).
Let’s use the first form of the Chain rule above: \[\bbox[10px,border:2px dashed blue]{\begin{align*}\left[ f\Big(g(x)\Big)\right]’ &= f’\Big(g(x)\Big) \cdot g'(x) \\[5px]&=\text{[derivative of the outer function, evaluated at the inner function] } \\[5px]&\qquad \times \text{ [derivative of the inner function]}
\end{align*}}\] We have the outer function $f(u) = e^u$ and the inner function $u = g(x) = \sin x.$
Then $f'(u) = e^u,$ and $g'(x) = \cos x.$ Hence \begin{align*} f'(x) &= e^u \cdot \cos x \\[8px] &= e^{\sin x} \cdot \cos x \implies \text{ (D)} \quad \cmark \end{align*}
[hide solution]
Chain Rule Problem #8
Given $f(x) = e^{x^2}, \, f'(x) =$
\begin{array}{lllll} \text{(A) }e^{x^2}e^{2x} && \text{(B) }e^{x^2} \cdot 2x && \text{(C) }e^{x^2} && \text{(D) }e^{2x} && \text{(E) none of these} \end{array}
Show/Hide Solution
Solution 1 (quick, the way most people reason).
Think something like: “The function is $e$ to the power of some stuff. So the derivative is $e$ to the power of exactly the same stuff, times the derivative of that stuff.” \[ \bbox[10px,border:2px dashed blue]{\dfrac{df}{dx} = \left[\dfrac{df}{d\text{(stuff)}}\text{, with the same stuff inside} \right] \times \dfrac{d}{dx}\text{(stuff)}}\] \begin{align*} f(x) &= e^{\text{stuff}}; \quad \text{stuff} = x^2 \\[12px] \text{Then}\phantom{f(x)= }\\ \dfrac{df}{dx} &= \left(e^{\text{stuff}} \right) \left(\dfrac{d}{dx}\text{(stuff)} \right) \\[8px] &= e^{x^2} \cdot 2x \implies \text{ (B)} \quad \cmark \\[8px] \end{align*} Solution 2 (more formal).
Let’s use the first form of the Chain rule above: \[\bbox[10px,border:2px dashed blue]{\begin{align*}\left[ f\Big(g(x)\Big)\right]’ &= f’\Big(g(x)\Big) \cdot g'(x) \\[5px]&=\text{[derivative of the outer function, evaluated at the inner function] } \\[5px]&\qquad \times \text{ [derivative of the inner function]}
\end{align*}}\] We have the outer function $f(u) = e^u$ and the inner function $u = g(x) = x^2.$
Then $f'(u) = e^u,$ and $g'(x) = 2x.$ Hence \begin{align*} f'(x) &= e^u \cdot 2x \\[8px] &= e^{x^2} \cdot 2x \implies \text{ (B)} \quad \cmark \end{align*}
[hide solution]
Chain Rule Problem #9
Given $f(x) = e^{\left(x^7 - 4x^3 + x \right)}, \, f'(x) =$
\begin{array}{lll} \text{(A) }e^{\left(x^7 - 4x^3 + x \right)} \cdot \left(7x^6 - 12x^2 \right) && \text{(B) }e^{\left(x^7 - 4x^3 + x \right)} \cdot \left(7x^6 - 12x^2 + 1 \right) && \text{(C) }e^{\left(x^7 - 4x^3 + x \right)} \end{array}
\begin{array}{ll} \text{(D) }e^{\left(7x^6 - 12x^2 + 1 \right)} && \text{(E) none of these} \end{array}
Show/Hide Solution
Solution 1 (quick, the way most people reason).
Think something like: “The function is $e$ to the power of some stuff. So the derivative is $e$ to the power of exactly the same stuff, times the derivative of that stuff.” \[ \bbox[10px,border:2px dashed blue]{\dfrac{df}{dx} = \left[\dfrac{df}{d\text{(stuff)}}\text{, with the same stuff inside} \right] \times \dfrac{d}{dx}\text{(stuff)}}\] \begin{align*} f(x) &= e^{\text{stuff}}; \quad \text{stuff} = x^7 – 4x^3 + x \\[12px] \text{Then}\phantom{f(x)= }\\ \dfrac{df}{dx} &= \left(e^{\text{stuff}} \right) \cdot \dfrac{d}{dx}\left(x^7 – 4x^3 + x \right) \\[8px] &= e^{\left(x^7 – 4x^3 + x \right)} \cdot \left(7x^6 – 12x^2 + 1 \right) \implies \text{ (B)} \quad \cmark \\[8px] \end{align*} Note: You’d never actually write out “stuff = ….” Instead just hold in your head what that “stuff” is, and proceed to write down the required derivatives.
Solution 2 (more formal).
Let’s use the first form of the Chain rule above: \[\bbox[10px,border:2px dashed blue]{\begin{align*}\left[ f\Big(g(x)\Big)\right]’ &= f’\Big(g(x)\Big) \cdot g'(x) \\[5px]&=\text{[derivative of the outer function, evaluated at the inner function] } \\[5px]&\qquad \times \text{ [derivative of the inner function]}
\end{align*}}\] We have the outer function $f(u) = e^u$ and the inner function $u = g(x) = x^7 – 4x^3 + x.$
Then $f'(u) = e^u,$ and $g'(x) = 7x^6 -12x^2 +1.$ Hence \begin{align*} f'(x) &= e^u \cdot \left(7x^6 -12x^2 +1 \right)\\[8px] &= e^{\sin x} \cdot \left(7x^6 -12x^2 +1 \right) \implies \text{ (B)} \quad \cmark \end{align*}
[hide solution]
Chain Rule & Trig Functions
\begin{align*} \text{If} && f(x) &= \sin\text{(stuff)}, \\[8px] \text{then} &&\dfrac{df}{dx} &= \cos\text{(that stuff)}\cdot \dfrac{d}{dx}(\text{that stuff}) \end{align*} You'll usually see this written as $$\dfrac{d}{dx}\sin u = \cos u \cdot \dfrac{du}{dx}$$ $$ --- $$ \begin{align*} \text{If} && f(x) &= \cos\text{(stuff)}, \\[8px] \text{then} &&\dfrac{df}{dx} &= -\sin\text{(that stuff)}\cdot \dfrac{d}{dx}(\text{that stuff}) \end{align*} You'll usually see this written as $$\dfrac{d}{dx}\cos u = -\sin u \cdot \dfrac{du}{dx}$$ $$ --- $$ \begin{align*} \text{If} && f(x) &= \tan\text{(stuff)}, \\[8px] \text{then} &&\dfrac{df}{dx} &= \sec^2\text{(that stuff)}\cdot \dfrac{d}{dx}(\text{that stuff}) \end{align*} You'll usually see this written as $$\dfrac{d}{dx}\tan u = \sec^2 u \cdot \dfrac{du}{dx}$$ The next two problems illustrate.
Chain Rule Problem #10
Given $f(x) = \sin(2x), \, f'(x) =$
\begin{array}{lllll} \text{(A) }\cos(2x) \cdot(2) && \text{(B) }\sin(2x) \cdot (2) && \text{(C) }-\cos(2x)\cdot (2) && \text{(D) }\cos(2) && \text{(E) none of these} \end{array}
Show/Hide Solution
Solution 1.
Think something like: “The function is sin(of some stuff). So the derivative is cos(of that same stuff), times the derivative of that stuff.” \[ \bbox[10px,border:2px dashed blue]{\dfrac{df}{dx} = \left[\dfrac{df}{d\text{(stuff)}}\text{, with the same stuff inside} \right] \times \dfrac{d}{dx}\text{(stuff)}}\] \begin{align*} f(x) &= \sin(\text{stuff}); \quad \text{stuff} = 2x \\[12px] \text{Then}\phantom{f(x)= }\\ \dfrac{df}{dx} &= \cos(\text{stuff}) \left(\dfrac{d}{dx}(\text{stuff}) \right) \\[4px] &= \cos(2x) \cdot(2) \implies \text{ (A)} \quad \cmark \end{align*}
Solution 2.
Let’s use the first form of the Chain rule above: \[\bbox[10px,border:2px dashed blue]{\begin{align*}\left[ f\Big(g(x)\Big)\right]’ &= f’\Big(g(x)\Big) \cdot g'(x) \\[5px]&=\text{[derivative of the outer function, evaluated at the inner function] } \\[5px]&\qquad \times \text{ [derivative of the inner function]}
\end{align*}}\] We have the outer function $f(u) = \sin u$ and the inner function $u = g(x) = 2x.$
Then $f'(u) = \cos u,$ and $g'(x) = 2.$ Hence \begin{align*} f'(x) &= \cos u \cdot 2 \\[8px] &= \cos(2x) \cdot 2 \implies \text{ (A)} \quad \cmark \end{align*}
[hide solution]
Chain Rule Problem #11

Given $f(x) = \tan\left(e^x\right), \, f'(x) =$ \begin{array}{lll} \text{(A) }\sec\left(e^x\right)\tan\left(e^x\right)\cdot e^x && \text{(B) }\sec\left(e^x\right)\cdot e^x && \text{(C) }\sec^2\left(e^x\right) \end{array} \begin{array}{ll} \text{(D) }\sec^2(e^x) \cdot e^x && \text{(E) none of these} \end{array}

Show/Hide Solution
Solution 1.
Think something like: “The function is tan(of some stuff). So the derivative is $\sec^2 \text{(of that same stuff)}$, times the derivative of that stuff.” \[ \bbox[10px,border:2px dashed blue]{\dfrac{df}{dx} = \left[\dfrac{df}{d\text{(stuff)}}\text{, with the same stuff inside} \right] \times \dfrac{d}{dx}\text{(stuff)}}\] \begin{align*} f(x) &= \tan(\text{stuff}); \quad \text{stuff} = e^x \\[12px] \text{Then}\phantom{f(x)= }\\ \dfrac{df}{dx} &= \sec^2(\text{stuff}) \left(\dfrac{d}{dx}(\text{stuff}) \right) \\[4px] &= \sec^2(e^x) \cdot e^x \implies \text{ (D)} \quad \cmark \end{align*} Solution 2.
Let’s use the first form of the Chain rule above: \[\bbox[10px,border:2px dashed blue]{\begin{align*}\left[ f\Big(g(x)\Big)\right]’ &= f’\Big(g(x)\Big) \cdot g'(x) \\[5px]&=\text{[derivative of the outer function, evaluated at the inner function] } \\[5px]&\qquad \times \text{ [derivative of the inner function]}
\end{align*}}\] We have the outer function $f(u) = \tan u$ and the inner function $u = g(x) = e^x.$
Then $f'(u) = \sec^2 u,$ and $g'(x) = e^x.$ Hence \begin{align*} f'(x) &= \sec^2 u \cdot e^x \\[8px] &= \sec^2(e^x) \cdot e^x \implies \text{ (D)} \quad \cmark \end{align*}
[hide solution]
Chain Rule and Product Rule or Quotient Rule
The next few problems require using the Chain rule with the Product rule or with the Quotient rule.
Chain Rule Problem #12

This problem combines the Product Rule with the Chain Rule.

Given $f(x) = \left(x^2 + 1 \right)^7 (3x - 7)^4, \, f'(x) =$

(A) $28\left(x^2 + 1 \right)^6 (3x - 7)^3$
(B) $28\left(x^2 + 1 \right)^6 (3x - 7)^3 \cdot (2x) \cdot (3)$
(C) $ \left[7\left(x^2 + 1 \right)^6 \cdot (2x) \right](3x - 7)^4 + \left(x^2 + 1 \right)^7 \left[4(3x - 7)^3 \cdot (3) \right]$
(D) $7\left(x^2 + 1 \right)^6 (3x - 7)^4 + 4\left(x^2 + 1 \right)^7 (3x - 7)^3$
(E) none of these
Show/Hide Solution
Let’s first think about the derivative of each term separately. We won’t write out “stuff” as we did before to use the Chain Rule, and instead will just write down the answer using the same thinking as above: $$\left[ \left(x^2 + 1 \right)^7\right]’ = 7\left(x^2 + 1 \right)^6 \cdot (2x) $$
Open for more detail
We can view $\left(x^2 + 1 \right)^7$ as $({\text{stuff}})^7$, where $\text{stuff} = x^2 + 1$. Then \begin{align*} f(x) &= (\text{stuff})^7; \quad \text{stuff} = x^2 + 1 \\[12px] \text{Then}\phantom{f(x)= }\\ f'(x) &= 7(\text{stuff})^6 \cdot (x^2 + 1)’ \\[8px] &= 7(x^2 + 1)^6 \cdot (2x) \end{align*}
[collapse]
and $$\left[(3x – 7)^4 \right]’ = 4(3x – 7)^3 \cdot (3) $$ Now let’s use the Product Rule: \[ \begin{align*} [f(x)\,g(x)]’ &= f'(x)\, g(x)\qquad +\qquad f(x)\,g'(x) \\[8px] \left[\left(x^2 + 1 \right)^7 (3x – 7)^4 \right]’ &= \left[ \left(x^2 + 1 \right)^7\right]’ (3x – 7)^4\, + \,\left(x^2 + 1 \right)^7 \left[(3x – 7)^4 \right]’ \\[8px] &= \left[7\left(x^2 + 1 \right)^6 \cdot (2x) \right](3x – 7)^4 + \left(x^2 + 1 \right)^7 \left[4(3x – 7)^3 \cdot (3) \right] \implies \text{ (C)} \quad \cmark \end{align*} \] We could of course simplify this expression algebraically: $$f'(x) = 14x\left(x^2 + 1 \right)^6 (3x – 7)^4 + 12 \left(x^2 + 1 \right)^7 (3x – 7)^3 $$ We instead stopped where we did above to emphasize the way we’ve developed the result, which is what matters most here. (You don’t need us to show you how to do algebra!) Besides, on an exam your grader is most likely to check for something that looks like our result, which shows that you know how to use both the Product and Chain Rules correctly. You might ask your teacher how much you should simplify on an exam: small algebraic mistakes often happen during the “simplification process,” so if you won’t lose points by not simplifying at all, that’s your best bet.
[hide solution]
Chain Rule Problem #13

This problem combines the Quotient rule with the Chain rule.

Given $h(x) = \dfrac{e^{2x}}{1-x^2}, \, f'(x) =$
 

(A) $\dfrac{\left( e^{2x}\cdot 2\right)\left(1-x^2 \right) - \left(e^{2x} \right)\left(-2x \right)}{\left(1-x^2 \right)^2(-2x)}$

(B) $\dfrac{\left( e^{2x}\cdot 2\right)\left(1-x^2 \right) - \left(e^{2x} \right)\left(-2x \right)}{\left(1-x^2 \right)^2}$

(C) $\dfrac{\left( e^{2x}\cdot 2\right)\left(1-x^2 \right) - 2\left(e^{2x} \right)}{\left(1-x^2 \right)^2}$

(D) $\dfrac{\left( e^{2x}\cdot 2\right)\left(1-x^2 \right) + \left(e^{2x} \right)\left(-2x \right)}{\left(1-x^2 \right)^2}$

(E) none of these

Show/Hide Solution
Let’s first think about the derivative of the numerator (we’ll call $f(x)$) and the denominator (we’ll call $g(x)$) separately.
First, the numerator: \begin{align*} f(x) &= e^{2x} \\[4px] f'(x) &= e^{2x}\cdot 2 \end{align*} And now the denominator: \begin{align*} g(x) &= 1-x^2 \\[4px] g'(x) &= -2x \end{align*} Now let’s use the Quotient rule: \begin{align*} \left[\dfrac{f(x)}{g(x)} \right]’ &= \dfrac{f'(x)\,g(x) – f(x)\,g'(x)}{\left[g(x) \right]^2} \\[8px] \left[ \dfrac{e^{2x}}{1-x^2} \right]’ &= \dfrac{\left( e^{2x}\cdot 2\right)\left(1-x^2 \right) – \left(e^{2x} \right)\left(-2x \right)}{\left(1-x^2 \right)^2} \implies \text{ (B)} \quad \cmark \end{align*} We could simplify the answer, but prefer to leave it as-written to keep the focus on how the Chain rule simply enters in when you compute $f'(x)$ and $g'(x).$ Otherwise, you’re just using the Quotient rule as you did earlier.
[hide solution]
Using the Chain rule multiple times
The next few problems require using the Chain rule multiple times.
Chain Rule Problem #14
This problem requires using the Chain Rule twice.
Differentiate $f(x) = \cos(\tan(3x)).$
Show/Hide Solution
Solution 1 (quick, the way most people reason).
Think something like:
The overall function is $\cos(\tan(3x)).$
The outermost function is thus $\cos(\overbrace{\text{of some stuff A}}^{\tan(3x)}),$ and so the first part of the derivative is $-\sin(\text{of that exact same stuff A}).$ Hence we first write $$f'(x) = -\sin(\tan(3x)) \times \cdots$$ Next, the first inside function is $\tan(\overbrace{\text{of some different stuff B}}^{3x}),$ and since the derivative of $\tan$ is $\sec^2,$ the next part of the derivative is $\sec^2(\text{of that exact same stuff B})$: $$f'(x) = -\sin(\tan(3x)) \cdot \sec^2(3x) \times \cdots$$ Finally the second inside function is $3x,$ and its derivative is $3$ and so to finish we multiply by that: $$f'(x) = -\sin(\tan(3x)) \cdot \sec^2(3x) \cdot 3 \quad \cmark$$ And you’re done! (Or as they say in some parts of the world, “And Bob’s your uncle!”)

Solution 2 (more formal).
Although it’s tedious to write out each separate function, let’s use an extension of the first form of the Chain rule above, now applied to $f\Bigg(g\Big(h(x)\Big)\Bigg)$: \[\bbox[10px,border:2px dashed blue]{\begin{align*}\left[ f\Bigg(g\Big(h(x)\Big)\Bigg) \right]’ &= f’\Bigg(g\Big(h(x)\Big)\Bigg) \cdot g’\Big(h(x)\Big) \cdot h'(x) \\[5px]&=\text{[derivative of the outer function, evaluated at the middle function] } \\[5px]&\qquad \times \text{ [derivative of the middle function, evaluated at the inner function]} \\[5px]&\qquad \quad \times \text{ [derivative of the inner function]}\end{align*}}\] We have the outer function $f(z) = \cos z,$ and the middle function $z = g(u) = \tan(u),$ and the inner function $u = h(x) = 3x.$
Then $f'(z) = -\sin z,$ and $g'(u) = \sec^2 u,$ and $h'(x) = 3.$ Hence:
\begin{align*} f'(x) &= (-\sin z) \cdot (\sec^2 u) \cdot (3) \\[8px] &= -\sin(\tan(3x)) \cdot \sec^2 (3x) \cdot 3 \quad \cmark \end{align*}
[hide solution]
Chain Rule Problem #15
This problem requires using the Chain Rule twice.
Differentiate $f(x) = \sqrt{\sin (5x)}.$
Show/Hide Solution
Solution 1 (quick, the way most people reason).
Think something like:
The overall function is $\sqrt{\sin (5x)}.$
The outermost function is thus $\sqrt{(\overbrace{\text{of some stuff A}}^{\sin(5x)})},$ and so the first part of the derivative is $\dfrac{1}{2}\dfrac{1}{\sqrt{(\text{of that exact same stuff A})}}.$ Hence we first write $$f'(x) = \dfrac{1}{2}\dfrac{1}{\sqrt{\sin(5x)}} \times \cdots$$ Next, the first inside function is $\sin(\overbrace{\text{of some different stuff B}}^{5x}),$ and since the derivative of $\sin$ is $\cos,$ the next part of the derivative is $\cos(\text{of that exact same stuff B})$: $$f'(x) = \dfrac{1}{2}\dfrac{1}{\sqrt{\sin(5x)}} \cdot \cos(5x) \times \cdots$$ Finally the second inside function is $5x,$ and its derivative is $5$ and so to finish we multiply by that: $$f'(x) = \dfrac{1}{2}\dfrac{1}{\sqrt{\sin(5x)}} \cdot \cos(5x) \cdot 5 \quad \cmark$$ And you’re done!

Solution 2 (more formal).
Although it’s tedious to write out each separate function, let’s use an extension of the first form of the Chain rule above, now applied to $f\Bigg(g\Big(h(x)\Big)\Bigg)$: \[\bbox[10px,border:2px dashed blue]{\begin{align*}\left[ f\Bigg(g\Big(h(x)\Big)\Bigg) \right]’ &= f’\Bigg(g\Big(h(x)\Big)\Bigg) \cdot g’\Big(h(x)\Big) \cdot h'(x) \\[5px]&=\text{[derivative of the outer function, evaluated at the middle function] } \\[5px]&\qquad \times \text{ [derivative of the middle function, evaluated at the inner function]} \\[5px]&\qquad \quad \times \text{ [derivative of the inner function]}\end{align*}}\] We have the outer function $f(z) = \sqrt z,$ and the middle function $z = g(u) = \sin(u),$ and the inner function $u = h(x) = 5x.$
Then $f'(z) = \dfrac{1}{2}\dfrac{1}{\sqrt{z}},$ and $g'(u) = \cos u,$ and $h'(x) = 5.$ Hence:
\begin{align*} f'(x) &= \left( \dfrac{1}{2}\dfrac{1}{\sqrt{z}}\right) \cdot (\cos u) \cdot (5) \\[8px] &= \left( \dfrac{1}{2}\dfrac{1}{\sqrt{\sin(5x)}}\right) \cdot \cos(5x) \cdot 5 \quad \cmark \end{align*}
[hide solution]
Chain Rule Problem #16
This problem requires using the Chain Rule three times.
Differentiate $f(x) = \left(1 + \sin^9(2x + 3) \right)^2.$
Hint: Recall that $\sin^9(\cdots) = \big[\sin(\cdots) \big]^9.$
Show/Hide Solution
We won’t write out all of the tedious substitutions, and instead reason the way you’ll need to become comfortable with:
The outermost function is $(\overbrace{\text{some stuff A}}^{1 + \sin^9(2x + 3)})^2$, and so the first part of the derivative is $2\times(\text{that exact same stuff A})$: \begin{align*} f'(x) &= 2\left(1 + \sin^9(2x + 3) \right) \times \cdots \\ & \phantom{= 2\left(1 + \sin^9(2x + 3) \right) \cdot 9\sin^8(2x+3) \cdot \cos(2x+3)\cdot 2} \end{align*} Next we consider the first inside function (which was “stuff A”): $1 + (\overbrace{\text{some stuff B}}^{\sin(2x + 3)})^9.$ So the next part of the derivative is $9\times (\text{that exact same stuff B})^8$: \begin{align*} f'(x) &= 2\left(1 + \sin^9(2x + 3) \right) \cdot 9(\sin(2x+3))^8 \times \cdots \\[8px] &= 2\left(1 + \sin^9(2x + 3) \right) \cdot 9\sin^8(2x+3) \times \cdots \\ & \phantom{= 2\left(1 + \sin^9(2x + 3) \right) \cdot 9\sin^8(2x+3) \cdot \cos(2x+3)\cdot 2} \end{align*} The next inside function (that was “stuff B”) is $\sin(\overbrace{\text{of some stuff C}}^{2x+3}),$ and so the next part of the derivative is $\cos(\text{of that exact same stuff C})$: \begin{align*} f'(x) &= 2\left(1 + \sin^9(2x + 3) \right) \cdot 9\sin^8(2x+3) \cdot \cos(2x+3)\times \cdots \\ & \phantom{= 2\left(1 + \sin^9(2x + 3) \right) \cdot 9\sin^8(2x+3) \cdot \cos(2x+3)\cdot 2} \end{align*} Finally, the last inside function (that was “stuff C”) is $2x +3$, and so the last part of the derivative is $2$: $$ f'(x) = 2\left(1 + \sin^9(2x + 3) \right) \cdot 9\sin^8(2x+3) \cdot \cos(2x+3)\cdot 2 \quad \cmark$$ Whew: done!
[hide solution]
More Problems; Actual Exam Questions
The following problems use the Chain rule in different ways, and contain some previously-used exam questions.
Chain Rule Problem #17
Given that $f(2) = 1$, $f'(4) = 5$, $g(2) = 4$, and $g'(2) = 8$, find $\left[ f\big(g(2)\big)\right]'$.

\begin{array}{lllll} \text{(A) }5 && \text{(B) }10 && \text{(C) }40 && \text{(D) }8 && \text{(E) }32 \end{array}

Show/Hide Solution
\begin{align*} \left[ f\big(g(x)\big)\right]’ &= f’\big(g(x)\big) \cdot g'(x) \\[5px] &=\text{[derivative of the outer function, evaluated at the inner function] } \\[5px] &\qquad \times \text{ [derivative of the inner function]} \end{align*} \begin{align*} \left[ f\big(g(2)\big)\right]’ &= f’\big(g(2)\big) \cdot \left(g'(2)\right) \\ \\ &= f'(4) \cdot (8) \\ \\ &= 5 \cdot 8 = 40 \implies \text{ (C)} \quad \cmark \end{align*}
[hide solution]
Chain Rule Problem #18
Let $f$ and $g$ be differentiable functions and let the values of $f, g, f'$ and $g'$ at $x=1$ and $x=2$ be given by the table.

\begin{array}{c | c | c | c | c} x & f(x) & g(x) & f'(x) & g'(x)\\ \hline 1 & 5 & 3 & 2 & 7 \\ \hline 2 & -2 & 1 & 4 & 6 \\ \end{array}
Find $\displaystyle{\lim_{h \to 0} \frac{f(g(2+h)) - f(g(2))}{h}}.$
Show/Hide Solution
The key realization in this problem is that the requested limit is the definition of the derivative of $f(g(x)),$ $\left[f(g(x)) \right]’,$ at $x=2$: \[ \lim_{h \to 0} \frac{f(g(2+h)) – f(g(2))}{h} = \frac{d}{dx}\left[f(g(x)) \right]_{\text{at }x=2}\] Once we realize that, we can use what we know about the Chain rule and read the necessary values from the table: \begin{align*} \lim_{h \to 0} \frac{f(g(2+h)) – f(g(2))}{h} &= \frac{d}{dx}\left[f(g(x)) \right]_{\text{at }x=2} \\[8px] &= f'(g(2)) \cdot g'(2) &&\text{ [by the chain rule]} \\[8px] &= f'(1) \cdot g'(2) &&[g(2) = 1]\\[8px] &= (2)(6) = 12 \quad \cmark \end{align*}
[hide solution]
#19: Show, using the Chain rule, that...
Show the following, as requested.
(a) Use the Chain Rule and the Product Rule to develop the Quotient Rule. Start from $\dfrac{f(x)}{g(x)} = f(x) \Big( g(x)\Big)^{-1}$.
(b) Prove that the derivative of an even function is an odd function. [Recall that for an even function, $f(-x) = f(x)$.]
(c) Prove that the derivative of an odd function is an even function. [Recall that for an odd function, $f(-x) = -f(x)$.]
Show/Hide Solution
Solution SummarySolution (a) DetailSolution (b) DetailSolution (c) Detail
(a) $\dfrac{f'(x)g(x) – f(x)g'(x)}{\Big(g(x)\Big)^2}$
(b) If $f(x)$ is even, then $ f'(-x) = -f'(x)$.
(c) If $f(x)$ is odd, then $f'(-x) = f'(x)$.

\begin{align*} \frac{d}{dx}\left( \frac{f(x)}{g(x)} \right) &= \frac{d}{dx} \Bigg[ f(x) \Big( g(x)\Big)^{-1}\Bigg] \\ \\ &= \left(\frac{d}{dx}f(x) \right) \Big( g(x)\Big)^{-1} + f(x) \left[ \frac{d}{dx} \Big( g(x)\Big)^{-1} \right] \\ \\ &= f'(x) \Big( g(x)\Big)^{-1} + f(x)\left[(-1) \Big( g(x)\Big)^{-2} \cdot \Big(\frac{d}{dx} g(x) \Big) \right] \\ \\ &= \frac{f'(x)}{g(x)}\, -\, \frac{f(x)}{\Big(g(x)\Big)^2}g'(x) \\ \\ &= \frac{f'(x)g(x)\, -\, f(x)g'(x)}{\Big(g(x)\Big)^2} \quad \cmark \end{align*}
Since we’re trying to show something about the derivative of an even function, start with its definition and take the derivative: \begin{align*} f(-x) &= f(x) \\ \\ \frac{d}{dx}\left[f(-x)\right] &= \frac{d}{dx}\left[f(x)\right] \\ \\ f'(-x) \cdot \left[ \frac{d}{dx} (-x) \right] &= f'(x) \\ \\ f'(-x)\cdot (-1) &= f'(x) \\ \\ – f'(-x) &= f'(x) \\ \\ f'(-x) &= -f'(x) \end{align*} The last line shows, as requested, that the derivative of $f$, $f’$, is itself an odd function: $f'(-x) = -f'(x)$. $\quad \cmark$

A less formal approach, using “stuff”:
We can view the function $f(-x)$ as being $f(\text{stuff})$, where $\text{“stuff”} = -x$. Then \begin{align*} f(\text{stuff}) &= f(x) \\ \\ \frac{d}{dx}\left[f(\text{stuff})\right] &= \frac{d}{dx}\left[f(x)\right] \\ \\ f'(\text{stuff}) \cdot \left[ \frac{d}{dx}\text{(stuff)} \right] &= f'(x) \\ \\ f'(-x) \cdot \left[ \frac{d}{dx} (-x) \right] &= f'(x) \\ \\ f'(-x)\cdot (-1)&= f'(x) \\ \\ f'(-x) &= -f'(x) \end{align*} The last line shows, as requested, that the derivative of $f$, $f’$, is itself an odd function: $f'(-x) = -f'(x)$. $\quad \cmark$
Since we’re trying to show something about the derivative of an odd function, start with its definition and take the derivative: \begin{align*} f(-x) &= -f(x) \\ \\ \frac{d}{dx}\left[f(-x)\right] &= \frac{d}{dx}\left[-f(x)\right] \\ \\ f'(-x) \cdot \left[ \frac{d}{dx} (-x) \right] &= -f'(x) \\ \\ f'(-x)\cdot (-1) &= -f'(x) \\ \\ f'(-x) &= f'(x) \end{align*} The last line shows, as requested, that the derivative of $f$, $f’$, is itself an even function: $f'(-x) = f'(x)$. $\quad \cmark$

A less formal approach, using “stuff”:
We can view the function $f(-x)$ as being $f(\text{stuff})$, where $\text{“stuff”} = -x$. Then \begin{align*} f(\text{stuff}) &= -f(x) \\ \\ \frac{d}{dx}\left[f(\text{stuff})\right] &= \frac{d}{dx}\left[-f(x)\right] \\ \\ f'(\text{stuff}) \cdot \left[ \frac{d}{dx}\text{(stuff)} \right] &= -f'(x) \\ \\ f'(-x) \cdot \left[ \frac{d}{dx} (-x) \right] &= -f'(x) \\ \\ f'(-x)\cdot (-1)&= -f'(x) \\ \\ f'(-x) &= f'(x) \end{align*} The last line shows, as requested, that the derivative of $f$, $f’$, is itself an even function: $f'(-x) = f'(x)$. $\quad \cmark$
[hide solution]
#20: Derivative of a^x

Show that $\dfrac{d}{dx}a^x = a^x \ln a$, where $a$ is a constant and $a > 0$. (For example, $\dfrac{d}{dx}2^x = 2^x \ln 2.$)

Hint: Start with $a^x = e^{\ln a^x}$, and use $\dfrac{d}{dx}e^u = e^u \cdot \dfrac{du}{dx}.$

Show/Hide Solution
Start from the hint, and recall that $\ln a^x = x \ln a$: \begin{align*} \frac{d}{dx}a^x &= \frac{d}{dx}\left(e^{\ln a^x}\right) &&\text{[Recall that $\ln a^x = x\ln a$]} \\ \\ &= \frac{d}{dx}\left(e^{x \ln a} \right) &&\left[\text{Recall } \dfrac{de^u}{dx} = e^u \dfrac{du}{dx}. \text{Here } u = x \ln a.\right]\\ \\ &= e^{x \ln a} \cdot \left(\frac{d}{dx} (x \ln a) \right) &&\text{[Remember that $a$ is a constant, so $\ln a$ is also a constant.]}\\ \\ &= e^{x \ln a} \cdot \ln a \left(\frac{d}{dx} (x) \right) \\ \\ &= e^{x \ln a} \cdot \ln a\\ \\ &= e^{\ln a^x} \cdot \ln a \\ \\ &= a^x \ln a \quad \cmark \end{align*} By the way, notice that this result still applies when $a = e:$ \begin{align*} \dfrac{d}{dx}e^x &= e^x \cancelto{1}{\ln(e)} \\[8px] &= e^x \end{align*} Tips iconYou probably have firmly in mind that $\dfrac{d}{dx}e^x = e^x,$ and so just need to remember that if the base of the exponential a is anything other than e, you have to multiply the derivative by $\ln a.$ For instance, $\dfrac{d}{dx}3^x = 3^x \ln 3.$
[hide solution]
#21: University exam question
If $y = f(x^2)$ and $f'(x) = \sqrt{3x + 5}$, show that $\dfrac{dy}{dx} = 2x\sqrt{3x^2 + 5}$.
Show/Hide Solution
The solution is easiest to understand if we rewrite the given derivative as $f'(u) = \sqrt{3u + 5},$ and then note that we have $u = x^2.$ Why can we write u instead of x for $f’$ here? Remember that the input variable is really a dummy variable, and we’re free to call it whatever we want. We think using a variable other than x in this first part makes things much clearer.

Because now we can invoke the Chain Rule, using $\dfrac{dy}{du} = f'(u) = \sqrt{3u + 5}:$ \begin{align*} \dfrac{dy}{dx} &= \dfrac{dy}{du} \cdot \dfrac{du}{dx} \\[8px] &= \sqrt{3u + 5} \cdot\dfrac{d}{dx}\left( x^2\right) \\[8px] &= \sqrt{3x^2 + 5} \cdot(2x) \\[8px] &= 2x \sqrt{3x^2 + 5} \quad \cmark \end{align*}

A less formal approach, using “stuff”:
We can view the function $f(x^2)$ as being $f(\text{stuff})$, where $\text{“stuff”} = x^2$. Then \begin{align*} \frac{dy}{dx} &= \frac{d}{dx} \left[f(\text{stuff})\right] \\ \\ &= f'(\text{stuff}) \cdot \left[\frac{d}{dx} \text{(stuff)} \right] \\ \\ &= f'(x^2) \cdot \left[\frac{d}{dx}(x^2) \right] \\ \\ &= \sqrt{3x^2 + 5} \cdot (2x) \quad \cmark \end{align*}
[hide solution]
#22: Derive some trig derivatives
Derive the following, as requested.
(a) Find the derivative of $\sec \theta = \dfrac{1}{\cos \theta}$. Hint: Remember the Chain Rule.
(b) Find the derivative of $\cot \theta = \dfrac{\cos \theta}{\sin \theta} = (\cos \theta)(\sin \theta)^{-1}$. Use the Product Rule.
(c) Find the derivative of $\cot \theta = \dfrac{\cos \theta}{\sin \theta}$. Use the Quotient Rule.
Show/Hide Solution
Solution SummarySolution (a) DetailSolution (b) DetailSolution (c) Detail
(a) $\sec \theta \, \tan \theta$
(b) $-\csc^2 \theta$
(c) $-\csc^2 \theta$

\begin{align*} \frac{d}{d\theta} \sec \theta &= \frac{d}{d\theta} \left[\frac{1}{\cos \theta} \right] \\ \\ &= \frac{d}{d\theta} \left[\cos \theta \right]^{-1} \\ \\ &= (-1)\left[\cos \theta \right]^{-2} \cdot \left( \frac{d}{d\theta} \cos \theta \right) \\ \\ &= (-1)\left[\cos \theta \right]^{-2} \cdot (-\sin \theta) \\ \\ &= \frac{1}{\cos \theta} \, \frac{\sin \theta}{\cos \theta} \\ \\ &= \sec \theta \, \tan \theta \quad \cmark \end{align*}
\begin{align*} \frac{d}{d \theta}\cot \theta &= \frac{d}{d \theta}\left[(\cos \theta)(\sin \theta)^{-1} \right] \\ \\ &= \left( \frac{d}{d \theta} \cos \theta \right) (\sin \theta)^{-1} + (\cos \theta) \left( \frac{d}{d \theta}(\sin \theta)^{-1} \right) \\ \\ &= (-\sin \theta) (\sin \theta)^{-1} + (\cos \theta) \left( (-1)(\sin \theta)^{-2}\cdot \dfrac{d}{d\theta}(\sin \theta) \right) \\ \\ &= -1 – (\cos \theta) \left((\sin \theta)^{-2}(\cos \theta) \right) \\ \\ &= -1 – \frac{(\cos \theta)^2}{(\sin \theta)^2} \\ \\ &= -\left( 1 + \cot^2 \theta \right) \end{align*} Now recall that $$\sin^2 \theta + \cos^2 \theta = 1$$ Dividing each term by $\sin^2 \theta$ gives \begin{align*} \frac{\sin^2 \theta}{\sin^2 \theta} + \frac{\cos^2 \theta}{\sin^2 \theta} &= \frac{1}{\sin^2 \theta} \\ \\ 1 + \cot^2 \theta &= \csc^2 \theta \end{align*} Hence we can rewrite our result for $\dfrac{d}{d \theta}\cot \theta$ as \begin{align*} \frac{d}{d \theta}\cot \theta &= -\left( 1 + \cot^2 \theta \right) \\ \\ &= -\csc^2 \theta \quad \cmark \end{align*}
\begin{align*} \frac{d}{d \theta}\cot \theta &= \frac{d}{d \theta} \left[ \dfrac{\cos \theta}{\sin \theta} \right] \\ \\ &= \frac{ \left(\frac{d}{d \theta} \cos \theta \right)(\sin \theta) – (\cos \theta) \left(\frac{d}{d \theta} \sin \theta \right)}{\sin^2 \theta} \\ \\ &= \frac{(-\sin \theta)(\sin \theta) – (\cos \theta)(\cos \theta)}{\sin^2 \theta} \\ \\ &= -\frac{\sin^2 \theta + \cos^2 \theta}{\sin^2 \theta} \\ \\ &= – \frac{1}{\sin^2 \theta} = -\csc^2 \theta \quad \cmark \end{align*}
[hide solution]
#23: More university exam questions
Find the requested information.
(a) [This problem appeared on an exam at a well-known science and engineering university.] Differentiate $f(x) = \dfrac{\sin(2x)}{x}.$
(b) Let $y = \cos\left(\sqrt{1 + \sqrt{x}}\right)$. Find $y'$.
Show/Hide Solution
Solution SummarySolution (a) DetailSolution (b) Detail
(a) $\dfrac{2x\cos(2x) – \sin(2x)}{x^2}$
(b) $-\dfrac{1}{4} \sin\left(\sqrt{1 + \sqrt{x}}\right) \frac{1}{\sqrt{x} \sqrt{1 + \sqrt{x}} }$

\begin{align*} f'(x) &= \frac{d}{dx} \left[\frac{\sin(2x)}{x} \right] \\ \\ &= \frac{\left(\frac{d}{dx} \sin(2x) \right)x – \sin(2x) \left( \frac{d}{dx} x \right) }{x^2} \\ \\ &= \frac{\left(\cos(2x) \cdot \left(\frac{d}{dx} (2x) \right) \right) x – \sin(2x) (1) }{x^2} \\ \\ &= \frac{\left(\cos(2x) \cdot (2) \right) x – \sin(2x)}{x^2} \\ \\ &= \frac{2x\cos(2x) – \sin(2x)}{x^2} \quad \cmark \end{align*}
\begin{align*} y’ &= \frac{d}{dx}\cos\left(\sqrt{1 + \sqrt{x}}\right) \\ \\ &= -\sin\left(\sqrt{1 + \sqrt{x}}\right) \cdot \frac{d}{dx}\left( \sqrt{1 + \sqrt{x}} \right) \\ \\ &= -\sin\left(\sqrt{1 + \sqrt{x}}\right) \cdot \frac{d}{dx} \left( 1 + x^\frac{1}{2}\right)^\frac{1}{2} \\ \\ &= -\sin\left(\sqrt{1 + \sqrt{x}}\right) \cdot \left(\frac{1}{2} \left( 1 + x^\frac{1}{2}\right)^{-\frac{1}{2}}\right) \cdot \frac{d}{dx} \left(1 + x^\frac{1}{2} \right) \\ \\ &= -\sin\left(\sqrt{1 + \sqrt{x}}\right) \cdot \left(\frac{1}{2} \left( 1 + x^\frac{1}{2}\right)^{-\frac{1}{2}}\right) \cdot \left( \frac{1}{2} x^{-\frac{1}{2}} \right) \\ \\ &= -\frac{1}{4} \sin\left(\sqrt{1 + \sqrt{x}}\right) \frac{1}{\sqrt{x} \sqrt{1 + \sqrt{x}} } \quad \cmark \end{align*}
[hide solution]
#24: Still more uni exam questions
Find the derivative of the following functions.
(a) $h(x) = e^{\sin(-x)}$
(b) [This problem appeared on an exam at a well-known science and engineering university.] Differentiate $g(x) = \dfrac{x^2}{\sqrt{1-x}}.$
Show/Hide Solution
Solution SummarySolution (a) DetailSolution (b) Detail
(a) $-e^{\sin(-x)} \cos (-x)$
(b) $\dfrac{4x – 3x^2}{2(1-x)^\frac{3}{2}}$

\begin{align*} h'(x) &= \frac{d}{dx} \left[e^{\sin(-x)} \right] \\ \\ &= e^{\sin(-x)} \cdot \left(\frac{d}{dx}\sin(-x) \right) \\ \\ &= e^{\sin(-x)} (\cos (-x)) \left(\frac{d}{dx}(-x) \right) \\ \\ &= e^{\sin(-x)} (\cos (-x)) (-1) \\ \\ &= -e^{\sin(-x)} \cos (-x) \quad \cmark \end{align*}
We’ll solve this two ways, first with the Quotient Rule, and then with the Product Rule.

Method 1: Quotient Rule
\begin{align*} g'(x) &= \frac{d}{dx} \left[\frac{x^2}{\sqrt{1-x}}\right] \\ \\ &= \frac{\left(\frac{d}{dx}x^2 \right)\left(\sqrt{1-x}\right) – \left(x^2\right) \left[\frac{d}{dx}\sqrt{1-x}\right ]}{\left(\sqrt{1-x} \right)^2} \\ \\ &= \frac{(2x)\sqrt{1-x} – x^2\left[\frac{1}{2}\frac{1}{\sqrt{1-x}}\cdot \dfrac{d}{dx}(1-x)\right]}{1-x} \\ \\ &= \frac{(2x)\sqrt{1-x} – x^2\left[\frac{1}{2}\frac{1}{\sqrt{1-x}}\cdot (-1)\right]}{1-x} \\ \\ &= \frac{(2x)\sqrt{1-x} + \frac{x^2}{2\sqrt{1-x}}}{1-x} \\ \\ &= \dfrac{\dfrac{4x(1-x) +x^2}{2\sqrt{1-x}}}{1-x} \\ \\ &= \dfrac{4x -4x^2 + x^2}{2(1-x)\sqrt{1-x}} \\ \\ &= \frac{4x – 3x^2}{2(1-x)^{3/2}} \quad \cmark \end{align*}

Method 2: Product Rule
\begin{align*} g'(x) &= \frac{d}{dx}\left[x^2(1-x)^{-1/2}\right] \\ \\ &= \left[\frac{d}{dx}x^2\right](1-x)^{-1/2} + x^2 \frac{d}{dx}\left[(1-x)^{-1/2} \right] \\ \\ &= [2x](1-x)^{-1/2} + x^2 \left[\left(-\dfrac{1}{2}\right)(1-x)^{-3/2}\cdot\frac{d}{dx}[1-x]\right] \\ \\ &= [2x](1-x)^{-1/2} + x^2 \left[\left(-\dfrac{1}{2}\right)(1-x)^{-3/2}\cdot(-1)\right] \\ \\ &= \frac{2x}{(1-x)^{1/2}} + \dfrac{x^2}{2(1-x)^{3/2}} \\ \\ &= \frac{4x(1-x)}{2(1-x)^{3/2}} + \frac{x^2}{2(1-x)^{3/2}} \\ \\ &= \frac{4x – 4x^2 + x^2}{2(1-x)^{3/2}} \\ \\ &= \frac{4x – 3x^2}{2(1-x)^{3/2}} \quad \cmark \end{align*}
[hide solution]

Buy us a coffee If we've helped, please consider
giving a little something back.
Thank you! 😊



Please let us know on our Forum:
  • What questions do you have about the solutions above?
  • Which ones are giving you the most trouble?
  • What other problems are you trying to work through for your class about calculating derivatives that you don't know how to do easily yet?
If you let us know, we'll do our best to help!
As of September 2022, we’re using our Forum for comments and discussion of this topic, and for any math questions. We’d love to see you there! Please tap to visit our Forum: community.matheno.com.
We'd appreciate your feedback! 😊
How helpful?