What is the derivative for the function $f(x) = \sin^2(x)\sin(x^2)?$ I understand the process of the product rule and chain rule etc. My answer led to $[\sin^2(x)\cos(x^2)(2x)] + \sin(x^2)(2\sin x \cos x).$ According to my solutions manual this is so far correct, however the final answer reads $2\sin(x)[x\cos(x^2)+\cos(x)\sin(x^2)].$ I assume this is some algebraic manipulation with maybe trig identities however I have no idea how. I'd appreciate if someone explained how to arrive at that answer, thank you!

We get \begin{align*}
&(\sin^2 x)(\cos(x^2)) (2x)+(\sin (x^2))(2\sin x\cos x)\\
&=2\sin x(x\sin x\cos(x^2)+\sin(x^2)\cos x)
\end{align*} simply by factoring the $2\sin x$ from each term. This is a bit different than the answer you provided, but it is what the answer should be.
