xaktly | Functions | Trigonometry

Euler's equation


Connecting trigonometry with exponential functions


Nobel Prize-winning physicist Richard Feynman called Euler's equation,

$$e^{ix} = \text{cos}(x) + i \, \text{sin}(x),$$

"the most remarkable formula in mathematics." I think Feynman was right. There are few equations more useful in higher math. The ability to inter-convert between trigonometric and exponential representations of the same function is immensely valuable.

Euler's formula was discovered by Swiss mathematician Leonhard Euler (1707-1783) [pronounced oy'-ler]. If you get a chance, Euler's life in mathematics and science is worth reading about. Few have made the range of contributions he did. In this section we'll prove Euler's formula and use it to link unit-circle trigonometry with hyperbolic trig. (hyperbolic functions).

Euler's formula

$$e^{±ikx} = \text{cos}(kx) ± i\, \text{sin}(kx),$$


where $k$ is a constant.


A proof (or derivation) of Euler's equation


There are a few ways to arrive at Euler's equation, but we'll do it by finding the MacLaurin series (Taylor series centered at x = 0) of   $f(x) = e^{ix}.$ First we'll need to calculate a few derivatives and find their values at x = 0. Here they are:

$f(x) = e^{ix}$ $f(0) = 1$
$f'(x) = ie^{ix}$ $f'(0) = i$
$f''(x) = -e^{ix}$ $f''(0) = -1$
$f'''(x) = -i e^{ix}$ $f'''(0) = -i$
$f^{(4)}(x) = e^{ix}$ $f^{(4)}(0) = 1$
$f^{(5)}(x) = ie^{ix}$ $f^{(5)}(0) = i$

Wide equations on narrow screens
← Scroll left & right →

Now recall that the MacLaurin series representation of a function is

$$f(x) \approx \frac{f(0)x^0}{0!} + \frac{f'(0)x^1}{1!} + \frac{f''(0)x^2}{2!} + \frac{f'''(0)x^3}{3!} + \dots$$

Plugging in our derivatives gives

$$e^{ix} \approx \frac{1 x^0}{0!} + \frac{i x^1}{1!} + \frac{-1 x^2}{2!} + \frac{-i x^3}{3!} + \frac{1 x^4}{4!} + \frac{i x^5}{5!} + \frac{-i x^6}{6!} + \dots$$

A little bit of clean-up gives us a neater expression:

$$e^{ix} \approx 1 + \frac{i x}{1!} - \frac{x^2}{2!} - \frac{i x^3}{3!} + \frac{x^4}{4!} + \frac{i x^5}{5!} - \frac{i x^6}{6!} - \frac{i x^7}{7!} + \dots $$

Now if we separate terms containing and not containing i, we get two series:

$$e^{ix} \approx \left(1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \frac{i x^6}{6!} + \dots \right) + \left( \frac{i x}{1!} - \frac{i x^3}{3!} + \frac{i x^5}{5!} - \frac{i x^7}{7!} + \dots \right)$$

Now the first parentheses, containing the even-power terms, is the MacLaurin series representation of cos(x). The second is i times the MacLaurin series representation of sin(x):

$$e^{ix} \approx \left(1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \frac{i x^6}{6!} + \dots \right) + i\left( \frac{x}{1!} - \frac{x^3}{3!} + \frac{x^5}{5!} - \frac{x^7}{7!} + \dots \right),$$

which gives us Euler's equation,

$$e^{ix} = cos(x) + i \, sin(x)$$


Exponential expressions for $\text{sin}(x)$ and $\text{cos}(x)$


To obtain the exponential formula for $\text{cos}(x)$, add the Euler equations for $e^{ix}$ and $e^{-ix}.$

$$ \begin{align} & \phantom{00000} e^{ix} = \text{cos}(x) + i\, \text{sin}(x) \\[5pt] &\underline{+ \phantom{000} e^{-ix} = \text{cos}(x) - i\, \text{sin}(x)} \\[5pt] & e^{ix} + e^{-ix} = 2 \, \text{cos}(x) \end{align}$$

The sine terms cancel, and if we divide by 2, we get

$$\text{cos}(x) = \frac{e^{ix} + e^{-ix}}{2}$$

The formula for $\text{sin}(x)$ is found first by rearranging both Euler equations to solve for $\text{cos}(x)$,

$$ \begin{align} \text{cos}(x) &= e^{ix} - i \, \text{sin}(x) \\[5pt] \text{cos}(x) &= e^{-ix} + i \, \text{sin}(x) \end{align}$$

Then we eliminate $\text{cos}(x)$ between them using the transitive property (if $a = c$ and $b = c$, then $a = b$). After that, just divide by $2i$ to get $\text{sin}(x)$.

$$ \begin{align} e^{ix} - i \, \text{sin}(x) &= e^{-ix} + i \, \text{sin}(x) \\[5pt] e^{ix} - e^{-ix} &= 2i \, \text{sin}(x) \\[10pt] \text{sin}(x) &= \frac{e^{ix} - e^{-ix}}{2 i} \end{align}$$

Expressions for \text{sin}(x) and \text{cos}(x)

$$\text{cos}(x) = \frac{e^{ix} + e^{-ix}}{2}$$

$$\text{sin}(x) = \frac{e^{ix} - e^{-ix}}{2 i}$$


The Euler identity


If we use Euler's equation to calculate $e^{i\pi},$ we get

$$e^{i\pi} = \text{cos}(\pi) + i \, \text{sin}(\pi) = -1$$

$$e^{i\pi} = -1$$

This interesting identity is really pretty amazing. It's a combination of the transcendental number π, the imaginary number i and the base of all continuously-growing exponential functions, e – an eclectic mix, for sure.

Interesting as it is, this expression isn't usually as useful as Euler's equation, but it's worth knowing, if only to amaze your friends.


Relationship to hyperbolic trig. functions


We can use the exponential expressions for sine and cosine to relate those functions to the hyperbolic sine and cosine, sinh(x) and cosh(x).

Consider $sin(ix)$ in its exponential representation:

$$ \begin{align} \text{sin}(x) &= \frac{e^{ix} - e^{-ix}}{2 i} \\[5pt] \text{sin}(ix) &= \frac{e^{iix} - e^{-iix}}{2i} \\[5pt] &= \frac{e^{-x} - e^x}{2i} \\[5pt] &= \left( \frac{-i}{-i}\right) \frac{e^{-x} - e^x}{2i} \\[5pt] &= i \, \text{sinh}(x) \end{align}$$

We can do a similar procedure with $\text{cos}(ix).$

$$ \begin{align} \text{cos}(x) &= \frac{e^{ix} + e^{-ix}}{2} \\[5pt] \text{sin}(ix) &= \frac{e^{iix} + e^{-iix}}{2} \\[5pt] &= \frac{e^{-x} + e^x}{2} \\[5pt] &= \text{cosh}(x) \end{align}$$

Unit-circle ↔ hyperbolic

$$\text{sin}(ix) = i \text{sinh}(x)$$

$$\text{cos}(ix) = \text{cosh}(x)$$


Practice problems

  1. The trigonometric sum identities for sin(a + b) and cos(a + b) are difficult to derive geometrically, but they are fairly straightforward if you use Euler's equation for $\text{sin}(x)$ and $\text{cos}(x)$. Derive   $\text{sin}(a + b) = \text{cos}(a) \text{sin}(b) + \text{sin}(a) \text{cos}(b)$   using Euler's formula.

    Solution

    The idea here is to derive both the sine and cosine sum formulae at the same time. We start by writing the exponential expression:

    $$e^{i(a + b)} = cos(a + b) + i \, sin(a + b)$$

    Now   $e^{i(a + b)} = e^{ia} e^{bi}.$   We can apply that same multiplicative separation (we're taking advantage of the unique algebra of exponentials) to the cosine and sine terms:

    $$ \begin{align} e^{ia} e^{bi} &= [cos(a) + i \, sin(a)][cos(b) + i \, sin(b)] \\[5pt] &= \text{cos}(a) \text{cos}(b) + i\, \text{cos}(a) \text{sin}(b) + i\, \text{sin}(a) \text{cos}(b) - \text{sin}(a) \text{sin}(b) \\[5pt] &= \text{cos}(a) \text{cos}(b) - \text{sin}(a) \text{sin}(b) + i[\text{cos}(a) \text{sin}(b) + \text{sin}(a) \text{cos}(b)] \end{align}$$

    Now the real term corresponds with   $\text{cos}(a + b)$   and the imaginary term corresponds to   $\text{sin}(a + b).$   So we have:

    $$ \begin{align} \text{cos}(a + b) = \text{cos}(a) \text{cos}(b) - \text{sin}(a) \text{sin}(b) \\[8pt] \text{sin}(a + b) = \text{cos}(a) \text{sin}(b) + \text{sin}(a) \text{cos}(b) \end{align}$$

    This is a much easier derivation than the geometric one.


  2. Find the indefinite integral   $\int \text{cos}(ax) \, \text{cos}(bx) \, dx,$   where $a$ and $b$ are constants.

    Solution

    $$\int \, cos(ax) cos(bx) \, dx$$

    First convert those cosine functions to exponential form. Then multiply the binomials:

    $$ \begin{align} &= \int \left( \frac{e^{ix} + e^{ix}}{2} \right)\left( \frac{e^{ix} + e^{ix}}{2} \right) \, dx \\[5pt] &= \frac{1}{4} \int \left[ e^{i(a + b)x} + e^{i(a - b)x} + e^{i(b - a)x} + e^{-(a + b)x} \right] \, dx \\[5pt] &= \frac{1}{4} \int \left[ e^{i(a + b)x} + e^{i(a - b)x} + e^{-i(a - b)x} + e^{-(a + b)x} \right] \, dx \\[5pt] &= \frac{1}{2} \int \left( \frac{e^{i(a + b)x} + e^{-i(a + b)x}}{2} \right) + \left( \frac{e^{i(a - b)x} + e^{-(a - b)x}}{2} \right) \, dx \\[5pt] &= \frac{1}{2} \int \left( \text{cos}[(a + b)x] + \text{cos}[(a - b)x]\right) \, dx \\[5pt] &= \frac{1}{2} \left[ \frac{1}{a + b}\text{sin}[(a + b)x] + \frac{1}{a - b}\text{sin}[(a - b)x] \right] \\[5pt] &= \frac{\text{sin}[(a + b)x]}{2(a + b)} + \frac{\text{sin}[(a - b)x]}{2(a - b)} + C \end{align}$$

    There are many more ways to manipulate and express this result, but this is a moderate stopping point, and it's the way this integral is usually expressed in integral tables.


  3. Integrate   $\int \text{sin}^2(x) \, dx.$

    Solution

    $$\int \, \text{sin}^2(x) \, dx$$

    Express \text{sin}(x) in exponential form, then simplify the integrand, re-convert to a trig. function and integrate:

    $$ \begin{align} &= \int \left( \frac{e^{ix} - e^{-ix}}{2i} \right)^2 \, dx \\[5pt] &= \int \frac{e^{i2x} - 1 - 1 + e^{i2x}}{-4} \, dx \\[5pt] &= -\frac{1}{2} \int \frac{e^{i2x} + e^{-i2x}}{2} + \int \frac{1}{2} \, dx \\[5pt] &= -\frac{1}{2} \int \text{cos}(2x) \, dx + \int \frac{1}{2} \, dx \\[5pt] &= \frac{x}{2} - \frac{1}{4} \text{sin}(2x) + C \end{align}$$

    It's arguable whether using the exponential route makes this integral simpler. Substitution for $\text{sin}^2(x)$ at the beginning using the power-reduction identity, $\text{sin}^2(x) = (1 - \text{cos}(2x))/2,$ makes this integral pretty simple, too. What's great is to have a wide variety of integration tools in your kit. Always remember, though, that not all integrals can be done analytically.


  4. Integrate   $\int \text{sin}(2x) \text{sin}(4x) \, dx.$

    Solution

    $$ \begin{align} \int &\text{sin}(2x) \text{sin}(4x) \, dx \\[5pt] &= \int \left( \frac{e^{i2x} - e^{-i2x}}{2i} \right)\left( \frac{e^{i4x} - e^{-i4x}}{2i} \right)\, dx \\[5pt] &= \int \frac{e^{i6x} - e^{-i2x} - e^{i2x} + e^{-i6x}}{-4}\, dx \\[5pt] &= -\frac{1}{2} \int \left( \frac{e^{i6x} + e^{-i6x}}{2} - \frac{e^{i2x} + e^{-i2x}}{2}\right) \, dx \\[5pt] &= -\frac{1}{2} \int \text{cos}(6x) \, \text{cos}(2x) \, dx \\[5pt] &= -\frac{1}{12} \text{sin}(6x) - \frac{1}{4} \text{sin}(2x) + C \end{align}$$


  5. Prove DeMoivre's formula,   $(\text{cos}(\theta) + i\, \text{sin}(\theta))^n = \text{cos}(n\theta) + i\, \text{sin}(n\theta)$

    Solution

    Substitute the exponential expressions into the sine and cosine terms in $(cos(x) + i\, sin(x))^n.$ (I'm switching to x because it's easier to type than "\theta."

    $$ \begin{align} &= \left[\frac{e^{ix} + e^{-ix}}{2} + i \, \left( \frac{e^{ix} - e^{-ix}}{2i} \right)\right]^n\\[5pt] &= \left( \frac{e^{ix}}{2} + \frac{e^{-ix}}{2} + \frac{e^{ix}}{2} - \frac{e^{-ix}}{2} \right)^n \\[5pt] &= \left( e^{ix} \right)^n = e^{nix} \\[5pt] &= \text{cos}(bx) + i\, \text{sin}(bx) \end{align}$$

    DeMoivre's formula is really handy. When we need a large poer of a complex vector, we need only multiply the argument of the sine and cosine by the power.


  6. Find the value of $i^{-i}$ by writing the imaginary number $i$ as a complex exponential.

    Solution

    $$i^{-i} = \; ?$$

    Use the complex-plane graph (Re = real, Im = imaginary) to re-write the complex vector $z = 0 + i$ with sines and cosines:

    $$z = \text{cos}\left( \frac{\pi}{2} \right) + i \, \text{sin} \left( \frac{\pi}{2} \right) = e^{i \frac{\pi}{2}}$$

    Notice that $\text{cos}(\pi/2) = 0$ and $\text{sin}(\pi/2) = 1,$ so this expression captures our complex vector. Now raise the exponential form to the power of -i

    $$\left(e^{i\frac{\pi}{2}} \right)^{-i} = e^{\frac{\pi}{2}} = 4.81$$

    Doesn't it seem strange that such an expression would have a numerical value?

Creative Commons License   optimized for firefox
xaktly.com by Dr. Jeff Cruzan is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. © 2012-2025, Jeff Cruzan. All text and images on this website not specifically attributed to another source were created by me and I reserve all rights as to their use. Any opinions expressed on this website are entirely mine, and do not necessarily reflect the views of any of my employers. Please feel free to send any questions or comments to jeff.cruzan@verizon.net.