How to solve the following trigonometrical equation? I have the following equations
\begin{align*}
R_1\cos(\omega T_1-\phi_{1})& =Q_1-R_2\cos(\omega T_2-\phi_{2})\\
R_1\sin(\omega T_1-\phi_{1})& =-Q_2-R_2\sin(\omega T_2-\phi_{2}).
\end{align*}
From these equations how can I obtain the following solution
$$\omega T_2=\pm \arccos\left(\frac{Q_1^2+Q_2^2-R_1^2+R_2^2}{2R_2\sqrt{Q_1^2+Q_1^2}}\right)-\arctan\left(\frac{Q_2}{Q_1}\right)+\phi_2+2k\pi .$$
 A: As mentioned in the comments by @Blue the problem can be reduced into $$ a \sin \theta + b \cos \theta +c = 0 $$
to be solved for $\theta$.
The way I have dealt with this equation in the past was to split the angle into two angles $\theta = \varphi + \psi$, and expand 
$$\sin \theta = \sin(\varphi+\psi) = \cos\varphi \sin\psi + \sin\varphi \cos\psi$$
 $$\cos \theta = \cos(\varphi+\psi) = \cos\varphi \cos \psi - \sin\varphi \sin\psi$$
Then my equation to be solved is
$$ \Bigl( \cos\varphi ( b \cos\psi + a \sin \psi) \Bigr) + \Bigl( \sin\varphi (a \cos\psi - b \sin\psi)+c \Bigr) =0 $$
and you can set each part equal to zero individually
$$\begin{aligned}
  \cos\varphi ( b \cos\psi + a \sin \psi) & = 0 \\
  \sin\varphi (a \cos\psi - b \sin\psi)+c & = 0
\end{aligned} $$
The first one is solved by $\boxed{\psi = -\tan^{-1} \left( \frac{b}{a} \right) + k \pi }$ which transforms the second one into 
$$ \sin\varphi \sqrt{a^2+b^2}+c = 0 $$
with solution $\boxed{ \varphi = \sin^{-1}\left( \frac{c}{\sqrt{a^2+b^2}} \right) +2 k \pi}$
So all together you have
$$ \boxed{ \color{blue}{ \theta = \sin^{-1}\left( \frac{c}{\sqrt{a^2+b^2}} \right)-\tan^{-1} \left( \frac{b}{a} \right) +2 k \pi} } $$
A: From $$a\sin\theta+b\cos\theta+c=0,$$
$$a^2\sin^2\theta=a^2(1-\cos^2\theta)=(b\cos\theta+c)^2$$
and
$$(a^2+b^2)\cos^2\theta+2bc\cos\theta+c^2-a^2=0.$$
You solve the quadratic equation for $\cos\theta$, and $\sin\theta$ follows.
A: Another way to tackle the same problem of solving $a \sin \theta + b \cos \theta + c = 0$ is to use the tan-half-angle substitutions
$$\begin{aligned}
t &=  \tan \left( \frac{\theta}{2} \right)\, \rightarrow & \theta = 2 \arctan(t) \\
\sin(\theta) & = \frac{2 t}{1+t^2} \\
\cos(\theta) & = \frac{1-t^2}{1+t^2}
\end{aligned}$$
The problem is transformed into a polynomial equation
$$\left. a \frac{2 t}{1+t^2} + b \frac{1-t^2}{1+t^2} + c = 0 \right\}\;\;
t=\begin{cases} \frac{a+\sqrt{a^2+b^2-c^2}}{b-c} \\ \frac{a-\sqrt{a^2+b^2-c^2}}{b-c} \end{cases} $$
With the final and solution in terms of the angle
$$ \theta = \begin{cases} 2 \arctan\left( \frac{a+\sqrt{a^2+b^2-c^2}}{b-c} \right) \\ 2 \arctan\left( \frac{a-\sqrt{a^2+b^2-c^2}}{b-c} \right) \end{cases} $$

Example
$$ 5 \sin \theta + 2 \cos \theta - 3 = 0 $$
$$ t= \begin{cases} 
  \frac{5}{2-(-3)} + \frac{ \sqrt{5^2+2^2-(-3)^2}}{2-(-3)} = 1.89443 \\
  \frac{5}{2-(-3)} - \frac{ \sqrt{5^2+2^2-(-3)^2}}{2-(-3)} = 0.10557
\end{cases} $$
$$ \theta= \begin{cases} 
 2 \arctan(1.89443) = 2.170\,{\rm rad} \\
 2 \arctan(0.10557) = 0.2104\,{\rm rad}
\end{cases} $$
Check
$$ \begin{cases}
  5 \sin(2.170)+2 \cos(2.170) -3 \approx 0 \\
  5 \sin(0.2104) + 2\cos(0.2104) -3 \approx 0
\end{cases} $$
