:

## Visualization of Euler's formula

Maple 2015

Consider the well-known Euler's formula

eix = cos x + i sin x

When we calculate that for  x = π  we get:

eiπ = cos π + i sin π   or

eiπ = −1 + i × 0   (because cos π = −1 and sin π = 0)  or

eiπ = −1  or  eiπ + 1 = 0

It seems absolutely magical that such a neat equation combines  5  fundamental constants: e ,  i ,  π , 1 , 0

The purpose of this post - to give a simple visualization of equality  eiπ = −1  (statical and animated) by expanding  eiπ  in a series of complex numbers. These numbers we represent as vectors in the plane. We will see that the partial sums of this series are broken lines like a spiral, twisting around the point -1 steadily approaching to it.

Euler procedure has one required parameter  n is positive integer - the number of displayed terms of the series  for  eiπ

Optional parameter  a  is any symbol (by default  a=NULL). We use this option if  instead of a static spiral want to see an animated spiral.

Procedure code can be found in the attached file  Euler.mw

Examples of use.

The first example shows  8 terms of the series (broken line of 8 units):

Euler(8);

The terms of the series where  n> = 10  on the same plot can not be seen as very small. In this case, we use  the second plot with magnification of  100 : 1 .

The second example:

Euler(14);

In the third example, we see an animated broken line. It's  first 9 units represented  on the left plot, and then for n> = 10 on the right plot:

Euler(13, a);

Euler.mw

﻿