Sub topic 5
Adding, differentiating and integrating with phasors
This chapter assumes you can convert a sinusoid to a phasor and back, and that you can add, multiply and divide complex numbers in rectangular and polar form. It also assumes you know basic derivatives and integrals of sine and cosine. The goal is to show that three operations on time-domain sinusoids (sum, derivative, integral) become simple algebra on phasors. That conversion is what turns circuit differential equations into impedance equations.
The convention used here
A sinusoid is written as a cosine:
v(t) = Vm cos(ωt + φ)
Its phasor is the complex number V = Vm∠φ. The time function comes back from the phasor with
v(t) = Re{ V e^(jωt) }
This is the peak-amplitude convention. If your course uses RMS magnitudes, the rules in this chapter are unchanged, but the magnitude of each phasor is Vm/√2. A sine must be converted to a cosine first, using sin(ωt + φ) = cos(ωt + φ − 90°).
Every rule below follows from one idea. The operation is applied to the complex signal V e^(jωt), and then the real part is taken. Because taking the real part is a linear operation, it commutes with addition, with scaling by a real constant, with differentiation and with integration.
Adding sinusoids
Adding two sinusoids of the same frequency gives another sinusoid of that frequency. In the time domain this needs a trigonometric identity. With phasors, you add two complex numbers.
Let v1(t) = Vm1 cos(ωt + φ1) and v2(t) = Vm2 cos(ωt + φ2). Then
v1 + v2 = Re{ V1 e^(jωt) } + Re{ V2 e^(jωt) } = Re{ (V1 + V2) e^(jωt) }
so the phasor of the sum is V1 + V2.
Worked example
Add 3 cos(ωt) and 4 cos(ωt + 90°).
- The phasors are A = 3∠0° = 3 + j0 and B = 4∠90° = 0 + j4.
- Add in rectangular form: S = 3 + j4.
- Convert to polar form: |S| = √(3² + 4²) = 5 and the angle is arctan(4/3) ≈ 53.13°.
- The result is 5 cos(ωt + 53.13°).
import cmath
import math
# 3 cos(w t) + 4 cos(w t + 90 degrees)
A = cmath.rect(3, 0)
B = cmath.rect(4, math.radians(90))
S = A + B
print(abs(S), math.degrees(cmath.phase(S)))The output is 5.0 and 53.13 degrees (to rounding). Note that the amplitudes did not add to 7. Phasors add as vectors, so the phase difference matters.
Two special cases
- In phase (φ1 = φ2): amplitudes add directly, so the sum has amplitude Vm1 + Vm2.
- In opposition (φ1 and φ2 differ by 180°): amplitudes subtract. Equal amplitudes cancel completely.
Scaling a sinusoid by a real constant k scales its phasor by k. A negative k adds 180° to the angle, since −V = V∠(φ ± 180°).
Differentiating
Start with the complex signal V e^(jωt). Its derivative with respect to time is
d/dt [ V e^(jωt) ] = jω V e^(jωt)
Taking the real part gives
dv/dt ↔ jωV
So differentiation in the time domain is multiplication by jω in the phasor domain.
The factor jω has magnitude ω and angle +90°. Differentiating therefore does two things to the phasor: it multiplies the magnitude by ω and rotates the angle forward by 90°.
Check against the time domain
Take v(t) = Vm cos(ωt + φ). Direct differentiation gives
dv/dt = −ωVm sin(ωt + φ) = ωVm cos(ωt + φ + 90°)
The phasor of this is ωVm∠(φ + 90°). The phasor rule gives jω · Vm∠φ = ωVm∠(φ + 90°). They agree.
Higher derivatives
Each derivative contributes another factor of jω:
d²v/dt² ↔ (jω)² V = −ω² V
This is why second-order circuit equations become quadratic equations in jω.
Integrating
Integration is the inverse operation, so it divides by jω:
∫ v dt ↔ V / (jω)
Since 1/j = −j, this can be written as −jV/ω. The magnitude is divided by ω and the angle is rotated back by 90°.
Check against the time domain
∫ Vm cos(ωt + φ) dt = (Vm/ω) sin(ωt + φ) = (Vm/ω) cos(ωt + φ − 90°)
The phasor is (Vm/ω)∠(φ − 90°), which equals Vm∠φ / (jω).
The constant of integration
The phasor rule gives only the sinusoidal part of the integral. A real integral also has a constant of integration, a DC offset set by initial conditions. In sinusoidal steady state, a capacitor or inductor carrying only a sinusoid has no such offset by definition, so the phasor result is the complete steady-state answer. If a DC component is present, treat it separately (see the validity chapter's limits).
Summary of the three rules
| Time-domain operation | Phasor operation | Effect on magnitude | Effect on angle | Column | Column |
|---|---|---|---|---|---|
| v1 + v2 (same ω) | V1 + V2 | Vector sum | Vector sum | ||
| k v (k real) | k V | Multiplied by \ | k\ | +180° if k < 0 | |
| dv/dt | jω V | Multiplied by ω | +90° | ||
| ∫ v dt | V / (jω) | Divided by ω | −90° |
Solving a differential equation with phasors
Consider a series circuit with a resistor R and an inductor L driven by v(t) = Vm cos(ωt). KVL gives
L di/dt + R i = v(t)
Solving this in the time domain requires an assumed solution and trigonometric matching. With phasors, apply the rules term by term:
jωL I + R I = V
so
I = V / (R + jωL)
Numeric example
Let R = 100 Ω, L = 10 mH, f = 1 kHz and Vm = 10 V with zero phase.
- ω = 2π · 1000 ≈ 6283.2 rad/s.
- ωL ≈ 62.83 Ω, so the denominator is 100 + j62.83.
- Its magnitude is √(100² + 62.83²) ≈ 118.1 Ω and its angle is arctan(62.83/100) ≈ 32.14°.
- I = 10∠0° / 118.1∠32.14° ≈ 0.0847∠−32.14° A.
- In the time domain, i(t) ≈ 84.7 cos(ωt − 32.14°) mA.
import cmath
import math
R = 100.0
L = 10e-3
w = 2 * math.pi * 1000.0
V = cmath.rect(10, 0)
I = V / (R + 1j * w * L)
print(abs(I), math.degrees(cmath.phase(I)))The current lags the voltage by about 32°. That lag is the sign of an inductive circuit. Differentiating the current introduced the +90° rotation, and the resistor's term balances it to give a lag that is less than 90°.
Common errors
- Mixing sine and cosine. If one source is a sine and another a cosine, convert both to cosine before forming phasors. Forgetting this shifts the answer by 90°.
- Adding magnitudes. The sum of amplitudes is only correct for signals in phase.
- Forgetting ω. The derivative rule multiplies by ω in rad/s, not by f in hertz. Use ω = 2πf.
- Wrong sign of the integral rotation. Integration rotates by −90°. Division by j is the same as multiplying by −j.
- Mixed frequencies. A circuit with two sources at different frequencies cannot be solved with one phasor set. Solve each frequency separately and add the time-domain results (superposition).
- Calculator angle mode. Check degrees versus radians before converting. Python's
cmathuses radians. - Wrong quadrant. Use
atan2orcmath.phaserather than arctan(y/x), which loses the quadrant when the real part is negative.
Edge cases
- ω = 0 (DC). The derivative rule gives jω V = 0, which is correct since a constant has zero derivative. The integral rule divides by zero. That reflects the integral of a constant growing without bound, so the phasor integral is not defined at DC.
- Zero-magnitude phasor. A phasor of 0 represents a signal that is zero for all time. Its angle is meaningless.
- Equal and opposite signals. Adding V∠φ and V∠(φ + 180°) gives 0. No sinusoid remains.
Exercise
Find the sum of v1(t) = 6 cos(ωt + 20°) and v2(t) = 8 cos(ωt + 110°) as a single cosine. Then find the derivative of the sum as a phasor, using ω = 1000 rad/s.
Show answer
The phase difference is 90°, so the phasors are perpendicular and the magnitude is √(6² + 8²) = 10. The angle is 20° + arctan(8/6) = 20° + 53.13° = 73.13°. The sum is 10 cos(1000t + 73.13°). The derivative phasor is jω times the sum phasor: 1000 · 10∠(73.13° + 90°) = 10000∠163.13°, which is the time function 10000 cos(1000t + 163.13°).
Exercise
A signal has phasor V = 5∠−40° at ω = 200 rad/s. Give the phasor of its integral and write the integral as a time function.
Show answer
Divide by jω = 200∠90°. The magnitude is 5/200 = 0.025 and the angle is −40° − 90° = −130°. The integral is 0.025 cos(200t − 130°).
Exercise
A series circuit has R = 50 Ω and C = 20 µF, driven by v(t) = 12 cos(1000t) V. Use the integral rule on KVL, R i + (1/C)∫i dt = v, to find the current phasor I.
Show answer
Apply the rules: R I + I/(jωC) = V. With ω = 1000, 1/(jωC) = 1/(j · 0.02) = −j50 Ω. So I = 12∠0° / (50 − j50). The denominator is 70.71∠−45°, so I = 0.1697∠45° A, or i(t) = 169.7 cos(1000t + 45°) mA. The current leads the voltage, as expected for a capacitive circuit.