# How to solve a quadratic in $\sin(t)$ and $\cos(t)$

How can I solve this form of quadratic? It has no $\sin(t)\cos(t)$ term.

$$(\cos(t) + p + a)^2 - a^2 + b (\sin(t) + q)^2 = 0$$

Multiplied out:

$$\cos^2(t) + 2(a+p)\cos(t) + b\sin^2(t) + 2bq\sin(t) + (p^2 + 2ap + bq^2) = 0$$

I'm at a loss for anything short of writing it out in complex exponentials. Is there another technique?

-
try to replace $\cos(t)$ with x and $\sin(t)$ with $\sqrt{1-x^2}$ and solve to x – ratchet freak Oct 13 '11 at 18:44
Is that going to mess with anything? I'd lose the sign, wouldn't I? – jnm2 Oct 13 '11 at 18:46
Maybe use double angle formulas? – user13838 Oct 13 '11 at 18:49
no the simple $\cos$ term will keep the sign (and you should double check anyway as you'll need to square out the root) – ratchet freak Oct 13 '11 at 18:50

Might I suggest the t-formulae?

$t = \tan\dfrac{x}{2}$

$\sin\,x = \dfrac{2t}{1+t^2}$

$\cos\,x = \dfrac{1-t^2}{1+t^2}$

-
More formally, this is called the Weierstrass substitution. – J. M. Oct 13 '11 at 22:50

Well, $(x + p + a)^2 - a^2 + b (y + q)^2 = 0$ is an ellipse (or hyperbola). Also, $(\cos t, \sin t)$ parametrizes a circle $x^2+y^2=1$. You want the intersection, which could have 4 points on it.

-