<s>[INST] Extra solutions when solving $\sin\theta+\cos\theta=\sqrt{2\sin2\theta}$ The problem:
$$\sin\theta+\cos\theta=\sqrt{2\sin2\theta}$$
My solution:
$$\sin\theta+\cos\theta=\sqrt{2\sin2\theta}$$
$$\sin\theta+\cos\theta=\sqrt{2\times2\sin\theta\cos\theta}$$
$$\sin\theta+\cos\theta=2\sqrt{\sin\theta\cos\theta}$$
$$\sin\theta-2\sqrt{\sin\theta\cos\theta}+\cos\theta=0$$
$$(\sqrt{\sin\theta}-\sqrt{\cos\theta})^2=0$$
$$\sqrt{\sin\theta}=\sqrt{\cos\theta}$$
Either $\cos\theta$ or $\sin\theta$ can be equal to zero. Both can't be equal to zero at the same time. As we can see that $\sqrt{\sin\theta}=\sqrt{\cos\theta}$, neither of $\cos\theta$ and $\sin\theta$ is equal to zero. So, dividing both sides by $\cos\theta$ is valid.
$$\sqrt{\tan\theta}=1$$
$$\tan\theta=1$$
$$\theta=n\pi+\frac{\pi}{4}\tag{1}$$
My question:

*

*We've stumbled upon an interesting solution in (1). Here, $\theta$ satisfies our original equation only when $n$ is even or $0$. Why is that? Isn't $n$ supposed to belong to the set of integers?

PS: This might help you in answering the question.
 [/INST] We need that $\sin2\theta\ge 0$ that is
$$0+2n\pi\le2\theta \le \pi+2n\pi \quad \iff \quad n\pi\le \theta \le \frac \pi 2+n\pi$$
therefore only solutions in the first or third quadrant are allowed but since in the third quadrant $\sin \theta + \cos \theta <0$, only solutions in the $\color{red}{\text{first quadrant}}$ are allowed that is by $n=2k$
$$\color{red}{2k\pi\le \theta \le \frac \pi 2+2k\pi}$$
Then, since all terms involved in the expression are positive, and we have that for $A,B\ge 0$

$$A=\sqrt B \iff A^2=B$$

we can then proceed by squaring both side to obtain an $\color{magenta}{\text{equivalent equation}}$
$$\sin\theta+\cos\theta=\sqrt{2\sin2\theta} \iff 1+\sin 2\theta =2 \sin 2\theta \iff \color{magenta}{\sin 2\theta =1} $$
$$\iff2\theta=\frac \pi 2+2n\pi  \iff \theta=\frac \pi 4+n\pi\iff \color{magenta}{\theta=\frac \pi 4+2k\pi}$$

Edit
As an alternative approach, since all terms involved in the expression are positive, by AM-GM we obtain
$$\sin\theta+\cos\theta \ge 2\sqrt{\sin \theta \cos \theta}=\sqrt{2\sin 2\theta}$$
with equality for $\sin\theta=\cos\theta \implies \theta=\frac \pi 4+2k\pi$.
</s>