<s>[INST] Why am I getting the same angle by inputting different values of n in the general solution? Problem:
Solve: $\sqrt{3}\sin x-\cos x=2$, $-2\pi<x<2\pi$
My attempt:
$$\sqrt{3}\sin x-\cos x=2$$
$$\frac{\sqrt{3}}{2}\sin x-\frac{1}{2}\cos x=1$$
$$\sin(\frac{\pi}{3}).\sin x-\cos(\frac{\pi}{3})\cos x=1$$
$$\cos(\frac{\pi}{3})\cos x-\sin(\frac{\pi}{3}).\sin x=-1$$
$$\cos(x+\frac{\pi}{3})=\cos{\pi}$$
$$x+\frac{\pi}{3}=2n\pi\pm\pi, \text{where $n$ belongs to $\mathbb{Z}$}$$
$$x=2n\pi\pm\pi-\frac{\pi}{3}$$
Now, if $n=0$,
$$x=\frac{2\pi}{3},-\frac{4\pi}{3}$$
If $n=1$,
$$x=\frac{8\pi}{3},\frac{2\pi}{3}$$
If n=-1,
$$x=-\frac{4\pi}{3}, -\frac{10\pi}{3}$$
So, in the given interval, $x=\frac{2\pi}{3}, \frac{-4\pi}{3}$ (Ans.)
Question:
When $n=0$, and when $n=1$, I get $\frac{2\pi}{3}$. Similarly, when $n=0$, and when $n=-1$, I get $-\frac{4\pi}{3}$. Why am I getting the same angle twice for different values of $n$?
 [/INST] $$x=2n\pi\pm\pi-\frac{\pi}{3}\\=-\frac{\pi}{3}+\pi(\color{red}{2n\pm1}).$$
$\color{red}{2n\pm1}:\quad\dots,-7,-7,-5,-5,-3,-3,-1,-1,1,1,3,3,5,5,\ldots.$
When solving trigonometric equations generally and the cosine or secant of the generating solution equals $-1,$ then $\color{red}{2n\pm1}$ occurs, giving rise to repeating/overlapping solutions.
This is inconsequential since the obtained collection of solutions is exhaustive anyway.
</s>