Solution (source code)

= Solution

Since $1+\cos2x=2\cos^2x$, the equation reduces to $\cos^2x=0$. The only solution in the open interval $(\pi,2\pi)$ is
$$
\boxed{x=\frac{3\pi}{2}.}
$$