Need help calculating a differential using trigonometrical functions

I'm in a Calculus I class, and have a pretty good grasp on differentials, but I'm having trouble with this one:

$$y=2x^2\cos(x)\cot(x)$$

I had solved it this way, using the Power Rule and the Product Rule:

\begin{align*} y'(x)&=2\frac{d}{dx}x^2\left[\cos(x)\frac{d}{dx}\cot(x)+\cot(x)\frac{d}{dx}\cos(x)\right]\\ &=4x\left(-\cos(x)\csc^2(x)-\cot(x)\sin(x)\right). \end{align*}

The online homework website didn't like that answer, so I thought maybe it wanted me to distribute the $4x$, and it unfortunately generated another similar problem, so I followed the same steps, and distributed the final value:

$$y=9x^2\sin(x)\tan(x)$$

\begin{align*} y'&=9\frac{d}{dx}x^2\left[\sin(x)\frac{d}{dx}\tan(x) + \tan(x)\frac{d}{dx}\sin(x)\right]\\ &=18x\left(\sin(x)\sec^2(x) + \tan(x)\cos(x)\right)\\ &=18x \sin(x)\sec^2(x) + 18x \tan(x)\cos(x). \end{align*}

I'm not sure where I'm going wrong. Do I have to use the product rule twice? I thought that only applied to functions. Thanks!

hint...You have three not two functions multiplying each other, so you need the product rule in the form $$(uvw)'=u'vw+uv'w+uvw'$$

• That was definitely it! I think I may have been confusing something I saw prior and trying (incorrectly) to apply it to this – Josh Toth May 20 '17 at 23:11

Hints:

1. To make your job simpler, multiply $\cos x$ with $\cot x$ first, bringing everything in terms of $\sin x$ and $\cos x$.
2. Use the division rule $$\left(\frac{f}{g}\right)' = \left(\frac{fg'-gf'}{g^2}\right)$$.
3. There will be some simplification at the end, but you can choose to revert back to $\cot x$ if you wish.

The answer I got was $2x^2 \cot^2 x -4 x^2 \csc x.$ EDITED

• Thank you! That does seem simpler. – Josh Toth May 20 '17 at 23:12
• My pleasure! When I saw the original answer I had to do a double check. You can also simplify it further to $2x^2 (\cot^2 x - 2 \csc x)$ if you want to clean it up. – bjcolby15 May 20 '17 at 23:18