# Euler’s Identity

This equation is supremely beautiful and bewildering. It uses 5 **very**
fundamental objects: , , , ,
and , along with 4 operations: (addition),
(multiplication), (exponentiation), and finally (equality,
identity).

Then it repeats…

If you can’t see the “whole” picture yet (can anyone?), this might help. Our cyclic circular sidekicks, and are here to enlighten us.

Euler’s identity is a special case of *Euler’s formula*, which states:

Substitute (or in general, ) for and we get back our identity.

## Tangent on Fourier Series

```
Plot[
sin(theta)/pi,
(3/2) sin(theta)/pi,
2 sin(theta)/pi,
(5/2) sin(theta)/pi
]
```

Unlike the Euler series we above, which is purely constructive, a **square
wave** can be constructed with the Fourier series:

```
Plot[
sin(2 pi theta),
(1/3) sin(6 pi theta),
(1/5) sin(10 pi theta)
]
```

And a **saw wave** can be constructed by another:

```
Plot[
sin(pi theta),
sin((pi theta) / 2),
sin((pi theta) / 4)
]
```

Euler’s identity can be geometrically interpreted as saying that rotating any point radians around an origin of a complex plane has the same effect as reflecting the point across the origin.

Fundamentally, Euler’s Identity is a root of unity, meaning that it is a solution for in the equation .

This is the definition for a more general identity which states that the th roots of unity, for , add up to .

Euler’s identity is the case of this equation.

##
Wanna compute *e* in
Brainfuck?

$$
\hphantom{nothing} \\
e = 2.718281828459\ldots
$$
*e*

```
git clone https://github.com/nixpulvis/brainfuck
cd brainfuck
cargo run fixtures/e.bf
```

```
>>>>++>+>++>+>>++<+[
[>[>>[>>>>]<<<<[[>>>>+<<<<-]<<<<]>>>>>>]+<]>-
>>--[+[+++<<<<--]++>>>>--]+[>>>>]<<<<[<<+<+<]<<[
>>>>>>[[<<<<+>>>>-]>>>>]<<<<<<<<[<<<<]
>>-[<<+>>-]+<<[->>>>[-[+>>>>-]-<<-[>>>>-]++>>+[-<<<<+]+>>>>]<<<<[<<<<]]
>[-[<+>-]]+<[->>>>[-[+>>>>-]-<<<-[>>>>-]++>>>+[-<<<<+]+>>>>]<<<<[<<<<]]<<
]>>>+[>>>>]-[+<<<<--]++[<<<<]>>>+[
>-[
>>[--[++>>+>>--]-<[-[-[+++<<<<-]+>>>>-]]++>+[-<<<<+]++>>+>>]
<<[>[<-<<<]+<]>->>>
]+>[>>>>]-[+<<<<--]++<[
[>>>>]<<<<[
-[->--[<->+]++<[[>-<+]++[<<<<]+>>+>>-]++<<<<-]
>-[+[<+[<<<<]>]<+>]+<[->->>>[-]]+<<<<
]
]>[<<<<]>[
-[
-[
+++++[>++++++++<-]>-.>>>-[<<<----.<]<[<<]>>[-]>->>+[
[>>>>]+[-[->>>>+>>>>>>>>-[-[+++<<<<[-]]+>>>>-]++[<<<<]]+<<<<]>>>
]+<+<<
]>[
-[
->[--[++>>>>--]->[-[-[+++<<<<-]+>>>>-]]++<+[-<<<<+]++>>>>]
<<<<[>[<<<<]+<]>->>
]<
]>>>>[--[++>>>>--]-<--[+++>>>>--]+>+[-<<<<+]++>>>>]<<<<<[<<<<]<
]>[>+<<++<]<
]>[+>[--[++>>>>--]->--[+++>>>>--]+<+[-<<<<+]++>>>>]<<<[<<<<]]>>
]>
]
This program computes the transcendental number e, in decimal. Because this is
infinitely long, this program doesn't terminate on its own; you will have to
kill it. The fact that it doesn't output any linefeeds may also give certain
implementations trouble, including some of mine.
(c) 2016 Daniel B. Cristofani
http://brainfuck.org/
```