6

I was wondering if it is possible to solve $$A\tan\theta-B\sin\theta=1$$ for $\theta$, where $A>0,B>0$ are real constants.

For sure this can be straightforwardly implemented numerically, but maybe an alternative exists :)...

zz20s
  • 6,712
jdp89
  • 85

3 Answers3

7

$$\tan x=\frac{2\tan \frac x2}{1-\tan^2 \frac x2}=\frac{2t}{1-t^2}$$ $$\sin x=\frac{2\tan \frac x2}{1+\tan^2 \frac x2}=\frac{2t}{1+t^2}$$

Roman83
  • 17,884
  • 3
  • 26
  • 70
  • 2
    This yields a quartic equation :( –  Apr 14 '16 at 12:59
  • 1
    what's bad about that? There is definitely a finite radical form solution to every real valued quartic that could ever come from this equation. – Jack Tiger Lam Apr 14 '16 at 13:03
  • The manual calculation of a quartic equation is possible but in general laboursome and errorprone. You end up with long formulas. – mvw Apr 14 '16 at 13:08
  • @JackLam Sure there is, but people seem to prefer to solve such equations numerically. I would too. – David K Apr 14 '16 at 13:09
  • 1
    @JackLam: in practice quartic equations are often bad news. The formulas are heavy, you need to switch to complex numbers, discussion of the number of roots is tedious... –  Apr 14 '16 at 13:15
  • It seems that most people don't like tha analytical solution of quartics. If I may, I join the club. – Claude Leibovici Apr 14 '16 at 13:18
  • This is reciprocal of the standard substitution $x = 2 \arctan(t)$ $$\begin{aligned} \cos x & \rightarrow \frac{1-t^2}{1+t^2} \ \sin x & \rightarrow \frac{2 t}{1+t^2} \end{aligned}$$. But, if it works, it works! – John Alexiou Apr 14 '16 at 13:43
2

Like any other quartic equation, there is a classical way to solve it explicitly in terms of radicals; but this is generally very messy. It is practically much easier, and no less accurate in the final analysis, to solve it by a numerical method such as Newton--Raphson.

John Bentin
  • 18,454
0

You can solve it graphical as well:

You can fiddle here.

graphical solution

If you ignore $2\pi$-periodicity you seem to end up with between two and four solutions.

mvw
  • 34,562