Euler's Formula

Euler's formula links the exponential function to circular motion:

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

We verify the identity coefficient by coefficient. Egison differentiates symbolic expressions to generate the Maclaurin terms on both sides.

Maclaurin expansion of the exponential

For a function $F$, the term of degree $n$ at the origin is

$$ \frac{F^{(n)}(0)}{n!}x^n. $$

We first ask for the first eight terms of $e^{ix}$.

declare symbol x : MathValue
take 8 (taylorExpansion (e^(i * x)) x 0)
$\{1, i x, \frac{-1}{2} x^{2}, \frac{-1}{6} i x^{3}, \frac{1}{24} x^{4}, \frac{1}{120} i x^{5}, \frac{-1}{720} x^{6}, \frac{-1}{5040} i x^{7}\}$

Real and imaginary parts

The even powers occur in $\cos x$, while the odd powers occur in $i\sin x$. Computing the two series separately makes this parity split visible.

take 8 (taylorExpansion (cos x) x 0)
$\{1, 0, \frac{-1}{2} x^{2}, 0, \frac{1}{24} x^{4}, 0, \frac{-1}{720} x^{6}, 0\}$
take 8 (taylorExpansion (i * sin x) x 0)
$\{0, i x, 0, \frac{-1}{6} i x^{3}, 0, \frac{1}{120} i x^{5}, 0, \frac{-1}{5040} i x^{7}\}$

Coefficient-by-coefficient comparison

Adding the two lists must reproduce the exponential series through every displayed order.

take 8
  (map2 (+)
    (taylorExpansion (cos x) x 0)
    (taylorExpansion (i * sin x) x 0))
$\{1, i x, \frac{-1}{2} x^{2}, \frac{-1}{6} i x^{3}, \frac{1}{24} x^{4}, \frac{1}{120} i x^{5}, \frac{-1}{720} x^{6}, \frac{-1}{5040} i x^{7}\}$

The final list is identical to the expansion of $e^{ix}$. The calculation exhibits Euler's formula as a formal power-series identity, without substituting a numerical value for $x$.

Links

Back to the Table of Contents