This is a pretty dumb question, but it's been a while since I had to do math like this and it's escaping me at the moment (actually, I'm not sure I ever knew how to do this. I remember the basic trigonometric identities, but not anything like this).

I have a simple equation of one unknown, but the unknown occurs twice in different trigonometric functions and I'm not sure how to combine the two. I want to simply solve for $\theta$ in the following equation, where $a$ and $b$ are constants.

$a=\tan(\theta) - \frac{b}{\cos^2\theta}$

How can I reduce this into a single expression so that I can solve for $\theta$ given any $a$ and $b$?

(I'm only interested in real solutions and, in practice (this is used to calculate the incidence angle for a projectile such that it will pass through a certain point), it should always have a real solution, but an elegant method of checking that it doesn't would not go unappreciated.)

Based on Braindead's hint I reduced the equation to:


I can now solve for $\tan(\theta)$ using the quadratic equation, which gets me what I'm after. Is this the solution others were hinting towards? It seems like there would be a way to do it as a single trigonometric operation, but maybe not.

  • 2
    $\begingroup$ Sometimes you can find a single trigonometric function such that your expression can be written as, say, a polynomial or rational function in terms of it. This is the case here; think trig identities. But most of the time you can't. $\endgroup$ Jan 22 '11 at 2:08
  • 2
    $\begingroup$ Use one of the forms of $\sin^2(\theta) + \cos^2(\theta) = 1.$ For this particular problem, you have a $1/\cos^2(\theta)$, so you probably want to take the identity I gave you and divide both sides by $\cos^2(\theta)$. $\endgroup$
    – Braindead
    Jan 22 '11 at 2:09
  • $\begingroup$ This is a simple equation of the form $a \cos x + b \sin x = c$. You don't really have to deal with quadratics and multiple roots. $\endgroup$
    – Aryabhata
    Jan 22 '11 at 2:56
  • $\begingroup$ The solution you've arrived at, converting to just tangents, is very likely the one people were hinting at. All or nearly all trig equation solving exercises (equations designed to be solved by students) can either be reduced to a polynomial in one trig function or factored such that each factor involves only one trig function. $\endgroup$
    – Isaac
    Jan 22 '11 at 5:03


Can you solve $$p = \frac{q\sin 2\theta + r}{s\cos 2\theta + t}$$

Ok, more details.

$$a = \frac{\sin \theta \cos \theta}{\cos^2 \theta} - \frac{b}{\cos^2 \theta} = \frac{\sin 2 \theta }{2\cos^2 \theta} - \frac{b}{\cos^2 \theta} $$

$$ = \frac{\sin 2\theta - 2b}{2cos^2 \theta} = \frac{ \sin 2\theta - 2b}{\cos 2\theta + 1}$$


$$a(\cos 2 \theta + 1) = \sin 2 \theta - 2 b$$


$$ \sin 2\theta - a \cos 2\theta = a + 2b$$

The equation

$$ p \cos \alpha + q \sin \alpha = r$$

is standard.

and can be solved by dividing by $\displaystyle \sqrt{p^2 + q^2}$ and noticing that for some $\displaystyle \beta$ we must have that $\displaystyle \sin \beta = \frac{p}{\sqrt{p^2 + q^2}}$ and $\displaystyle \cos \beta = \frac{q}{\sqrt{p^2 + q^2}}$

Giving rise to

$$ \sin(\alpha + \beta) = \frac{r}{\sqrt{p^2 +q^2}}$$

I will leave it to you to solve your original equation.


You can write $\tan(\theta)=\frac{\sin(\theta)}{\cos(\theta)}=\frac{\sqrt{1-\cos^2(\theta)}}{\cos(\theta)}$ which gets everything in terms of $\cos(\theta)$ but you may not like the degree of the result when you get rid of the radical.

  • 1
    $\begingroup$ Not optimal. You can do better with a different trig function. $\endgroup$ Jan 22 '11 at 2:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.