<s>[INST] solution to  equation $a \cdot \cos(\theta) - b \cdot \sin(\theta) = c$ Does the equation
$$ a \cdot \cos(\theta) - b \cdot \sin(\theta) = c$$
have a closed-form solution for $\theta$?  What about the case where $a^2 + b^2 = 1$?
 [/INST] Using the identity $ sin(x)^2 + cos(x)^2=1 $, we have,
$$a \cdot\, \cos(\theta) - b \cdot \sin(\theta) = c \Rightarrow  a\sqrt{1-\sin^2(\theta)}= b \cdot \sin(\theta) + c $$ 
$$ \Rightarrow  a^2\,(1-\sin^2(\theta)) = ( b\sin(\theta) +c)^2 $$
$$ (a^2 + b^2)\sin(\theta)^2 + 2bc \sin(\theta) + (c^2-a^2)=0\,. $$
The above equation is quadratic in $\sin(\theta)$. Solving the equation in $\sin(\theta)$ yields,
$$ \sin(\theta) = \frac{ -2bc \pm \sqrt{4b^2c^2-4(a^2+b^2)(c^2-a^2)}}{2(a^2+b^2)}  $$
I believe you know how to find theta from here. Do not forget that $-1\leq \sin(\theta) \leq 1$.
</s>