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 :)...
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 :)...
$$\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}$$
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.
You can solve it graphical as well:
You can fiddle here.
If you ignore $2\pi$-periodicity you seem to end up with between two and four solutions.