# Problem while using general angle for cos x

While going through 'Plane Trigonometry by SL Loney' I came across an article for general value of $$\cos x$$ which is $$\left(2n\pm\frac12\right)\cdot\frac\pi2$$. But, when I am solving $$\cos x = 0$$, the answer I am getting is $$\left(2n\pm\frac12\right)\cdot\frac\pi2$$, but as per book the answer is $$\left(n+\frac12\right)\cdot\frac\pi2$$. Why does the answer only contain the plus sign but not the minus sign?

We can easily show that $$\frac12\left(2m\pm\frac12\right)=\frac12\left(n+\frac12\right)$$ for integer $$m,n$$. For any $$m$$, if $$n=2m$$, $$\frac12\left(2m+\frac12\right)=\frac12\left(n+\frac12\right)$$ (note the + sign) and if $$n=2m-1$$ then $$\frac12\left(2m-\frac12\right)=\frac12\left(n+\frac12\right)$$.
If $$\dfrac{(2n_1+1)\pi}2=\dfrac{(2n_2-1)\pi}2$$
$$\iff2n_1+1=2n_2-1\iff n_1=n_2-1$$
So, both $$\dfrac{(2n_1+1)\pi}2,\dfrac{(2n_2-1)\pi}2$$ independently covers the exhaustive solution set for integer values of $$n_1,n_2$$