Solving $\sin\theta -1=\cos\theta $ 
Solve$$\sin\theta -1=\cos\theta $$

Steps I took to solve this:
$$\sin^{ 2 }\theta -2\sin\theta +1=1-\sin^2\theta $$
$$2\sin^{ 2 }\theta -2\sin\theta =0$$
$$(2\sin\theta )(\sin\theta -1)=0$$
$$2\sin\theta =0, \sin\theta -1=0$$ 
$$\quad \sin\theta =0, \sin\theta =1$$
$$\theta =0+\pi k, \theta =\frac { \pi  }{ 2 } +2\pi k$$
Why is $\theta =0+\pi k$ wrong?

When you square both sides of an equation, you may introduce extraneous solutions.  Therefore, you must check that your solutions satisfy the original equations (a good idea in any case).
When you squared the equation $\sin\theta - 1 = \cos\theta$, you discovered that 
the resulting equation was satisfied when $\sin\theta = 0$ or $\sin\theta = 1$.  
In the interval $[0, 2\pi)$, the equation $\sin\theta = 0$ is satisfied when $\theta = 0$ or $\theta = \pi$.  If $\theta = 0$, then 
$$\sin(0) - 1 = 0 - 1 = -1 \neq 1 = \cos(0)$$
so $0$ is an extraneous solution.  On the other hand, if $\theta = \pi$, then 
$$\sin(\pi) - 1 = 0 - 1 = -1 = \cos(\pi)$$
so $\theta = \pi$ is a valid solution. 
In the interval $[0, 2\pi)$, the equation $\sin\theta = 1$ is satisfied when $\theta = \dfrac{\pi}{2}$.  When $\theta = \dfrac{\pi}{2}$, 
$$\sin\left(\frac{\pi}{2}\right) - 1 = 1 - 1 = 0 = \cos\left(\frac{\pi}{2}\right)$$
Thus, $\theta = \dfrac{\pi}{2}$ is a valid solution.  
Thus, the general solution of the equation $\sin\theta - 1 = \cos\theta$ is 
$$
\theta = 
\begin{cases}
\pi + 2n\pi, n \in \mathbb{Z}\\
\dfrac{\pi}{2} + 2n\pi, n \in \mathbb{Z}
\end{cases}
$$
