<s>[INST] Trigonometric equation $\sin x+1=\cos x$ $$\sin x+1=\cos x,\quad x\in[-\pi,\pi]$$
How do you solve by squaring both sides? the solution is $x\in\{-\pi/2,0\}$ so the solutions $\pi$ and $-\pi$ are inadmissible, I do not understand how by subbing $-\pi$ back into both sides of the equations makes them unequal, and the same for positive $\pi$. Which equation are you subbing $\pi$ into to check, the original?
 [/INST] $\sin x + 1 = \cos x$
$\sin \pm \pi + 1 = 1 \ne \cos \pm \pi = -1$ so $\pm \pi$ are not solutions.
$\sin -\pi/2 + 1 = -1 + 1 = 0 = \cos -\pi/2 $ so $-\pi/2$ is solution.
$\sin 0 + 1 = 0 + 1 = \cos 0 $ so $0$ is solution.
But how to solve?
$\sin x + 1 = \cos x$ 
$\sin x - \cos x = -1$
$(\sin x -\cos x)^2 = (-1)^2$
$\sin^2 x + \cos^2 - 2\cos x \sin x = 1$
$1 - 2\cos x \sin x = 1$
$\cos x \sin x = 0$
So $\cos x = 0 $ or $\sin x = 0$.
So $x =\pm \pi/2$ or $x = \{0, \pi\}$.
But note.
$\sin x + 1 = \cos x \le 1$ so $\sin x = \cos x - 1 \le 0$  and $\cos x = \sin x + 1 \ge -1 + 1 = 0$.
$x = \pi/2 \implies \sin x = 1 > 0$ so $-\pi/2$ is not solution.
$x = \pi \implies \cos x = -1 < 0$ so $\pi$ is not solution
Solutions are $-\pi/2$ or $0$.
</s>