<s>[INST] Simplifying the derivative of $\sin(\cos^2 x)\cos(\sin^2 x)$ Differentiating the term
$$\sin(\cos^2 x)\cos(\sin^2 x)$$
leads me through the chain and product rule to
$$-\sin(2x)\cos(\cos^2 x)\cos(\sin^2 x)+(-\sin(\sin^2 x)\sin(2x)\sin(\cos^2 x))$$
where the derivative of $\sin^2 x$ equals to
$$\frac{d}{dx} \sin^2 x = 2\sin x \frac{d}{dx} \sin x = 2\sin x \cos x = \sin 2x$$
and $\frac{d}{dx} cos^2 x$ to $-\sin 2x$ respectively.
Through factorization, I can then simplify the term to
$$-\sin 2x\ (\cos(\cos^2 x)\cos(\sin^2 x) + \sin(\sin^2 x)\sin(\cos^2 x))$$
The problem starts here where I fail to find a simplification for the second factor which, according to Wolfram Mathematica, should lead to $\cos(\cos 2x)$ and ultimately to
$$-\sin(2x)\cos(\cos 2x)$$
How and which trigonometric identities could I apply to get to that? Is my approach right?
 [/INST] If we start with $$y=\sin \left(f(x)^2\right) \cos \left(g(x)^2\right)$$
$$y'=2 f(x) f'(x) \cos \left(f(x)^2\right) \cos \left(g(x)^2\right)-2 g(x) g'(x)\sin
   \left(f(x)^2\right)  \sin \left(g(x)^2\right)$$ If $f(x)=\cos(x)$ and $g(x)=\sin(x)$, then
$$2 f(x) f'(x)=-2 \sin (x) \cos (x)=-\sin(2x)$$
$$2 g(x) g'(x)=+2 \sin (x) \cos (x)=+\sin(2x)$$ So
$$y'=-\sin(2x)\Big[\cos \left(f(x)^2\right) \cos \left(g(x)^2\right)+\sin
   \left(f(x)^2\right)  \sin \left(g(x)^2\right) \Big]$$
$$\cos \left(f(x)^2\right) \cos \left(g(x)^2\right)+\sin
   \left(f(x)^2\right)  \sin \left(g(x)^2\right)= \cos\left(f(x)^2-g(x)^2 \right)$$ Continue and get the result.
</s>