[Math] Differentiate $\,y = 9x^2 \sin x \tan x:$ Did I Solve This Correctly

calculusderivatives

I'm posting my initial work up to this point.
Criticism welcomed!


Using the formula $(fgh)' = f'gh+fg'h + fgh'$, differentiate$$y = 9x^2\sin x \tan x$$

$$\begin{align} y' &= 9\frac d{dx}(x^2)\sin x \tan x + 9x^2 \frac d{dx} (\sin x) \tan x + 9x^2\sin x \frac d{dx}(\tan x)\\ \\
& = 9(2x\sin x \tan x + 9x^2-\cos x \tan x + 9x^2\sin x \sec^2x\\ \\
&=9\Big(2x\sin x \tan x + x^2 -\cos x \tan x + x^2\sin x \sec^2 x\Big)
\end{align}$$


Have I done it correctly up and until this point?

Best Answer

\begin{aligned} \frac{d}{dx}(9x^2 \sin(x) \tan(x)) & = \frac{d}{dx}[9x^2]\sin(x) \tan(x) + 9x^2 \frac{d}{dx}[\sin(x)]\tan(x)+9x^2 \sin(x) \frac{d}{dx}[\tan(x)] & \\ & = 9(2x) \sin(x) \tan(x)+9x^2 \cos(x) \tan(x) + 9x^2 \sin(x) \sec^2(x)& \end{aligned}

and $\cos(x)\tan(x) = \sin(x)$, so:

\begin{aligned} \frac{d}{dx}(9x^2 \sin(x) \tan(x)) & = \color{red}{9(2x) \sin(x) \tan(x)+9x^2 \cos(x) \tan(x) + 9x^2 \sin(x) \sec^2(x)} & \\ & = 9(2x) \sin(x) \tan(x)+9x^2 \sin(x) + 9x^2 \sin(x) \sec^2(x) & \\ & = 9x\sin(x)[2\tan(x) + x + x\sec^2(x)]& \end{aligned}

So the derivative is:

$$\boxed{9x\sin(x)[2\tan(x) + x + x\sec^2(x)]}$$

I noticed these errors in your work: In the $\color{red}{\mathrm{red}}$ line, you wrote a minus sign. I suspect you might have thought that $\frac{d}{dx}[\sin(x)] = -\cos(x)$. In your final line, you probably misinterpreted that minus sign no longer as a negative, but a difference:

$$9[2x \sin(x) \tan(x) + \boxed{x^2 -\cos(x) \tan(x)} + x^2 \sin(x) \sec^2(x)],$$ the $\boxed{\mathrm{boxed}}$ part should actually be

$$x^2 \cos(x)\tan(x).$$