It's late, but this article is the 12th day of Mathematics Advent Calendar 2016.
e^{i\theta} =\cos\theta +i\sin\theta
Source: [Euler's formula-Wikipedia](https://ja.wikipedia.org/wiki/%E3%82%AA%E3%82%A4%E3%83%A9%E3%83%BC%E3%81 % AE% E5% 85% AC% E5% BC% 8F)
Where e is an exponential function, i is an imaginary unit, and cos and sin are cosine and sine functions, respectively. It is an equation that holds for any complex number θ, but it is especially important and often used when θ is a real number. When θ is a real number, θ corresponds to the argument on the complex plane formed by the complex number eiθ (the unit of the angle θ is radians).
I will omit the official proof of Euler, but I think this article is easy to understand. What is Euler's formula? Introducing the flow of how to find Euler's equation
Here, Python is used to draw both sides on the complex plane and compare whether they have the same unit circle.
Regarding the depiction on the complex plane, plotting.py introduced in Matrix Programmer /plotting.py) was used.
By the way, the imaginary number i is expressed as j
in Python.
>>> j
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'j' is not defined
>>> 1j
1j
>>> type(1j)
<type 'complex'>
Now let's drop both sides of Euler's formula into the complex plane.
>>> from plotting import plot
>>> from math import e, pi
>>> L1 = {e**(1j*theta) for theta in range(0, 360)}
>>> plot(L1)
>>> from plotting import plot
>>> from math import sin, cos
>>> L2 = {cos(theta) + 1j * sin(theta) for theta in range(0, 360)}
>>> plot(L2)
When I tried plotting, both the left side and the right side became the following unit circles, and I found that they were equal!
This story is covered in Chapter 1 of Matrix Programmer. PDF version: http://codingthematrix.com/slides/The_Field.pdf
This book is physically and contently heavy w The PDF version is also available on the Official Site, so if you are interested, why not take a look.
Recommended Posts