Show that the general value of $\theta$ satisfying $\sin\theta=\sin\alpha$ and $\cos\theta = \cos\alpha$ is given by $\theta = 2n\pi + \alpha$

No matter how complicated expressions get, you still can't divide by zero, which you implicitly did from the third line.

In this case we might have that $\sin\frac{\theta-\alpha}2=0$, which reduces to $\theta=2n\pi+\alpha$ for some $n\in\mathbb Z$ as desired. If it is not zero, we can divide by it and get $$\cos\frac{\theta+\alpha}2=\sin\frac{\theta+\alpha}2$$ which reduces to $\theta=\frac\pi2+2n\pi-\alpha$, but this does not satisfy the original system.


One problem is you divided by $\sin\left(\frac{\theta - \alpha}{2}\right)$ when going from the third to fourth lines. However, with $\theta = 2n\pi + \alpha$, then $\frac{\theta - \alpha}{2} = n\pi$, but $\sin(n\pi) = 0$. When you divide by $0$, basically anything can occur from it, including incorrect results such as what you got.

Tags:

Trigonometry