---
title: Complex roots and oscillation
heading: Why a complex root means a decaying sinusoid
eyebrow: A8 · Lesson 20 · Complex roots and oscillation
xp: 40
---

::: hook
Lesson 18 claimed that complex roots of the characteristic equation make a circuit ring. But the solution was supposed to be $e^{st}$, and an exponential just grows or shrinks. How does an exponential oscillate? Give it a complex exponent and watch where it goes: Euler's formula from A3 turns it into a spiral, and the spiral's shadow is the ringing you see on a scope.

::: play
- The arrow is $e^{st}$ with $s = \sigma + j\omega$, drawn on the complex plane as $t$ runs. The trail is where it has been.
- Set σ = 0. What path does the arrow follow? Now make σ negative, then positive.
- The graph below shows the arrow's real part over time, with its envelope $\pm e^{\sigma t}$. How do σ and ω each change the curve?
:::
:::

```sim plot
view: complex
range: 1.6
slider: sigma = -1..0.3 step 0.05 = -0.2
slider: w = 1..6 step 0.5 = 3
slider: T = 0..6 step 0.05 = 3
curve: exp((sigma + j*w)*u) | over: u = 0..T
arrow: exp((sigma + j*w)*T) | label: e^st
shadow: on
readout: size e^(σt) = exp(sigma*T)
```

```sim plot
view: graph
x: t = 0..6 s
y: x = -1.6..1.6
slider: sigma = -1..0.3 step 0.05 = -0.2
slider: w = 1..6 step 0.5 = 3
plot: exp(sigma*t)*cos(w*t) | label: real part
plot: exp(sigma*t) | dashed | color: ch2 | label: envelope
plot: -exp(sigma*t) | dashed | color: ch2
```

::: predict
## A circuit's roots are $s = +0.2 \pm j5$. Nudged slightly, what does it do?

- [ ] Rings and dies away
- [x] Rings with a swing that grows and grows
- [ ] Settles with no ringing
- [ ] Stays exactly where it is

::: reveal
It rings with a growing swing. A positive real part makes $e^{\sigma t}$ grow, so the spiral winds outward. That's an **unstable** system. In an amplifier it's an unwanted oscillation; in an oscillator circuit it's deliberate, and something nonlinear eventually limits how big the swing gets.
:::
:::

::: nameit
## From complex roots to real oscillations

**Complex exponentials spiral.** With $s = \sigma + j\omega$, Euler's formula splits the exponential into a size and a rotation:

$$e^{st} = e^{\sigma t}e^{j\omega t} = e^{\sigma t}(\cos\omega t + j\sin\omega t)$$

The factor $e^{\sigma t}$ sets the size and $e^{j\omega t}$ turns it around the circle. Negative σ means it spirals in, zero means it circles forever, and positive σ means it spirals out.

**Conjugate pairs give real answers.** A circuit's equation has real coefficients, so its complex roots come in conjugate pairs, $\sigma \pm j\omega$. The two spirals turn in opposite directions; adding them cancels the imaginary parts:

$$\tfrac12\left(e^{(\sigma + j\omega)t} + e^{(\sigma - j\omega)t}\right) = e^{\sigma t}\cos\omega t$$

and subtracting them (divided by $2j$) gives $e^{\sigma t}\sin\omega t$. So the real solutions are

$$x(t) = e^{\sigma t}\left(A\cos\omega t + B\sin\omega t\right)$$

**Fitting the start.** At $t = 0$, $x(0) = A$. Differentiating and setting $t = 0$ gives $\dot x(0) = \sigma A + \omega B$, so

$$A = x_0 \qquad B = \frac{v_0 - \sigma x_0}{\omega}$$

**Reading the roots.** For roots $\sigma \pm j\omega$ (with σ < 0):

| Quantity | From the roots |
|---|---|
| ringing frequency | $\omega$ rad/s, or $\omega/2\pi$ Hz |
| envelope time constant | $1/|\sigma|$ |
| one peak to the next | the size falls by $e^{-2\pi|\sigma|/\omega}$ |

**Measuring damping on a scope.** The ratio of two successive peaks gives the **log decrement** $\delta = \ln(x_n/x_{n+1}) = 2\pi|\sigma|/\omega$. Since $|\sigma| = \zeta\omega_0$ and $\omega = \omega_0\sqrt{1 - \zeta^2}$,

$$\zeta = \frac{\delta}{\sqrt{4\pi^2 + \delta^2}}$$

so two peak heights read off a ringing trace tell you the damping ratio, with no need to know R, L or C.
:::

::: example
## A circuit's roots are $-200 \pm j3000$ s⁻¹. Describe its ringing.

::: solution
1. **Ring frequency.** The imaginary part sets the ringing:
   $$\begin{aligned} f &= \frac{3000}{2\pi} \\ &= 477\ \text{Hz} \end{aligned}$$
2. **Envelope.** The real part gives the envelope $e^{-200t}$, with time constant 5 ms.
3. **Cycles per time constant.** 477 Hz for 5 ms is about 2.4 cycles per time constant.

**Answer:** it rings at 477 Hz inside an $e^{-200t}$ envelope with a 5 ms time constant, about 2.4 cycles per time constant.
:::
:::

::: example
## Solve $\ddot y + 2\dot y + 5y = 0$ with $y(0) = 1$, $\dot y(0) = 0$.

::: solution
1. **Roots.** They're $-1 \pm 2j$, so
   $$y = e^{-t}(A\cos 2t + B\sin 2t)$$
2. **Fit the start.** $y(0) = 1$ and $\dot y(0) = 0$ give
   $$\begin{aligned} A &= 1 \\ -A + 2B &= 0 \end{aligned}$$
   so $B = 0.5$.

**Answer:** $y = e^{-t}(\cos 2t + 0.5\sin 2t)$.
:::
:::

::: example
## A ringing waveform oscillates at 2 kHz and its envelope falls to $1/e$ in 1 ms. What are the roots, and what is $\zeta$?

::: solution
1. **Decay rate.** The envelope $e^{\sigma t}$ falls to $1/e$ in 1 ms, so $\sigma = -1000$ s⁻¹.
2. **Ring frequency.**
   $$\begin{aligned} \omega_d &= 2\pi \times 2000 \\ &= 12\,566\ \text{rad/s} \end{aligned}$$
   so the roots are $-1000 \pm j12\,566$ s⁻¹.
3. **Natural frequency.**
   $$\begin{aligned} \omega_0 &= \sqrt{1000^2 + 12\,566^2} \\ &= 12\,606\ \text{rad/s} \end{aligned}$$
4. **Damping ratio.**
   $$\begin{aligned} \zeta &= \frac{1000}{12\,606} \\ &= 0.079 \end{aligned}$$
   It's lightly damped: the ring frequency is within 0.3% of $\omega_0$.

**Answer:** the roots are $-1000 \pm j12\,566$ s⁻¹, and $\zeta = 0.079$.
:::
:::

::: check
given: a = 2..20 int; b = 100 | 200 | 500 | 1000 | 2000
answer: b/(2*pi)
unit: Hz
tolerance: 0.5%

## A circuit's characteristic roots are $-\given{a} \pm j\given{b}$ (in 1/s). At what frequency does it ring?

::: right
Right. The imaginary part is the angular frequency: $f = \given{b}/2\pi$ = {answer}.
:::

::: misses
- [b] That's ω in rad/s. Divide by $2\pi$ for hertz.
- [a/(2*pi)] The real part sets the decay. The imaginary part sets the ringing.
- [any] Not yet. The ringing angular frequency is the imaginary part.
:::
:::

::: check
given: a = 2 | 4 | 5 | 8 | 10 | 20 | 25 | 50; b = 100 | 200 | 500
answer: 1/a
unit: s
tolerance: 0.5%

## For roots $-\given{a} \pm j\given{b}$, what is the time constant of the decaying envelope?

::: right
Right. The envelope is $e^{-\given{a}t}$, so its time constant is $1/\given{a}$ = {answer}.
:::

::: misses
- [1/b] That's set by the ringing frequency. The envelope depends only on the real part.
- [a] The time constant is the reciprocal of the decay rate.
- [any] Not yet. The envelope is $e^{\sigma t}$.
:::
:::

::: check
given: a = 1..5 int; b = 20 | 40 | 60
answer: exp(-2*pi*a/b)
tolerance: 0.5%

## A circuit rings with roots $-\given{a} \pm j\given{b}$. Each peak is what fraction of the one before it?

::: right
Right. One period is $2\pi/\given{b}$, and in that time the envelope falls by $e^{-\given{a}\cdot 2\pi/\given{b}}$ = {answer}.
:::

::: misses
- [exp(-a/b)] One full cycle takes $2\pi/\omega$, not $1/\omega$.
- [exp(-a*b/(2*pi))] One period is $2\pi/\omega$: divide by ω.
- [any] Not yet. Find the period, then how much $e^{-at}$ shrinks in that time.
:::
:::

::: check
given: P1 = 2 | 3 | 4 | 5; r = 0.1 | 0.2 | 0.3; let P2 = P1*r
answer: ln(1/r)/sqrt(4*pi^2 + ln(1/r)^2)
tolerance: 1%

## A ringing trace on a scope has one peak at {P1} V and the next at {P2} V. What is the damping ratio ζ?

::: right
Right. $\delta = \ln(\given{P1}/\given{P2})$, and $\zeta = \delta/\sqrt{4\pi^2 + \delta^2}$ = {answer}.
:::

::: misses
- [ln(1/r)/(2*pi)] That shortcut only works for light damping. This trace dies away fast, so use $\delta/\sqrt{4\pi^2 + \delta^2}$.
- [ln(1/r)] That's the log decrement δ itself. Turn it into ζ.
- [1 - r] Use the logarithm of the ratio: $\delta = \ln(x_n/x_{n+1})$.
- [any] Not yet. Find $\delta = \ln(x_n/x_{n+1})$, then ζ.
:::
:::

::: check
kind: parts
given: x0 = 1..4 int; v0 = 2 | 4 | 6 | 8; s = -1 | -2 | -3; w = 5 | 10

## A circuit's natural response is $x = e^{\given{s}t}(A\cos \given{w}t + B\sin \given{w}t)$. It starts at $x(0)$ = {x0} with $\dot x(0)$ = {v0}.

::: part
answer: x0
tolerance: 0.5%

### What is A?

::: misses
- [any] At $t = 0$ the cosine is 1 and the sine is 0, so $x(0) = A$.
:::
:::

::: part
answer: (v0 - s*x0)/w
tolerance: 0.5%

### What is B?

::: misses
- [v0/w] The decaying envelope also contributes to the starting slope: $\dot x(0) = \sigma A + \omega B$.
- [(v0 + s*x0)/w] Check the sign: $B = (v_0 - \sigma x_0)/\omega$, and here σ = {s}.
- [any] Differentiate, set $t = 0$, and use $\dot x(0) = \sigma A + \omega B$.
:::
:::

::: right
Right. Two starting facts fix the two constants.
:::
:::

::: check
kind: parts
given: f = 1 | 2 | 5; T = 0.5 | 2

## A ringing waveform oscillates at {f} kHz and its envelope falls to $1/e$ in {T} ms.

::: part
answer: 1000/T
unit: s⁻¹
tolerance: 0.5%

### What is $|\sigma|$?

::: misses
- [T] The envelope is $e^{\sigma t}$; its time constant is $1/|\sigma|$.
- [any] $|\sigma| = 1/T$, in s⁻¹.
:::
:::

::: part
answer: (1000/T)/sqrt((1000/T)^2 + (2*pi*f*1000)^2)
tolerance: 0.5%

### What is $\zeta$?

::: misses
- [any] $\zeta = \frac{|\sigma|}{\sqrt{\sigma^2 + \omega_d^2}}$.
:::
:::
:::

::: check
kind: derivation
vars: s = 0.1..2, w = 1..10, t = 0..3

## Solve $\ddot y + 2s\dot y + (s^2 + w^2)y = 0$ with $y(0) = 1$, $\dot y(0) = -s$; the roots are $-s \pm jw$.

::: step
answer: exp(-s*t)*cos(w*t)

### What is $y(t)$?
:::

::: step
answer: exp(-s*t)

### What is the envelope?
:::

::: right
Right. A cosine at the imaginary part inside an exponential set by the real part.
:::
:::

::: explain
## Why do the complex roots of a real circuit always come in conjugate pairs, and why does that make the response real?

::: model
The characteristic equation has real coefficients, set by real resistors, capacitors and inductors. If a complex number solves a polynomial with real coefficients, so does its conjugate, since conjugating the whole equation changes nothing but the root. The two exponentials $e^{(\sigma + j\omega)t}$ and $e^{(\sigma - j\omega)t}$ are mirror images that spiral in opposite directions, so adding them in equal amounts cancels the imaginary parts and leaves the real $e^{\sigma t}\cos\omega t$. The voltage you measure is that real combination.
:::
:::

::: practice

::: check
kind: choice

## A circuit's characteristic roots are $0 \pm j1000$. What does its natural response look like?

- [ ] It decays without ringing
- [ ] It rings and decays
- [x] It rings forever at a steady size
- [ ] It grows without limit

::: right
Right. With no real part there's no decay: an ideal LC circuit with no resistance.
:::

::: misses
- [1] Imaginary roots give ringing.
- [2] Decay needs a negative real part. This one has none.
- [4] Growth needs a positive real part.
:::
:::

::: check
given: w = 2 | 3 | 5 | 8; T = 1 | 2 | 3
answer: cos(w*T)
tolerance: 0.01

## What is the real part of $e^{j\given{w}t}$ at $t$ = {T} (in radians)?

::: misses
- [sin(w*T)] That's the imaginary part.
- [any] $e^{j\omega t} = \cos\omega t + j\sin\omega t$.
:::
:::

::: check
given: s = 1 | 2 | 4 | 5; t = 1 | 2
answer: exp(-s*t)
tolerance: 0.5%

## A response is $e^{-\given{s}t}\cos(50t)$. How big is its envelope at $t$ = {t} s?

::: misses
- [exp(-s*t)*cos(50*t)] That's the response itself. The envelope is just the size factor.
- [any] The envelope is $e^{\sigma t}$.
:::
:::

::: check
given: a = 2 | 3 | 5; b = 2 | 4 | 6
answer: a/sqrt(a^2 + b^2)
tolerance: 0.5%

## For roots $-\given{a} \pm j\given{b}$, what is ζ? (Hint: the roots sit at distance $\omega_0$ from the origin.)

::: misses
- [a/b] Divide by $\omega_0 = \sqrt{a^2 + b^2}$, not by b.
- [any] $\zeta = |\sigma|/\omega_0$, with $\omega_0 = \sqrt{\sigma^2 + \omega^2}$.
:::
:::
:::
