Sub topic 3
Euler's Formula and the Complex Exponential
This chapter assumes you are comfortable with rectangular and polar complex numbers, with sine and cosine, and with the derivative of an exponential. It explains why the complex exponential is the right tool for sinusoidal circuits. That reason is what makes the phasor transform in the next chapter work.
Why a complex exponential?
A sinusoid such as v(t) = V_m cos(ωt + φ) is awkward to differentiate, integrate and add. Each derivative swaps cosine and sine and changes signs. You must track trigonometric identities at every step.
The exponential function e^(st) behaves very differently. Its derivative is s e^(st) and its integral is e^(st)/s. Calculus becomes multiplication and division by a number. If s is purely imaginary, the exponential oscillates, and that gives us a sinusoid.
Euler's formula
For any real angle θ (in radians):
e^(jθ) = cos θ + j sin θElectrical engineers write j for the imaginary unit, where j² = -1, because i already means current.
The formula says that e^(jθ) is a complex number with real part cos θ and imaginary part sin θ. Its magnitude is 1, because cos² θ + sin² θ = 1. Its angle is θ. As θ grows, the point moves around the unit circle in the complex plane.
A derivation from series
You can verify the formula with the Taylor series for the exponential, sine and cosine:
e^x = 1 + x + x²/2! + x³/3! + x⁴/4! + ...cos θ = 1 - θ²/2! + θ⁴/4! - ...sin θ = θ - θ³/3! + θ⁵/5! - ...
Substitute x = jθ. The powers of j cycle through j, -1, -j, 1. The even terms are real and alternate in sign, which matches the cosine series. The odd terms carry a factor of j and match j times the sine series. Adding them gives cos θ + j sin θ.
Special values
| θ | e^(jθ) | Meaning |
|---|---|---|
| 0 | 1 | Angle 0 |
| π/2 | j | Angle 90° |
| π | -1 | Angle 180° |
| -π/2 | -j | Angle -90° |
| 2π | 1 | One full turn |
The case θ = π gives e^(jπ) + 1 = 0. For circuits, the useful entries are e^(jπ/2) = j and e^(-jπ/2) = -j. Multiplying by j rotates a phasor by 90° counterclockwise. Dividing by j rotates it 90° clockwise. You will use this fact when you derive the impedances of inductors and capacitors.
Polar form from Euler
Any complex number z with magnitude r and angle θ can be written as
z = r e^(jθ) = r cos θ + j r sin θThe shorthand r∠θ means the same thing. The exponential form explains why polar arithmetic works. Multiplication follows the ordinary exponent rule:
(r1 e^(jθ1)) (r2 e^(jθ2)) = r1 r2 e^(j(θ1 + θ2))Magnitudes multiply and angles add. For division, magnitudes divide and angles subtract. You do not need a separate rule. It is just e^a e^b = e^(a+b) applied to complex exponents.
Recovering real and imaginary parts
From Euler's formula and its conjugate e^(-jθ) = cos θ - j sin θ, you can solve for the two trigonometric functions:
cos θ = (e^(jθ) + e^(-jθ)) / 2
sin θ = (e^(jθ) - e^(-jθ)) / (2j)You can also write them using the operators Re{ } and Im{ }:
cos θ = Re{ e^(jθ) }
sin θ = Im{ e^(jθ) }The real-part form is the one used for phasors. A real cosine is the real part of a complex exponential.
The rotating complex exponential
Now let the angle grow with time, θ = ωt + φ. Here ω is the angular frequency in rad/s and φ is the phase in radians. Then
e^(j(ωt + φ)) = cos(ωt + φ) + j sin(ωt + φ)This is a point that travels counterclockwise around the unit circle at ω radians per second. It starts at angle φ when t = 0. One revolution takes T = 2π/ω seconds. Its projection onto the real axis is the cosine.
Now scale it by the amplitude V_m:
V_m e^(j(ωt + φ)) = V_m e^(jφ) · e^(jωt)The product splits into two factors:
V_m e^(jφ)is a fixed complex number. It carries the amplitude and the phase, and does not depend on time.e^(jωt)is a rotating factor. It carries the time dependence and the frequency.
The first factor is the phasor. The next chapter builds the transform around it. Here you only need to see that the two pieces separate cleanly.
Calculus on the complex exponential
Differentiate x(t) = e^(jωt) with respect to time:
d/dt e^(jωt) = jω e^(jωt)Integrate it, ignoring the constant of integration, which corresponds to a DC offset and does not belong to the steady-state sinusoid:
∫ e^(jωt) dt = e^(jωt) / (jω)So, for this signal, differentiation is multiplication by jω and integration is division by jω. Because j = e^(jπ/2), multiplication by jω gives a factor ω in magnitude and a 90° advance in angle.
Check this against the real signal. Take cos(ωt). Its derivative is -ω sin(ωt). Rewrite that as ω cos(ωt + 90°), since cos(x + 90°) = -sin x. The derivative has magnitude ω times larger and leads by 90°. The complex exponential gives the same result with one multiplication.
These two operations are why inductors and capacitors turn into simple complex multipliers. The law v = L di/dt becomes V = jωL I once every signal has the form of a phasor times e^(jωt).
Why real parts can be taken at the end
Circuit equations are linear with real coefficients. Suppose you drive a circuit with the complex source V_m e^(j(ωt+φ)) and solve for a complex response y(t). The real part of the source is the cosine you actually want. Because the coefficients are real, taking the real part commutes with the linear operations (add, scale, differentiate, integrate). So Re{y(t)} is exactly the response to Re{source}.
You can therefore solve the circuit with the complex source and take the real part once, at the end. The imaginary part of the source is a fictitious companion signal that is never physically present. It is harmless because it never mixes with the real part.
Checking numerically
The following script confirms Euler's formula, the product rule and the derivative rule. It uses a central finite difference to compare against jω e^(jωt).
import cmath
import math
theta = math.radians(30)
# Euler's formula
lhs = cmath.exp(1j * theta)
rhs = complex(math.cos(theta), math.sin(theta))
print(abs(lhs - rhs) < 1e-12)
# Product rule: magnitudes multiply, angles add
z1 = 2 * cmath.exp(1j * math.radians(20))
z2 = 3 * cmath.exp(1j * math.radians(50))
z = z1 * z2
print(abs(z), math.degrees(cmath.phase(z))) # 6.0 and 70.0
# Derivative rule: d/dt e^(jwt) = jw e^(jwt)
w = 2 * math.pi * 60
t = 0.003
h = 1e-8
numeric = (cmath.exp(1j * w * (t + h)) - cmath.exp(1j * w * (t - h))) / (2 * h)
exact = 1j * w * cmath.exp(1j * w * t)
print(abs(numeric - exact) / abs(exact) < 1e-6)The script prints True, then 6.0 with 70.0 (up to rounding), then True.
Common errors
- Degrees versus radians. Euler's formula uses radians.
cmath.exp(1j * 30)is an angle of 30 radians, not 30 degrees. Convert withmath.radiansfirst. - Using
ifor the imaginary unit. Python writes1j, and circuit texts writej. A strayiin code is a name error or, worse, a variable you defined earlier. - Angle ambiguity.
e^(jθ)equalse^(j(θ + 2π)). Angles are only defined up to full turns. When you convert back withcmath.phase, you get a value in(-π, π]. A result of-170°and190°is the same number. - Wrong quadrant. Computing the angle as
atan(b/a)loses the sign information. Useatan2(b, a)orcmath.phase. - Treating the imaginary part as physical. The complex exponential is a device for calculation. The measured voltage is the real part only.
Summary of the working rules
| Operation on `e^(jωt)` | Result | Effect on a phasor |
|---|---|---|
| Differentiate | `jω e^(jωt)` | Multiply by `jω` |
| Integrate | `e^(jωt)/(jω)` | Divide by `jω` |
| Multiply by `e^(jα)` | Rotate by α | Add α to the angle |
| Take real part | `cos(ωt)` | Recover the signal |
Exercise
Use Euler's formula to write 5 cos(ωt + 60°) as the real part of a complex expression. Then differentiate the complex expression with respect to time and take the real part. What is the derivative as a cosine with a positive amplitude?
Show answer
5 cos(ωt + 60°) = Re{ 5 e^(j60°) e^(jωt) }. Differentiating multiplies by jω, so the derivative is Re{ jω · 5 e^(j60°) e^(jωt) }. Since j = e^(j90°), this is Re{ 5ω e^(j150°) e^(jωt) } = 5ω cos(ωt + 150°). Direct check: d/dt of 5 cos(ωt + 60°) is -5ω sin(ωt + 60°) = 5ω cos(ωt + 150°).
Exercise
Evaluate (4 e^(j40°)) / (2 e^(j-20°)) in polar form, and then explain in one sentence why the same angle rule makes dividing by j equal to a 90° delay.
Show answer
The magnitude is 4/2 = 2 and the angle is 40° - (-20°) = 60°, so the result is 2 e^(j60°), or 2∠60°. Since j = e^(j90°), dividing by j subtracts 90° from the angle, which is a 90° delay (equivalently, multiplying by -j).
Exercise
A student types cmath.exp(1j * 45) in Python intending e^(j45°). What did they compute, and how do they fix it?
Show answer
They computed e^(j·45) with 45 radians, which is about 45 - 14π ≈ 1.01 rad (about 58°) after removing full turns. The fix is cmath.exp(1j * math.radians(45)).