The tangent half-angle substitution is very powerful for equations of the form $a\sin\theta + b\cos\theta = c$. However, remember that this substitution is not defined for $\theta = (2n+1)\pi$, as $\tan(\theta/2)$ would be undefined. Also, be sure to check for extraneous solutions introduced by the algebraic manipulation, as seen here with the $\theta \neq (2n+1)\pi/2$ condition.