# How is the derivative of $x[4\sin(2x)+6\cos(2x)]$ the expression $(4-12x)\sin(2x)+(8x+6)\cos(2x)$

I am wondering because I have tried to answer this question, but have gotten a different answer: $(4-6x)\sin(2x)+(4x+6)\cos(2x)$.

To get the above answer I did the following steps:

1) Product rule: $\quad x[-6\sin(2x)+4\cos(2x)]+1[6\cos(2x)+4\sin(2x)]$

2) Group like terms: $\quad [-6x\sin(2x)+4\sin(2x)]+[4x\cos(2x)+6\cos(2x)]$

3) Factor out $\cos(2x)$ and $\sin(2x)$: $\quad (4-6x)\sin(2x)+(4x+6)\cos(2x)$

Does anyone know where I went wrong?

If so, can you please explain what I should have done to get the right answer?

All help is appreciated.

HINT: using the product and the chain rule we get $$4 \sin (2 x)+6 \cos (2 x)+x (8 \cos (2 x)-12 \sin (2 x))$$ can you simplify this to your Expression?
• this is the chain rule since $\cos(2x)'=-\sin(2x)\cdot 2$ Oct 31 '15 at 20:54
When taking the derivative of (for example) $4\sin 2x$, you need to apply the chain rule: \begin{equation*} \frac{d}{dx}(4\sin 2x) = 4\cos 2x\cdot\frac{d}{dx}(2x) = 8\cos 2x. \end{equation*}