<s>[INST] Solve a trigonometric equation: $|1-2\sin^2 x|=|\cos x|$ I have difficulty in solving this equation:
$$|1-2\sin^2 x|=\lvert\cos x\rvert.$$
What are the indications to solve the exercise correctly?
 [/INST] Since both sides are absolute values, you can square both sides:
$$\begin{align}
1-4\sin^2x+4\sin^4x&=\cos^2x \\
0&=-3\sin^2x+4\sin^4x \\
&=\sin^2x\left(4\sin^2x-3\right) \\
\sin x&=0,\pm\frac{\sqrt3}2
\end{align}$$

Following a comment by @labbhattacharjee, we note that $\sin(3x)=3\sin(x)-4\sin^3x$, so
$$\begin{align}
0&=-\sin(3x)\sin x \\
x&=\frac{\pi}3k  , \quad k\in\mathbb Z.
\end{align}$$
</s>