Inverse of linear combination of trigonometric functions

489 Views Asked by At

I have an equation of the form:

$$\tan(y)=\alpha_1\cos(x)+\alpha_2\sin(x)$$

where $x$ and $y$ are in $(0,2\pi)$ and the coefficients are real numbers.

Implicitly this defines $y$ as a function of $X$, say $y = f(x)$.

Is there a clever expression for $x = f^{-1}(y)$, or do we need to find it numerically (i.e. using an iterative root finder)?

1

There are 1 best solutions below

4
On BEST ANSWER

Note that $$\alpha_1\cos(x)+\alpha_2\sin(x) =\Re(e^{ix}\overline{(a_1+ia_2)}).$$ Now let $r$ be the module of $a_1+ia_2$ and $\phi$ its principal argument. You can easily check that $$\alpha_1\cos(x)+\alpha_2\sin(x) =\Re(e^{ix}\overline{(a_1+ia_2)}) = r\cos(x-\phi).$$ Hence the inversion of the equality $$\tan(y) = r\cos(x-\phi)$$ gives $$x =\phi+\arccos{\left(\frac{\tan(y)}{r}\right)}.$$