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!
There is two small errors: