Right so using the product rule for 3 expression, I wound up with
$\left(\cos x\right)\left(\sin x\right) - x\sin ^2 x + x\cos ^2 x$.
My main issue is cleaning this up to get the derivative to equal
$\frac{1}{2}\sin 2x + x\cos 2x$.
I am not quite sure where the change from x to 2x came from. I know it's probably some old trig rules that I have forgotten. So if anyone could help with the simplification that would be great! Thanks!
$\endgroup$ 14 Answers
$\begingroup$Arguably easiest way would be to use the $\sin 2x = 2 \sin x \cos x$ identity before taking derivatives:
$$ (x\,\sin x\,\cos x)' = \frac{1}{2}(x\,\sin 2x)' = \frac{1}{2}\big((x)'\,\sin 2x + x\,(\sin 2x)'\big)= \frac{1}{2}\,\sin 2x + x\,\cos 2x $$
$\endgroup$ 1 $\begingroup$Use $\sin x \cos x = (1 / 2) \sin (2 x)$, then substitute $u = 2 x$. The rest should follow.
$\endgroup$ 0 $\begingroup$Look at the identity:
$\sin(2x)=2\sin(x)\cos(x)$
and for the other just factor and use an identity:
$-x\sin^2(x)+x\cos^2(x)=x(\cos^2(x)-\sin^2(x))=x\cos(2x)$
Where the identity is: $\cos^2(x)-\sin^2(x)=\cos(2x)$ since:
$\cos(a+b)=\cos(a)\cos(b)-\sin(a)\sin(b)$
put $b=a$ and obtain:
$\cos(a+a)=\cos(2a)=\cos(a)\cos(a)-\sin(a)\sin(a)=\cos^2(a)-\sin^2(a)$
$\endgroup$ $\begingroup$$(cosx)(sinx)-xsin^2x+xcos^2x$
as we know :
$(cosx)(sinx) = 0.5sin2x$
$-xsin^2x+xcos^2x = x(cos^2x-sin^2x)=x(cos2x)$
hence the answer is : $0.5sin2x +x(cos2x)$
$\endgroup$