---
title: Roots that aren't real
heading: An equation with no real answer, and a circuit that still rings
eyebrow: A3 · Lesson 1 · Roots that aren't real
xp: 40
---

::: hook
A circuit with a resistor, an inductor and a capacitor has a characteristic equation like $s^2 + 2s + 5 = 0$. The discriminant is $4 - 20 = -16$, so no real number solves it. Yet the circuit does something perfectly definite: it rings, a decaying oscillation. The answer is two numbers built with $\sqrt{-1}$, and each half of them means something you can see on a scope. This course is about those numbers.

::: play
- The parabola is $y = x^2 + bx + c$. The readouts show its two roots as real part ± imaginary part.
- Start with $c$ small so the parabola crosses the axis twice. Then raise $c$ until it lifts off. What happens to the roots' imaginary part?
- Once it's off the axis, change $b$. What does $b$ control now?
:::
:::

```sim plot
view: graph
x: x = -6..4
y: y = -4..16
slider: b = -4..6 step 0.5 = 2
slider: c = -3..12 step 0.5 = 5
plot: x^2 + b*x + c | label: x² + bx + c
plot: 0 | dashed | color: ch3
readout: discriminant = b^2 - 4*c | digits: 3
readout: middle of the roots = -b/2 | digits: 3
readout: ± imaginary part = sqrt(abs(c - b^2/4))*step(c - b^2/4) | digits: 3
readout: ± real spread = sqrt(abs(b^2/4 - c))*step(b^2/4 - c) | digits: 3
```

::: predict
## $s^2 + 2s + 5 = 0$ has no real roots. If you allow a number $j$ with $j^2 = -1$, what are its roots?

- [ ] $\pm\sqrt{5}$
- [x] $-1 \pm 2j$
- [ ] $-2 \pm j$
- [ ] $1 \pm 2j$

::: reveal
$-1 \pm 2j$. The quadratic formula gives $\frac{-2 \pm \sqrt{-16}}{2}$, and $\sqrt{-16} = 4j$. The real part, −1, comes from $-b/2$, the middle of the parabola. The imaginary part, 2, measures how far the parabola sits above the axis. In the circuit, the −1 sets how fast the ringing dies out and the 2 sets how fast it oscillates.
:::
:::

::: nameit
## The imaginary unit

Mathematicians call it $i$; engineers call it $j$, because $i$ is current. It's defined by

$$j^2 = -1$$

so $\sqrt{-16} = \sqrt{16}\sqrt{-1} = 4j$. Its powers cycle with period 4:

$$j^1 = j \qquad j^2 = -1 \qquad j^3 = -j \qquad j^4 = 1$$

so $j^7 = j^4 \cdot j^3 = -j$. Divide the exponent by 4 and keep the remainder.

A **complex number** is $z = a + jb$ with $a$ and $b$ real. $a$ is its **real part**, $\operatorname{Re} z$, and $b$ its **imaginary part**, $\operatorname{Im} z$ (the imaginary part is the real number $b$, not $jb$).

## Every quadratic has two roots

With $j$ available, the quadratic formula always works:

$$x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$$

When the discriminant $D = b^2 - 4ac$ is negative, $\sqrt{D} = j\sqrt{-D}$, and the roots are

$$x = -\frac{b}{2a} \pm j\,\frac{\sqrt{4ac - b^2}}{2a}$$

They come as a **conjugate pair**: the same real part and opposite imaginary parts. That's true for any polynomial with real coefficients, whatever its degree: complex roots come in pairs $a \pm jb$.

Going the other way, a pair $a \pm jb$ multiplies out to a real quadratic:

$$\big(x - (a + jb)\big)\big(x - (a - jb)\big) = x^2 - 2ax + (a^2 + b^2)$$

The middle coefficient is minus twice the real part, and the last is the real part squared plus the imaginary part squared. That's how you check an answer, and how an engineer builds a filter's polynomial from where its roots should be.
:::

::: example
## Solve $s^2 + 2s + 5 = 0$ and check the answer.

::: solution
1. **Use the quadratic formula.**
   $$\begin{aligned} s &= \frac{-2 \pm \sqrt{4 - 20}}{2} \\ &= \frac{-2 \pm 4j}{2} \\ &= -1 \pm 2j \end{aligned}$$
2. **Check by multiplying out the factors.**
   $$\begin{aligned} &x^2 - 2(-1)x + \big((-1)^2 + 2^2\big) \\ &= x^2 + 2x + 5 \end{aligned}$$
   It matches.

**Answer:** $s = -1 \pm 2j$.
:::
:::

::: example
## Simplify $j^{7}$, $j^{10}$ and $j^{-1}$.

::: solution
1. **The seventh power.** $7 = 4 + 3$, so
   $$\begin{aligned} j^7 &= j^3 \\ &= -j \end{aligned}$$
2. **The tenth power.** $10 = 8 + 2$, so
   $$\begin{aligned} j^{10} &= j^2 \\ &= -1 \end{aligned}$$
3. **The inverse.** $j^{-1} = 1/j$, so multiply top and bottom by $j$:
   $$\begin{aligned} \frac{1}{j} &= \frac{j}{j^2} \\ &= \frac{j}{-1} \\ &= -j \end{aligned}$$
4. **Check.**
   $$\begin{aligned} j \times (-j) &= -j^2 \\ &= 1 \end{aligned}$$

**Answer:** $j^7 = -j$, $j^{10} = -1$ and $j^{-1} = -j$.
:::
:::

::: example
## A series RLC circuit with $R$ = 40 Ω, $L$ = 0.1 H and $C$ = 10 µF has the characteristic equation $s^2 + 400s + 10^6 = 0$. Find its roots, and say how the circuit rings.

::: solution
1. **Use the quadratic formula.**
   $$\begin{aligned} s &= \frac{-400 \pm \sqrt{400^2 - 4 \times 10^6}}{2} \\ &= -200 \pm \frac{\sqrt{-3\,840\,000}}{2} \\ &= -200 \pm j\,979.8 \end{aligned}$$
   per second.
2. **Ringing from the imaginary part.** The imaginary part sets the ringing, 979.8 rad/s, or
   $$\begin{aligned} f &= \frac{979.8}{2\pi} \\ &= 156\ \text{Hz} \end{aligned}$$
3. **Decay from the real part.** The real part sets the decay: the ringing dies away as $e^{-200t}$, with a time constant of
   $$\begin{aligned} \tau &= \frac{1}{200}\ \text{s} \\ &= 5\ \text{ms} \end{aligned}$$
4. **What the negative discriminant means.** A negative discriminant doesn't mean the circuit has no answer; it means the answer oscillates.

**Answer:** $s = -200 \pm j\,979.8$ per second: the circuit rings at 979.8 rad/s (156 Hz), and the ringing dies away with a 5 ms time constant.
:::
:::

::: check
given: p = 2 | 4 | 6; q = 10 | 13 | 25
answer: -p/2
tolerance: 0.01

## $s^2 + \given{p}s + \given{q} = 0$ has complex roots. What is their real part?

::: right
Right. The real part is $-b/2a = -\given{p}/2$ = {answer}.
:::

::: misses
- [p/2] Mind the sign: it's $-b/2a$.
- [-p] Divide by $2a$, which is 2 here.
- [any] Not yet. The real part is $-b/(2a)$.
:::
:::

::: check
given: p = 2 | 4 | 6; q = 10 | 13 | 25
answer: sqrt(q - p^2/4)
tolerance: 0.5%

## What is the positive imaginary part of the roots of $s^2 + \given{p}s + \given{q} = 0$?

::: right
Right. $\sqrt{4ac - b^2}/(2a) = \sqrt{4 \times \given{q} - \given{p}^2}/2$ = {answer}.
:::

::: misses
- [sqrt(4*q - p^2)] Divide by $2a$ = 2.
- [sqrt(q)] Subtract the $b^2/4$ part first: $\sqrt{q - p^2/4}$.
- [any] Not yet. Use $\sqrt{4ac - b^2}/(2a)$.
:::
:::

::: check
given: n = 5..15 int
answer: Re(j^n)
tolerance: 0.01

## What is the real part of $j^{\given{n}}$?

::: right
Right. The powers of $j$ cycle $j, -1, -j, 1$; take {n} modulo 4.
:::

::: misses
- [any] Not yet. Divide {n} by 4 and use the remainder: $j^1 = j$, $j^2 = -1$, $j^3 = -j$, $j^0 = 1$.
:::
:::

::: check
kind: expression
given: a = -1 | -2 | -3; b = 1 | 2 | 4
answer: x^2 - 2*a*x + a^2 + b^2
vars: x = -5..5

## Write the real quadratic, with leading coefficient 1, whose roots are $\given{a} \pm \given{b}j$.

::: right
Right. $x^2 - 2ax + (a^2 + b^2)$, with $a$ = {a} and $b$ = {b}.
:::

::: misses
- [x^2 + 2*a*x + a^2 + b^2] The middle term is minus twice the real part.
- [x^2 - 2*a*x + a^2 - b^2] $(jb)(-jb) = -j^2b^2 = +b^2$.
- [any] Not yet. Multiply $(x - (a + jb))(x - (a - jb))$.
:::
:::

::: check
kind: choice

## A cubic with real coefficients has a root at $2 + 3j$. Which must also be a root?

- [x] $2 - 3j$
- [ ] $-2 + 3j$
- [ ] $-2 - 3j$
- [ ] $3 + 2j$

::: right
Right. Complex roots of a real polynomial come in conjugate pairs, so its other roots are $2 - 3j$ and one real root.
:::

::: misses
- [any] The pair shares the real part and flips the sign of the imaginary part.
:::
:::

::: check
given: a = -1 | -3 | -5; b = 2 | 4
answer: a^2 + b^2
tolerance: 0.01

## The roots $\given{a} \pm \given{b}j$ multiply to what?

::: right
Right. $(a + jb)(a - jb) = a^2 + b^2$ = {answer}, the quadratic's constant term.
:::

::: misses
- [a^2 - b^2] $(jb)(-jb) = +b^2$, since $j^2 = -1$.
- [2*a] That's their sum.
- [any] Not yet. Multiply $(a + jb)(a - jb)$, using $j^2 = -1$.
:::
:::

::: check
kind: parts
given: L = 10 | 50; C = 1 | 10; z = 0.2 | 0.4 | 0.6; let R = 2*z*sqrt(L*1e-3/(C*1e-6))

## A series RLC circuit has $R$ = {R} Ω, $L$ = {L} mH and $C$ = {C} µF. Its characteristic equation is $s^2 + \frac{R}{L}s + \frac{1}{LC} = 0$.

::: part
answer: R/(2*L*1e-3)
tolerance: 0.5%

### Its roots are $-\sigma \pm j\omega_d$. What is the decay rate $\sigma$, in 1/s?

::: misses
- [R/(L*1e-3)] The real part of the roots is half the middle coefficient.
- [R/(2*L)] Put $L$ in henries.
- [any] $\sigma = R/2L$.
:::
:::

::: part
answer: sqrt(1/(L*1e-3*C*1e-6) - (R/(2*L*1e-3))^2)
unit: rad/s
tolerance: 0.5%

### What is the ringing frequency $\omega_d$?

::: misses
- [sqrt(1/(L*1e-3*C*1e-6))] That's the undamped frequency. Subtract $\sigma^2$ under the root.
- [any] $\omega_d = \sqrt{1/LC - \sigma^2}$.
:::
:::

::: part
answer: sqrt(1/(L*1e-3*C*1e-6) - (R/(2*L*1e-3))^2)/(2*pi)
unit: Hz
tolerance: 0.5%

### What is that in hertz?

::: misses
- [any] Divide by $2\pi$.
:::
:::
:::

::: check
kind: derivation
vars: p = 0.5..3, q = 4..10

## Derive the roots of $s^2 + ps + q = 0$ when $q > p^2/4$.

::: step
answer: p^2 - 4*q

### What is the discriminant?
:::

::: step
answer: -p/2

### The roots are $-p/2 \pm \tfrac12\sqrt{p^2 - 4q}$. With a negative discriminant, what is their real part?
:::

::: step
answer: sqrt(4*q - p^2)/2

### What is the positive imaginary part?

::: misses
- [sqrt(p^2 - 4*q)/2] That's the root of a negative number. Pull out $j$: $\sqrt{p^2 - 4q} = j\sqrt{4q - p^2}$.
:::
:::

::: step
answer: q

### Multiply a root by its conjugate: what is $|s|^2$?
:::

::: right
Right. The roots are $-p/2 \pm j\sqrt{4q - p^2}/2$, and $|s|^2 = q$: in a circuit, that's $1/LC$, the square of the undamped frequency.
:::
:::

::: explain
## Why do the complex roots of a polynomial with real coefficients always come in conjugate pairs?

::: model
If you replace $j$ by $-j$ everywhere, every real number stays the same and $j^2$ is still −1, so all the arithmetic rules still hold. A polynomial with real coefficients doesn't change under that swap, so if $a + jb$ makes it zero, then $a - jb$ does too. In the quadratic formula you can see it directly: the $\pm$ in front of $\sqrt{b^2 - 4ac}$ gives one root with $+j$ and the other with $-j$.
:::
:::

::: practice

::: check
given: p = 1 | 3 | 8; q = 5 | 17 | 20
answer: -p/2
tolerance: 0.01

## What is the real part of the roots of $s^2 + \given{p}s + \given{q} = 0$?

::: misses
- [p/2] It's $-b/2a$.
- [any] $-b/(2a)$.
:::
:::

::: check
given: p = 1 | 3 | 8; q = 20 | 26 | 41
answer: sqrt(q - p^2/4)
tolerance: 0.5%

## What is the positive imaginary part of the roots of $s^2 + \given{p}s + \given{q} = 0$?

::: misses
- [sqrt(4*q - p^2)] Divide by 2.
- [any] $\sqrt{4ac - b^2}/(2a)$.
:::
:::

::: check
given: n = 16..30 int
answer: Im(j^n)
tolerance: 0.01

## What is the imaginary part of $j^{\given{n}}$?

::: misses
- [any] Reduce {n} modulo 4 first.
:::
:::

::: check
given: a = 1 | -2 | -4; b = 1 | 3
answer: -2*a
tolerance: 0.01

## The quadratic $x^2 + Bx + C$ has roots $\given{a} \pm \given{b}j$. What is $B$?

::: misses
- [2*a] It's minus twice the real part.
- [any] $B = -2 \times$ real part.
:::
:::

::: check
given: a = 2 | 3; b = 5 | 7; c = 4 | 5
answer: -b/(2*a)
tolerance: 0.5%

## $\given{a}x^2 + \given{b}x + \given{c} = 0$ has complex roots. What is their real part?

::: misses
- [-b/2] Divide by $2a$, with $a$ = {a}.
- [any] $-b/(2a)$.
:::
:::
:::
