2
$\begingroup$

If I am using Euler's formula, eg. for solving:

$$e^{ix} = \cos(x)+i\sin(x)$$

And in my equation I end up with some $\sin(x)$ or $\cos(x)$ that derived from this, would the sine and cosine operations need to be set up for receiving results in degrees or radians?

I am guessing degrees.

For example, in C++ the operators $\sin$ and $\cos$ work in radians, so if my math equation that came from the Euler's formula is $\sin(x)$, I presume I would code this as:

sin(degreesToRadians(x))

Is that correct?

$\endgroup$
4
  • $\begingroup$ nope, not correct $\endgroup$
    – timur
    Jan 11, 2020 at 16:55
  • $\begingroup$ It should be in radians. Note that if you don't see a degree symbol such as $x^\circ$, then it is in radians. $\endgroup$ Jan 11, 2020 at 16:56
  • 1
    $\begingroup$ Euler's Formula assumes $x$ is in radians, as shown in the bumpersticker relation $e^{i\pi}+1=0$. $\endgroup$
    – Blue
    Jan 11, 2020 at 16:57
  • $\begingroup$ Thanks guys. So I can just use C++ $cos(x)$ or $sin(x)$ without any radian conversion then. $\endgroup$
    – mike
    Jan 11, 2020 at 18:15

0

You must log in to answer this question.

Browse other questions tagged .