Taking the derivative of $x^4\sin(x)\cos(x)$, which step is wrong? I'm trying to take the derivative of $x^4\sin(x)\cos(x)$ and I keep getting the wrong answer.
My steps:
$$\frac {d}{dx}[x^4\sin(x)\cos(x)]$$
Apply product rule:
$$\frac {d}{dx}[x^4](\sin(x)\cos(x)+x^4\frac {d}{dx}[\sin(x)\cos(x)]$$
Simplify first part:
$$4x^3\sin(x)\cos(x)+x^4\frac {d}{dx}[\sin(x)\cos(x)]$$
Apply product rule to second part:
$$\cos(x)\cos(x)+(-\sin(x))$$
Add them all together: $$4x^3\sin(x)\cos(x)+x^4\cos^2(x)-\sin(x)$$
So something is wrong as the correct answer is $$-x^4\sin^2(x)+x^4\cos^2(x)+4x^3\cos(x)\sin(x)$$
Got the biggest headache from this one, would really appreciate help! Thanks!
 A: There is two small errors:


*

*A missing term in the product rule:
$$ \frac{d}{dx} \left(\sin(x) \cos(x) \right)=\cos(x) \cos(x)-\sin(x) \color{green}{ \sin(x)}$$

*The distribution of $x^4$:
$$x^4( \cos(x)^2-\sin(x)^2)=x^4 \cos(x)^2- \color{green}{x^4} \sin(x)^2$$

A: Hint: we get $$(uvw)'=u'vw+uv'w+uvw'$$
For your Control: The result is given by $$-x^4 \sin ^2(x)+x^4 \cos ^2(x)+4 x^3 \sin (x) \cos (x)$$
A: Consider simplifying before differentiating
$$\sin x \cos x=\frac{1}{2} \sin{2x}$$ 
Now all you are to differentiate is
$$x^4 \cdot \frac{1}{2} \sin{2x} $$
A: you forgot  a $\sin(x) $ in calculating the derivative of $\sin(x)\cos(x)$
In general   $\frac{d}{dx}[u\cdot v\cdot w] = u'\cdot v \cdot w+u\cdot v'\cdot w+u\cdot v\cdot w'$
$\frac{d}{dx}[x^4\sin(x)\cos(x)] =4x^3\sin(x)\cos(x)+x^4\cos^2(x)-x^4\sin^2(x) $
A: This line is not correct
$$\cos(x)\cos(x)+(-\sin(x))$$
It's better to use
$\sin(2x)=2\sin(x)\cos(x)$ before to differentiate
$$\frac {d}{dx}[x^4\sin(x)\cos(x)]=\frac 12\frac {d}{dx}[x^4\sin(2x)]=2x^3\sin(2x)+x^4\cos(2x)$$
A: $$\dfrac{d}{dx}(x^4\cdot \sin(x)\cdot cos(x))$$
Let $u = x^4$ and $v = \sin(x) \cdot  \cos(x)$. From the well known formula we know 
$$
\begin{align}
\dfrac{d}{dx}(u \cdot v) & = u \dfrac{dv}{dx} + v \dfrac{du}{dx} \\
 & = x^4 \dfrac{d}{dx}(\sin(x) \cdot  \cos(x)) + \sin(x) \cdot  \cos(x) \cdot \dfrac{d}{dx}(x^4) \\ 
 & = x^4 \dfrac{d}{dx}(\sin(x) \cdot  \cos(x)) + 4 \cdot x^3 \sin(x) \cdot  \cos(x)
\end{align}
$$
Expression simplified but we still need to solve $\dfrac{d}{dx}(\sin(x) \cdot  \cos(x))$
let $u = \sin(x)$ and $v = cos(x)$
$$
\begin{align}
\dfrac{d}{dx}(u \cdot v) & = u \dfrac{dv}{dx} + v \dfrac{du}{dx} \\
 & = \sin(x) \dfrac{d}{dx}(\cos(x)) + \cos(x) \cdot  \cos(x) \cdot \dfrac{d}{dx}(\sin(x)) \\ 
 & = \sin(x) \cdot(- \sin(x)) + cos(x) \cdot \cos(x) \\
 & = (\cos(x))^2 - (\sin(x))^2
\end{align}
$$
All we need is to substitute this back.
$$
\begin{align}
\dfrac{d}{dx}(x^4\cdot \sin(x)\cdot cos(x)) & = x^4 \dfrac{d}{dx}(\sin(x) \cdot  \cos(x)) + 4 \cdot x^3 \sin(x) \cdot \\
& = x^4 ((\cos(x))^2 - (\sin(x))^2) + 4 \cdot x^3 \sin(x)
\end{align}
$$
A: Expanding on other answers here
$$\dfrac{d}{dx}(u \cdot v \cdot w)$$
where $u$, $v$ and $w$ are functions of $x$
$$
\begin{align}
\dfrac{d}{dx}(u \cdot v \cdot w) & = u \cdot \dfrac{d}{dx}(v \cdot w) + v \cdot w \cdot \dfrac{du}{dx} \\
 & = u \cdot \left( v \cdot \dfrac{dw}{dx} + w \cdot \dfrac{dv}{dx}\right) + v \cdot w \cdot \dfrac{du}{dx}\\
 & = u \cdot  v \cdot \dfrac{dw}{dx} + v \cdot \dfrac{dv}{dx} \cdot w + \dfrac{du}{dx} \cdot v \cdot w\\  
& = u \cdot v \cdot w' + u \cdot v' \cdot w + u' \cdot v \cdot w = (u \cdot v \cdot w)'
\end{align}
$$
I'm not claiming this as mine but I thought a derivation would help others (including me) see where this comes from.
