I tried solving this equation as follows where $0\leq\theta\leq2\pi$: $$\frac{1}{\sqrt2}(\sin(\theta)+\cos(\theta))=\frac{1}{\sqrt2}$$ Divide both sides by $\frac{1}{\sqrt2}$. $$\sin(\theta)+\cos(\theta)=1$$ Divide both sides by $\cos(\theta)$. $$\tan(\theta)+1=\sec(\theta)$$ square both sides: $$(\tan(\theta)+1)^2=\sec^2(\theta)$$ $$\tan^2(\theta)+2\tan(\theta)+1=\sec^2(\theta)$$ Use the identity $\sec^2(\theta)=\tan^2(\theta)+1$: $$\tan^2(\theta)+2\tan(\theta)+1=\tan^2(\theta)+1$$ $\therefore$ $$2\tan(\theta)=0$$ $\therefore$ $$\tan(\theta)=0$$ $\therefore$ $$\theta=0,\pi,2\pi$$ I know that 0 and $2\pi$ are correct but that $\pi$ is wrong. I also know that the other correct answer is $\frac{\pi}{2}$.
Where did I go wrong?