Solution
= Solution
The <double-angle formula> gives $\cos2x=1-2\sin^2x$. Setting $s=\sin x$ reduces the equation to $2s^2+s-1=(2s-1)(s+1)=0$. On $0\le x\le\pi$, the <sine> is nonnegative, so only $s=1/2$ is allowed. Therefore
$$
\boxed{x=\frac\pi6\quad\text{or}\quad x=\frac{5\pi}6.}
$$