Solution
= Solution
Substitution first makes the square-root branch transparent:
$$
z=\sqrt{\log(e^{\sin^2x})}=\sqrt{\sin^2x}=|\sin x|.
$$
On the given interval this is exactly $\sin x$, so direct <differentiation> gives
$$
\boxed{z''=-\sin x},
$$
in agreement with the chain-rule calculation. Outside this interval one must retain the absolute value; there are cusps at integer multiples of $\pi$.