← Back to Home

This calculus practice problem asks you to differentiate $[\tan(3x)]^4$. A worked solution is shown below, but one of its steps contains a mistake. Tick the step you think is wrong and press Check. If you are right, the full explanation unlocks: why that step is wrong and how to solve the problem correctly. It practices the chain rule, and knowing where to apply it.

Problem 3

Differentiate $[\tan(3x)]^{4}$

Check the wrong step
Step 1Note that $[\tan(3x)]^{4}$ is a composite function.
Let $\textcolor{red}{f(x)=x^{4}}$ and $\textcolor{#33b5e5}{g(x)=\tan(3x)}$.
Then $f[g(x)]=[\tan(3x)]^{4}$.
Step 2Applying the chain rule:

$\dfrac{d}{dx}f[g(x)]=\textcolor{red}{f'[\textcolor{#33b5e5}{g(x)}]} \cdot \textcolor{#33b5e5}{g'(x)}$
Step 3Note that $\textcolor{red}{f'(x)=4x^{4-1}=4x^{3}}$
Step 4Note that $\textcolor{#33b5e5}{g'(x)=\sec^{2}(3x)}$
Step 5So, plugging into the chain rule from Step 2:

$=\textcolor{red}{4[\tan(3x)]^{4-1}} \cdot \textcolor{#33b5e5}{\sec^{2}(3x)}$
Step 6$=4[\tan(3x)]^{3}\sec^{2}(3x)$
Unlocked Solution & Analysis ▼

This question was testing your knowledge about the chain rule and also your ability of knowing where to apply it. Check out my Calculus I Notes - Chain Rule Section for more worked problems applying the chain rule.

Mistake: Differentiating $g(x)$ also required the use of the chain rule!

$g(x)=\tan(3x)$ is a trigonometric function. However, note that it can be broken down into 2 smaller functions. Let's call the first function $a(x)$ and the second function $b(x)$. Notice that if I let $a(x)=\tan(x)$ and $b(x)=3x$, then I can write $g(x)$ as $a[b(x)]=\tan(3x)$. Look at the image below.

image_1_calc_mistake_diff

If you don't know if you can apply the chain rule to a specific term or not, try to see if you can make "a thing inside another thing." For example, I made "$3x$" become something inside a more general "$\tan(x)$." This allowed me to use the chain rule.

Another example where you need the chain rule would be $(x^3+3x)^5$. Unfolding $(x^3+3x)^5$ so that you can differentiate every term would take too long and introduce a lot of chances of error. Instead, you can imagine that $f(x)=(x)^5$ is the outside function, and $g(x)=x^3+3x$ is the inside function.

image_2_calc_mistake_diff

A piece of advice that can be helpful is that whenever you see brackets, look to see if you can apply either the product rule, the chain rule, or both of them together.

Now, since step 4 had differentiated $g(x)$ incorrectly, the final answer obtained is incorrect. Here is the problem repeated without the mistake:

Step 1Note that $[\tan(3x)]^{4}$ is a composite function.
Let $\textcolor{red}{f(x)=x^{4}}$ and $\textcolor{#33b5e5}{g(x)=\tan(3x)}$.
Then $f[g(x)]=[\tan(3x)]^{4}$.

Step 2Applying the chain rule:

$\dfrac{d}{dx}f[g(x)]=\textcolor{red}{f'[\textcolor{#33b5e5}{g(x)}]} \cdot \textcolor{#33b5e5}{g'(x)}$

Step 3Note that $\textcolor{red}{f'(x)=4x^{4-1}=4x^{3}}$

Step 4Note that $\textcolor{#33b5e5}{g(x)=a[b(x)]}$, where $a(x)=\tan(x)$ and $b(x)=3x$.
So $a'(x)=\sec^{2}(x)$ and $b'(x)=3$.

Applying the chain rule again:
$\textcolor{#33b5e5}{g'(x)}=a'[b(x)] \cdot b'(x)$
$=\sec^{2}(3x) \cdot 3$
$\textcolor{#33b5e5}{=3\sec^{2}(3x)}$

Step 5So, plugging into the chain rule from Step 2:

$=\textcolor{red}{4[\tan(3x)]^{4-1}} \cdot \textcolor{#33b5e5}{3\sec^{2}(3x)}$

Step 6$=12[\tan(3x)]^{3}\sec^{2}(3x)$
The $4$ and the $3$ multiply to give $12$.


As you can see, the correct answer is $12[\tan(3x)]^{3}\sec^{2}(3x)$, while the incorrect step resulted in $4[\tan(3x)]^{3}\sec^{2}(3x)$ (one third of the real answer, because the factor $b'(x)=3$ was left out).