<s>[INST] Solving $2\cos(x) = \sin(x)$ How would you solve equations of the form $ a \sin (x+b) = \sin (x)$?
Eg. $ 2 \cos(x) = \sin(x) $
I realy have no idea how I would solve this kind of equations.
 [/INST] I would do a tan half angle substitution with $t = \tan \frac{x}{2}$ which leads to
 $$ \cos(x) = \cos\left( 2 \tan^{-1} t \right) = \frac{1-t^2}{1+t^2} \\
\sin(x) =\sin \left( 2 \tan^{-1} t \right) =\frac{2 t}{1+t^2} $$
which transforms your problem to
$$ \frac{1-t^2}{1+t^2} a \sin(b) + \frac{2 t}{1+t^2} \left(a \cos(b)-1\right) =0 \rightarrow$$
$$ 2 t \left(a \cos b -1\right) + a (1-t^2)\sin b=0  $$
The above has two solutions
$$ \boxed{ t = \dfrac{a\cos b-1 \pm \sqrt{c}}{a \sin b} }$$ where $c=1+a (a-2\cos b) $, and $ \boxed{x= 2 \tan^{-1} t }$.
So with $a=2$ and $b=0$ the result is $x =\pm \pi$
Notes:
This method allows the transformation of any trigonometric expression into a polynomial expression. it is often used in Robotics.
</s>