Solution (source code)

= Solution

The double-angle <trigonometric identity> gives $\cos x=2\sin x\cos x$, or $\cos x(1-2\sin x)=0$. Preserve both factors: $\cos x=0$ contributes the endpoint, while $\sin x=1/2$ contributes the interior solution. In the specified interval,
$$
\boxed{x=\frac\pi6,\quad\frac\pi2.}
$$