How to solve $sin(x) = n$ for all $n\in{\mathbb{R}}$?

87 Views Asked by At

I was wondering how one would solve the equation $sin(x) = n$ for all real $n$. You could of course use the Taylor series of $sin^{-1}(x)$ but that wouldn't give an exact result.

So I thought maybe you can use Euler's formula for $sin(x)$ ($sin(x) = \frac{e^{ix}-e^{-ix}}{2i}$) to get an exact result? Simplifying a little bit gives you $e^{ix} - e^{-ix} = z$ but I don't know how to solve that equation.

There has to be a way to get an exact result since using Python's SymPy module gives one (and WolframAlpha does so, too, I think).

1

There are 1 best solutions below

3
On BEST ANSWER

To solve the equation $e^{ix} - e^{-ix} = z$ you can define $w=e^{ix}$, which gives $$ w-\frac1w=z\quad\Leftrightarrow\quad w^2-zw-1=0. $$ Therefore, $$ w=\frac{z\pm\sqrt{z^2+4}}{2} $$ and you can recover $x=-i\log w$. You need to be careful here since there are in fact may solutions, namely $$ x=-i\log w=-i\log|w|+i(\arg w+2k\pi) $$ with $k\in\mathbb Z$.