Euler's identity

Problem: e^{iπ} + 1 = 0

This page states Euler's identity, explains why e^{iπ} = -1 in mathematical English, illustrates it on the unit circle, and verifies it numerically with a small test harness.

Illustration

θ = π 1 −1 = e^{iπ} e^{iπ} + 1 → 0 Re Im

The complex exponential e^{iθ} traces the unit circle. At θ=π the point is −1, so e^{iπ}+1=0.

Input

We evaluate at θ = π + 2πk. N is the number of terms used in the power‑series expansions for cos and sin; higher N gives a tighter approximation (30–50 is typically plenty after angle reduction to [−π,π]). The tolerance ε is used by the numerical checks.

Output

Answer
Angle θ
e^{iθ} (cos/sin)
Series approx

Reason Why

Power‑series derivation. The exponential, sine, and cosine have the absolutely convergent series for real x:
e^z = Σ_{n≥0} z^n/n!,  cos x = Σ_{n≥0} (−1)^n x^{2n}/(2n)!,  sin x = Σ_{n≥0} (−1)^n x^{2n+1}/(2n+1)!.
Substituting z = ix and regrouping even/odd powers gives e^{ix} = cos x + i sin x (Euler's formula). Taking x = π yields e^{iπ} = cos π + i sin π = −1 + i·0, hence e^{iπ} + 1 = 0.
Differential‑equation proof. Define f(x) = e^{-ix}(cos x + i sin x). Then f'(x) = 0, so f is constant. As f(0)=1, we have f(x)=1 for all x, and again e^{ix} = cos x + i sin x.
Geometric picture. The map x ↦ e^{ix} parametrizes the unit circle counterclockwise. The angle π lands at −1 on the real axis, so adding 1 returns the origin.

Check (harness)

Preloaded Checks (harness)

Each block checks that |e^{iθ}+1| ≤ ε for θ = π + 2πk and fails for a noncongruent angle.