General solution to the equation $\sin x+\cos x$=$1$ is found to be $x=2n\pi$ and $x=2n\pi+\pi/2$, Pls refer Solving cosx+sinx−1=0
My Approach: $$ \sin x+\cos x=1\implies \sin x\frac{1}{\sqrt{2}}+\cos x\frac{1}{\sqrt{2}}=\frac{1}{\sqrt{2}}\\\implies\sin x\cos(\pi/4)+\cos x\sin(\pi/4)=\sin(\pi/4)\implies \sin(x+\pi/4)=\sin(\pi/4)\implies x+\pi/4=n\pi+(-1)^n [\pi/4]\implies x=n\pi+(-1)^n\frac{\pi}{4}-\frac{\pi}{4} $$ How do I check both the results are the same, without inputting the values for $n$ ?