Euler's formula

Euler's formula, named after Leonhard Euler, is a mathematical formula in complex analysis that establishes the fundamental relationship between the trigonometric functions and the complex exponential function. Euler's formula states that, for any real number $x$, one has $$e^{i x} = \cos x + i \sin x, $$ where $e$ is the base of the natural logarithm, $i$ is the imaginary unit, and $cos$ and $sin$ are the trigonometric functions cosine and sine respectively. This complex exponential function is sometimes denoted $cis x$ ("cosine plus i sine"). The formula is still valid if $x$ is a complex number, and is also called Euler's formula in this more general case.

Euler's formula is ubiquitous in mathematics, physics, chemistry, and engineering. The physicist Richard Feynman called the equation "our jewel" and "the most remarkable formula in mathematics".

When $x = π$, Euler's formula may be rewritten as $e^{iπ} + 1 = 0$ or $e^{iπ} = -1$, which is known as Euler's identity.

History
In 1714, the English mathematician Roger Cotes presented a geometrical argument that can be interpreted (after correcting a misplaced factor of $$\sqrt{-1}$$) as: Cotes wrote: "Nam si quadrantis circuli quilibet arcus, radio CE descriptus, sinun habeat CX sinumque complementi ad quadrantem XE ; sumendo radium CE pro Modulo, arcus erit rationis inter $$EX + XC \sqrt{-1}$$& CE mensura ducta in $$\sqrt{-1}$$." (Thus if any arc of a quadrant of a circle, described by the radius CE, has sinus CX and sinus of the complement to the quadrant XE ; taking the radius CE as modulus, the arc will be the measure of the ratio between $$EX + XC \sqrt{-1}$$ & CE multiplied by $$\sqrt{-1}$$.) That is, consider a circle having center E (at the origin of the (x,y) plane) and radius CE. Consider an angle θ with its vertex at E having the positive x-axis as one side and a radius CE as the other side. The perpendicular from the point C on the circle to the x-axis is the "sinus" CX ; the line between the circle's center E and the point X at the foot of the perpendicular is XE, which is the "sinus of the complement to the quadrant" or "cosinus". The ratio between $$EX + XC \sqrt{-1}$$ and CE is thus $$\cos \theta + \sqrt{-1} \sin \theta \ $$. In Cotes' terminology, the "measure" of a quantity is its natural logarithm, and the "modulus" is a conversion factor that transforms a measure of angle into circular arc length (here, the modulus is the radius (CE) of the circle). According to Cotes, the product of the modulus and the measure (logarithm) of the ratio, when multiplied by $$\sqrt{-1}$$, equals the length of the circular arc subtended by θ, which for any angle measured in radians is CE • θ. Thus, $$\sqrt{-1} CE \ln{\left ( \cos \theta + \sqrt{-1} \sin \theta \right ) \ } = (CE) \theta $$. This equation has a misplaced factor: the factor of $$\sqrt{-1}$$ should be on the right side of the equation, not the left side. If the change of scaling by $$\sqrt{-1}$$ is made, then, after dividing both sides by CE and exponentiating both sides, the result is: $$\cos \theta + \sqrt{-1} \sin \theta = e^{\sqrt{-1} \theta}$$, which is Euler's formula.

See:

$$ix = \ln(\cos x + i\sin x).$$ Exponentiating this equation yields Euler's formula. Note that the logarithmic statement is not universally correct for complex numbers, since a complex logarithm can have infinitely many values, differing by multiples of $2πi$. Around 1740 Leonhard Euler turned his attention to the exponential function and derived the equation named after him by comparing the series expansions of the exponential and trigonometric expressions. The formula was first published in 1748 in his foundational work Introductio in analysin infinitorum.
 * Roger Cotes (1714) "Logometria," Philosophical Transactions of the Royal Society of London, 29 (338) : 5-45; see especially page 32. Available on-line at:  Hathi Trust
 * Roger Cotes with Robert Smith, ed., Harmonia mensurarum … (Cambridge, England: 1722), chapter:  "Logometria",  p. 28.
 * https://nrich.maths.org/1384

Johann Bernoulli had found that $$\frac{1}{1 + x^2} = \frac 1 2 \left( \frac{1}{1 - ix} + \frac{1}{1 + ix}\right).$$

And since $$\int \frac{dx}{1 + ax} = \frac{1}{a} \ln(1 + ax) + C,$$ the above equation tells us something about complex logarithms by relating natural logarithms to imaginary (complex) numbers. Bernoulli, however, did not evaluate the integral.

Bernoulli's correspondence with Euler (who also knew the above equation) shows that Bernoulli did not fully understand complex logarithms. Euler also suggested that complex logarithms can have infinitely many values.

The view of complex numbers as points in the complex plane was described about 50 years later by Caspar Wessel.

Definitions of complex exponentiation
The exponential function $e^{x}$ for real values of $x$ may be defined in a few different equivalent ways (see Characterizations of the exponential function). Several of these methods may be directly extended to give definitions of $e^{z}$ for complex values of $z$ simply by substituting $z$ in place of $x$ and using the complex algebraic operations. In particular, we may use any of the three following definitions, which are equivalent. From a more advanced perspective, each of these definitions may be interpreted as giving the unique analytic continuation of $e^{x}$ to the complex plane.

Differential equation definition
The exponential function $$f(z) = e^z$$ is the unique differentiable function of a complex variable for which the derivative equals the function $$\frac{df}{dz} = f$$ and $$f(0) = 1.$$

Power series definition
For complex $z$ $$e^z = 1 + \frac{z}{1!} + \frac{z^2}{2!} + \frac{z^3}{3!} + \cdots = \sum_{n=0}^{\infty} \frac{z^n}{n!}.$$

Using the ratio test, it is possible to show that this power series has an infinite radius of convergence and so defines $e^{z}$ for all complex $z$.

Limit definition
For complex $z$ $$e^z = \lim_{n \to \infty} \left(1+\frac{z}{n}\right)^n.$$

Here, $n$ is restricted to positive integers, so there is no question about what the power with exponent $n$ means.

Proofs
Various proofs of the formula are possible.

Using differentiation
This proof shows that the quotient of the trigonometric and exponential expressions is the constant function one, so they must be equal (the exponential function is never zero, so this is permitted).

Consider the function $f(θ)$ $$ f(\theta) = \frac{\cos\theta + i\sin\theta}{e^{i\theta}} = e^{-i\theta} \left(\cos\theta + i \sin\theta\right) $$ for real $θ$. Differentiating gives by the product rule $$ f'(\theta) = e^{-i\theta} \left(i\cos\theta - \sin\theta\right) - ie^{-i\theta} \left(\cos\theta + i\sin\theta\right) = 0$$ Thus, $f(θ)$ is a constant. Since $f(0) = 1$, then $f(θ) = 1$ for all real $θ$, and thus $$e^{i\theta} = \cos\theta + i\sin\theta.$$

Using power series


Here is a proof of Euler's formula using power-series expansions, as well as basic facts about the powers of $i$: $$\begin{align} i^0 &= 1, & i^1 &= i, & i^2 &= -1, & i^3 &= -i, \\ i^4 &= 1, & i^5 &= i, & i^6 &= -1, & i^7 &= -i \\ &\vdots  & &\vdots   & &\vdots    & &\vdots \end{align}$$

Using now the power-series definition from above, we see that for real values of $x$ $$\begin{align} e^{ix} &= 1 + ix + \frac{(ix)^2}{2!} + \frac{(ix)^3}{3!} + \frac{(ix)^4}{4!} + \frac{(ix)^5}{5!} + \frac{(ix)^6}{6!} + \frac{(ix)^7}{7!} + \frac{(ix)^8}{8!} + \cdots \\[8pt] &= 1 + ix - \frac{x^2}{2!} - \frac{ix^3}{3!} + \frac{x^4}{4!} + \frac{ix^5}{5!} - \frac{x^6}{6!} - \frac{ix^7}{7!} + \frac{x^8}{8!} + \cdots \\[8pt] &= \left( 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \frac{x^6}{6!} + \frac{x^8}{8!} - \cdots \right) + i\left( x - \frac{x^3}{3!} + \frac{x^5}{5!} - \frac{x^7}{7!} + \cdots \right) \\[8pt] &= \cos x + i\sin x , \end{align}$$ where in the last step we recognize the two terms are the Maclaurin series for $e^{it}$ and $t = 2$. The rearrangement of terms is justified because each series is absolutely convergent.

Using polar coordinates
Another proof is based on the fact that all complex numbers can be expressed in polar coordinates. Therefore, for some $r$ and $θ$ depending on $x$, $$e^{i x} = r \left(\cos \theta + i \sin \theta\right).$$ No assumptions are being made about $r$ and $θ$; they will be determined in the course of the proof. From any of the definitions of the exponential function it can be shown that the derivative of $cos x$ is $sin x$. Therefore, differentiating both sides gives $$i e ^{ix} = \left(\cos \theta + i \sin \theta\right) \frac{dr}{dx} + r \left(-\sin \theta + i \cos \theta\right) \frac{d\theta}{dx}.$$ Substituting $e^{ix}$ for $ie^{ix}$ and equating real and imaginary parts in this formula gives $r(cos θ + i sin θ)$ and $e^{ix}$. Thus, $r$ is a constant, and $θ$ is $dr⁄dx = 0$ for some constant $C$. The initial values $dθ⁄dx = 1$ and $x + C$ come from $r(0) = 1$, giving $θ(0) = 0$ and $e^{0i} = 1$. This proves the formula $$e^{i \theta} = 1(\cos \theta +i \sin \theta) = \cos \theta + i  \sin \theta.$$

Interpretation of the formula
This formula can be interpreted as saying that the function $r = 1$ is a unit complex number, i.e., it traces out the unit circle in the complex plane as $φ$ ranges through the real numbers. Here $φ$ is the angle that a line connecting the origin with a point on the unit circle makes with the positive real axis, measured counterclockwise and in radians.

The original proof is based on the Taylor series expansions of the exponential function $θ = x$ (where $z$ is a complex number) and of $e^{iφ} = cos φ + i sin φ$ and $e^{iφ}$ for real numbers $x$ (see above). In fact, the same proof shows that Euler's formula is even valid for all complex numbers $x$.

A point in the complex plane can be represented by a complex number written in cartesian coordinates. Euler's formula provides a means of conversion between cartesian coordinates and polar coordinates. The polar form simplifies the mathematics when used in multiplication or powers of complex numbers. Any complex number $e^{z}$, and its complex conjugate, $sin x$, can be written as $$\begin{align} z &= x + iy = |z| (\cos \varphi + i\sin \varphi) = r e^{i \varphi}, \\ \bar{z} &= x - iy = |z| (\cos \varphi - i\sin \varphi) = r e^{-i \varphi}, \end{align}$$ where
 * $cos x$ is the real part,
 * $z = x + iy$ is the imaginary part,
 * $\overline{z} = x − iy$ is the magnitude of $z$ and

$φ$ is the argument of $z$, i.e., the angle between the x axis and the vector z measured counterclockwise in radians, which is defined up to addition of $x = Re z$. Many texts write $y = Im z$ instead of $r = |z| = √x^{2} + y^{2}$, but the first equation needs adjustment when $φ = arg z = atan2(y, x)$. This is because for any real $x$ and $y$, not both zero, the angles of the vectors $2π$ and $φ = tan^{−1} y⁄x$ differ by $\pi$ radians, but have the identical value of $φ = atan2(y, x)$.

Use of the formula to define the logarithm of complex numbers
Now, taking this derived formula, we can use Euler's formula to define the logarithm of a complex number. To do this, we also use the definition of the logarithm (as the inverse operator of exponentiation): $$a = e^{\ln a}, $$ and that $$e^a e^b = e^{a + b}, $$ both valid for any complex numbers $a$ and $b$. Therefore, one can write: $$z = \left|z\right| e^{i \varphi} = e^{\ln\left|z\right|} e^{i \varphi} = e^{\ln\left|z\right| + i \varphi}$$ for any $x ≤ 0$. Taking the logarithm of both sides shows that $$\ln z = \ln \left|z\right| + i \varphi,$$ and in fact, this can be used as the definition for the complex logarithm. The logarithm of a complex number is thus a multi-valued function, because $φ$ is multi-valued.

Finally, the other exponential law $$\left(e^a\right)^k = e^{a k},$$ which can be seen to hold for all integers $k$, together with Euler's formula, implies several trigonometric identities, as well as de Moivre's formula.

Relationship to trigonometry
Euler's formula, the definitions of the trigonometric functions and the standard identities for exponentials are sufficient to easily derive most trigonometric identities. It provides a powerful connection between analysis and trigonometry, and provides an interpretation of the sine and cosine functions as weighted sums of the exponential function: $$\begin{align} \cos x &= \operatorname{Re} \left(e^{ix}\right) =\frac{e^{ix} + e^{-ix}}{2}, \\ \sin x &= \operatorname{Im} \left(e^{ix}\right) =\frac{e^{ix} - e^{-ix}}{2i}. \end{align}$$

The two equations above can be derived by adding or subtracting Euler's formulas: $$\begin{align} e^{ix} &= \cos x + i \sin x, \\ e^{-ix} &= \cos(- x) + i \sin(- x) = \cos x - i \sin x \end{align}$$ and solving for either cosine or sine.

These formulas can even serve as the definition of the trigonometric functions for complex arguments $x$. For example, letting $(x, y)$, we have: $$\begin{align} \cos iy &= \frac{e^{-y} + e^y}{2} = \cosh y, \\ \sin iy &= \frac{e^{-y} - e^y}{2i} = \frac{e^y - e^{-y}}{2}i = i\sinh y. \end{align}$$

In addition $$\begin{align} \cosh ix &= \frac{e^{ix} + e^{-ix}}{2} = \cos x, \\ \sinh ix &= \frac{e^{ix} - e^{-ix}}{2} = i\sin x. \end{align}$$

Complex exponentials can simplify trigonometry, because they are easier to manipulate than their sinusoidal components. One technique is simply to convert sinusoids into equivalent expressions in terms of exponentials. After the manipulations, the simplified result is still real-valued. For example:

$$\begin{align} \cos x \cos y &= \frac{e^{ix}+e^{-ix}}{2} \cdot \frac{e^{iy}+e^{-iy}}{2} \\ &= \frac 1 2 \cdot \frac{e^{i(x+y)}+e^{i(x-y)}+e^{i(-x+y)}+e^{i(-x-y)}}{2} \\ &= \frac 1 2 \bigg( \frac{e^{i(x+y)} + e^{-i(x+y)}}{2} + \frac{e^{i(x-y)} + e^{-i(x-y)}}{2} \bigg)\\ &= \frac 1 2 \left( \cos(x+y) + \cos(x-y) \right). \end{align} $$

Another technique is to represent the sinusoids in terms of the real part of a complex expression and perform the manipulations on the complex expression. For example: $$\begin{align} \cos nx &= \operatorname{Re} \left(e^{inx}\right) \\ &= \operatorname{Re} \left( e^{i(n-1)x}\cdot e^{ix} \right) \\ &= \operatorname{Re} \Big( e^{i(n-1)x}\cdot \big(\underbrace{e^{ix} + e^{-ix}}_{2\cos x } - e^{-ix}\big) \Big) \\ &= \operatorname{Re} \left( e^{i(n-1)x}\cdot 2\cos x - e^{i(n-2)x} \right) \\ &= \cos[(n-1)x] \cdot [2 \cos x] - \cos[(n-2)x]. \end{align}$$

This formula is used for recursive generation of $(−x, −y)$ for integer values of $n$ and arbitrary $x$ (in radians).

Considering $tan φ = y⁄x$ a parameter in equation above yields recursive formula for Chebyshev polynomials of the first kind.

Topological interpretation
In the language of topology, Euler's formula states that the imaginary exponential function $$t \mapsto e^{it}$$ is a (surjective) morphism of topological groups from the real line $$\mathbb R$$ to the unit circle $$\mathbb S^1$$. In fact, this exhibits $$\mathbb R$$ as a covering space of $$\mathbb S^1$$. Similarly, Euler's identity says that the kernel of this map is $$\tau \mathbb Z$$, where $$\tau = 2\pi$$. These observations may be combined and summarized in the commutative diagram below:



Other applications
In differential equations, the function $z ≠ 0$ is often used to simplify solutions, even if the final answer is a real function involving sine and cosine. The reason for this is that the exponential function is the eigenfunction of the operation of differentiation.

In electrical engineering, signal processing, and similar fields, signals that vary periodically over time are often described as a combination of sinusoidal functions (see Fourier analysis), and these are more conveniently expressed as the sum of exponential functions with imaginary exponents, using Euler's formula. Also, phasor analysis of circuits can include Euler's formula to represent the impedance of a capacitor or an inductor.

In the four-dimensional space of quaternions, there is a sphere of imaginary units. For any point $r$ on this sphere, and $x$ a real number, Euler's formula applies: $$\exp xr = \cos x + r \sin x,$$ and the element is called a versor in quaternions. The set of all versors forms a 3-sphere in the 4-space.

Other special cases
The special cases that evaluate to units illustrate rotation around the complex unit circle:

The special case at $x = iy$ (where $cos nx$, one turn) yields $cos x$. This is also argued to link five fundamental constants with three basic arithmetic operations, but, unlike Euler's identity, without rearranging the addends from the general case: $$\begin{align} e^{i\tau} &= \cos \tau + i \sin \tau \\ &= 1 + 0 \end{align}$$ An interpretation of the simplified form $e^{ix}$ is that rotating by a full turn is an identity function.