Find $f'(x)$ when $f(x) = x\cos(x) \sin(x)$
I tried using the product rule on $x\cos x$ and got: $$(x\cos x)' = -x\sin x + \cos x$$ then I used the product rule to differentiate $x\cos x\sin x$ and got: $$(x\cos x \sin x)' = (-x \sin x + \cos x)\sin x+ (x\cos x \cos x)= -x\sin^2x+ \sin x \cos x + x\cos^2x$$ My testbook says the answer is $\frac12\sin2x+ x\cos2x$
Can someone please explain how to achieve the answer shown in my textbook? I am new to calc and trig, and I'm very confused. Any help is appreciated.
You're right. Use,
and
So that,
$x(\cos^2x-\sin^2x) + \sin x \cos x = x\cos(2x) + \frac{1}{2}\sin(2x)$