Solving equations of the following form

I am currently studying resolution of concurrent forces and I have come across equations of the following type $$P\cos \theta+Q\sin \phi=C_1$$ $$P\sin \theta+Q\cos \phi=C_2$$ where $P$,$Q$,$C_1$and $C_2$ are known and I have to find the angles. I usually get stuck at this point as I don't know how to solve the 2 equations to get $\theta$ and $\phi$ and I have to resort to looking for other geometrical relationships.

rewritten $$P\cos \theta=-Q\sin \phi+C_1$$ $$P\sin \theta=-Q\cos \phi+C_2$$ then $$P^2=C_1^2+C_2^2+Q^2 - 2Q(C_1\sin\phi+C_2\cos\phi)$$ or $$C_1\sin\phi+C_2\cos\phi = \frac{C_1^2+C_2^2+Q^2-P^2}{2Q}.$$
Let $R= \sqrt{C_1^2+C^2_2}$. Now there exists $\psi\in[0,2\pi)$ (hint: $\arctan(C_2/C_1)$) such that $$C_1 = R\cos\psi,\quad C_2=R\sin\psi.$$ Therefore $$\cos\psi\sin\phi+\sin\psi\cos\phi = \frac{R^2+Q^2-P^2}{2QR},$$ $$\sin(\phi+\psi)=\frac{R^2+Q^2-P^2}{2QR}.$$ This equation allows you to find $\phi$ or conclude that it doesn't exist. The equation on $\theta$ is obtained likewise.
• @GTXOC it may very well be the case. You problem can be viewed as "how to rotate two vectors of magnitude $P$ and $Q$ in $\Bbb R^2$ such that their sum is a vector with coordinates $(C_1,C_2)$". The geometric interpretation of sum of vectors is essentially a triangle. – TZakrevskiy Jan 31 '14 at 14:39