What is the correct way of expressing the general solution of $\sin x=0,1,-1$ and $\cos x=0,-1,1$? The general solution of $\sin x = \sin y$ is $x = n\pi + (-1)^ny$. Then if $\sin x = 1$ or $\sin x = \sin(\frac{\pi}{2})$ or $x = n\pi+(-1)^n\frac{\pi}{2}$. Is this correct?
Also, the general solution of $\cos x = \cos y$ is $x = 2n\pi \pm y$. Then if $\cos x = 0$ or $x = 2n\pi \pm \frac{\pi}{2}$. Is this correct?
Also for $\cos x = 1,-1$, I am confused.

The clearest way of writing the solutions are
$$
\sin{x} = \sin{y} \Leftrightarrow x = y + n2\pi \text{  or  } x = \pi - y + n2\pi$
$$
$$
\cos{x} = \cos{y} \Leftrightarrow x = \pm y + n2\pi
$$
where $n$ is a whole number.
