Solve $\cos(x) = \cos(x+a)$, if $\cos(x)\ge0$
This is how I did it:
For $\cos(x)\ge0, x\in[(4n-1)\frac\pi2,(4n+1)\frac\pi2]$
Also, $\cos(x+a)\ge0\implies x+a\in[(4m-1)\frac\pi2,(4m+1)\frac\pi2]$
$$\cos(x+a)=\cos(x)\\x+a=2n\pi\pm x$$
Case I: Taking the $+$ sign,
$a=2n\pi$
For these values of $a$, $x\in[(4n-1)\frac\pi2,(4n+1)\frac\pi2]$. This also satisfies the condition that $\cos(x+a)\ge0$
Case II Taking the $-$ sign,
$x=\frac{2n\pi+a}{2}$
How do I solve the rest of it, satisfying the conditions on $x$ and $a$ simultaneously? Should I replace $x$ with $\frac{2n\pi+a}{2}$ in the first two conditions or do something else?
Like Mathmo says, solve the resulting equation after expanding using the identity for cosine of the sum:
$$\cos(x)=\cos(x+a)\Rightarrow$$ $$\cos(x)=\cos(x)\cos(a)-\sin(x)\sin(a)\Rightarrow$$ $$\cos(x)\cdot(\cos(a)-1)=\sin(x)\sin(a)\Rightarrow$$ $$\frac{\sin(x)}{\cos(x)}=\frac{-1+\cos(a)}{\sin(a)}\Rightarrow$$ $$\tan(x)=\frac{-1+\cos(a)}{\sin(a)}\Rightarrow$$ $$x=\arctan\left(\frac{-1+\cos(a)}{\sin(a)}\right )$$