<s>[INST] How do I solve $(\cos2x+1)^2=1/2$? $x$ belongs to $$[0,\pi/2[$$
$$(\cos(2x+1))^2 = \frac{1}{2}$$
I tried to find $x$ using
$$2x+1=\frac{\pi}{4} +\frac{n\pi}{2}
\qquad\text{or}\qquad
2x+1=\frac{3\pi}{4}  + n\pi$$
but I didn't find my answer in MCQ which is
$$\frac{3\pi-4}{8}
\qquad\text{and}\qquad
\frac{5\pi-4}{8}.$$
I just need a hint on how to solve such equation.
 [/INST] $$
2x+1=\frac{3\pi}{4}  + n\pi
$$
subtract $1$
$$
2x=\frac{3\pi}{4} - 1  + n\pi
$$
Multiply by $1/2$
$$
x=\frac{3\pi}{8} - \frac{1}{2}  + n\frac{\pi}{2}
$$
The two answers shown correspond to $n=0$ and $n=1$.
</s>