Complex Roots of the Characteristic Equation
When the characteristic equation ar² + br + c = 0 has complex roots r = α ± βi, the equation ay″ + by′ + cy = 0 has the real general solution y = e^(αx)(C₁ cos βx + C₂ sin βx). The real part α makes the solution grow or decay, and the imaginary part β sets how fast it oscillates.
Before this lesson: Second-Order Homogeneous Linear Equations, Complex Solutions of Quadratic Equations and The Wronskian
Why complex roots give sines and cosines
For ay″ + by′ + cy = 0 you try y = e^(rx), which leads to the characteristic equation ar² + br + c = 0. When the discriminant b² − 4ac is negative, the roots are a complex conjugate pair r = α ± βi with β positive.
The functions e^((α + βi)x) and e^((α − βi)x) do solve the equation, but they take complex values. Euler’s formula, e^(iθ) = cos θ + i sin θ, splits each one into a real part and an imaginary part: e^((α + βi)x) = e^(αx)cos βx + i e^(αx)sin βx.
Because the equation is linear with real coefficients, the real part and the imaginary part are each real solutions on their own. That gives y₁ = e^(αx)cos βx and y₂ = e^(αx)sin βx. Their Wronskian is βe^(2αx), which is never 0, so they form a fundamental set.
Complex roots formula
If ar² + br + c = 0 has roots r = α ± βi, then
y = e^{\alpha x}\left(C_1\cos \beta x + C_2\sin \beta x\right)\alpha = -\dfrac{b}{2a}, \qquad \beta = \dfrac{\sqrt{4ac - b^2}}{2a}Here α is the real part of the roots and β is the positive imaginary part. You never write i in the final answer.
How to solve an equation with complex roots
- Write the characteristic equation ar² + br + c = 0.
- Solve it with the quadratic formula or by completing the square. If b² − 4ac is negative, write the roots as α ± βi.
- Write y = e^(αx)(C₁ cos βx + C₂ sin βx).
- For an initial-value problem, find y′ with the product rule, then substitute the initial conditions to find C₁ and C₂.
What α tells you: if α is negative the oscillation dies out, if α is 0 it keeps the same size forever, and if α is positive it grows.
Complex roots examples
Example 1: Pure imaginary roots
Solve y″ + 9y = 0.
r^2 + 9 = 0
Write the characteristic equation.
r^2 = -9
Subtract 9 from both sides.
r = \pm 3i
Take square roots, using √−9 = 3i (see complex numbers).
\alpha = 0,\quad \beta = 3
Read the real and imaginary parts.
y = C_1\cos 3x + C_2\sin 3x
Substitute into the formula; e^(0x) = 1.
Answer: y = C₁ cos 3x + C₂ sin 3x. With α = 0 the solution oscillates forever without growing or shrinking.
Example 2: Growing oscillation
Solve y″ − 4y′ + 13y = 0.
r^2 - 4r + 13 = 0
Write the characteristic equation.
r = \dfrac{4 \pm \sqrt{(-4)^2 - 4(1)(13)}}{2(1)}Use the quadratic formula with a = 1, b = −4, c = 13.
r = \dfrac{4 \pm \sqrt{16 - 52}}{2}Simplify the square and the products.
r = \dfrac{4 \pm \sqrt{-36}}{2}Subtract under the radical.
r = \dfrac{4 \pm 6i}{2}Use √−36 = 6i.
r = 2 \pm 3i
Divide each term by 2.
y = e^{2x}\left(C_1\cos 3x + C_2\sin 3x\right)Substitute α = 2 and β = 3.
Answer: y = e^(2x)(C₁ cos 3x + C₂ sin 3x). Because α = 2 is positive, the swings grow.
Example 3: An initial-value problem
Solve y″ + 2y′ + 2y = 0 with y(0) = 2 and y′(0) = −1.
r^2 + 2r + 2 = 0
Write the characteristic equation.
(r + 1)^2 + 1 = 0
Complete the square: r² + 2r + 1 + 1.
(r + 1)^2 = -1
Subtract 1 from both sides.
r + 1 = \pm i
Take square roots.
r = -1 \pm i
Subtract 1 from both sides.
y = e^{-x}\left(C_1\cos x + C_2\sin x\right)Substitute α = −1 and β = 1.
y(0) = C_1 = 2
Substitute x = 0; cos 0 = 1 and sin 0 = 0.
y' = -e^{-x}\left(C_1\cos x + C_2\sin x\right) + e^{-x}\left(-C_1\sin x + C_2\cos x\right)Differentiate with the product rule.
y' = e^{-x}\left[(C_2 - C_1)\cos x - (C_1 + C_2)\sin x\right]Group the cosine terms and the sine terms.
y'(0) = C_2 - C_1 = -1
Substitute x = 0.
C_2 - 2 = -1
Substitute C₁ = 2.
C_2 = 1
Add 2 to both sides.
y = e^{-x}\left(2\cos x + \sin x\right)Substitute both constants.
Answer: y = e^(−x)(2 cos x + sin x). Check: y(0) = 2 and y′(0) = 1 − 2 = −1.
Example 4: A leading coefficient other than 1
Solve 4y″ + 4y′ + 17y = 0.
r = \dfrac{-4 \pm \sqrt{4^2 - 4(4)(17)}}{2(4)}Use the quadratic formula on 4r² + 4r + 17 = 0.
r = \dfrac{-4 \pm \sqrt{16 - 272}}{8}Simplify the square and the products.
r = \dfrac{-4 \pm \sqrt{-256}}{8}Subtract under the radical.
r = \dfrac{-4 \pm 16i}{8}Use √−256 = 16i.
r = -\tfrac{1}{2} \pm 2iDivide each term by 8.
y = e^{-x/2}\left(C_1\cos 2x + C_2\sin 2x\right)Substitute α = −1/2 and β = 2.
Answer: y = e^(−x/2)(C₁ cos 2x + C₂ sin 2x). Dividing the whole equation by 4 first gives the same roots.
Example 5: A damped spring (word problem)
A 1 kg mass on a spring has damping constant 2 N·s/m and spring constant 5 N/m, so its position x (in meters, t in seconds) satisfies x″ + 2x′ + 5x = 0. It is pulled 0.4 m from rest and let go, so x(0) = 0.4 and x′(0) = 0. Find x(t) and the first time the mass passes its rest position.
r^2 + 2r + 5 = 0
Write the characteristic equation.
r = \dfrac{-2 \pm \sqrt{4 - 20}}{2} = \dfrac{-2 \pm 4i}{2}Use the quadratic formula; √−16 = 4i.
r = -1 \pm 2i
Divide each term by 2.
x = e^{-t}\left(C_1\cos 2t + C_2\sin 2t\right)Substitute α = −1 and β = 2.
C_1 = 0.4
Substitute t = 0 into x.
x' = e^{-t}\left[(2C_2 - C_1)\cos 2t - (2C_1 + C_2)\sin 2t\right]Differentiate with the product rule and group terms.
2C_2 - 0.4 = 0
Substitute t = 0 and C₁ = 0.4 into x′.
C_2 = 0.2
Add 0.4 to both sides and divide by 2.
x = e^{-t}\left(0.4\cos 2t + 0.2\sin 2t\right)Write the motion.
0.4\cos 2t + 0.2\sin 2t = 0
Set x = 0; e^(−t) is never 0.
\tan 2t = -2
Divide both sides by 0.2 cos 2t.
2t = \pi - \arctan 2 \approx 2.0344
Take the first positive angle with tangent −2 (see inverse trig functions).
t \approx 1.017
Divide by 2.
Answer: x(t) = e^(−t)(0.4 cos 2t + 0.2 sin 2t). The mass first passes its rest position after about 1.02 seconds. The swings repeat every 2π/2 = π ≈ 3.14 seconds while shrinking by the factor e^(−t), as the graph above shows.
Common mistakes
| Mistake | Example of the error | Fix |
|---|---|---|
| Putting β in the exponent | Writing e^(3x) for roots ±3i | The exponent uses the real part α. For ±3i, α = 0, so there is no exponential factor. |
| Keeping i in the answer | y = C₁e^((2 + 3i)x) + C₂e^((2 − 3i)x) | Use the real form e^(2x)(C₁ cos 3x + C₂ sin 3x). |
| Using the whole root inside cosine | cos((2 + 3i)x) | Only β goes inside: cos 3x and sin 3x. |
| Forgetting to divide by 2a | Roots 4 ± 6i for r² − 4r + 13 = 0 | Divide every term by 2a: 2 ± 3i. |
| Dropping the e^(αx) factor when differentiating | y′ = e^(−x)(−C₁ sin x + C₂ cos x) | Use the product rule: the derivative of e^(−x) adds −e^(−x)(C₁ cos x + C₂ sin x). |
| Leaving out one of the two terms | y = C₁e^(−x)cos x | A second-order equation needs both the cosine and the sine term. |
Related ideas
All three cases of the characteristic equation
| Roots of ar² + br + c = 0 | Discriminant | General solution |
|---|---|---|
| Real and different, r₁ and r₂ | b² − 4ac positive | y = C₁e^(r₁x) + C₂e^(r₂x) |
| Repeated, r | b² − 4ac = 0 | y = (C₁ + C₂x)e^(rx) |
| Complex, α ± βi | b² − 4ac negative | y = e^(αx)(C₁ cos βx + C₂ sin βx) |
The first case is in Second-Order Homogeneous Linear Equations. The repeated case comes from reduction of order and has its own lesson, Repeated Roots of the Characteristic Equation.
Amplitude-phase form
You can combine the two terms into one cosine: C₁ cos βx + C₂ sin βx = R cos(βx − δ), where R = √(C₁² + C₂²) and tan δ = C₂/C₁. In Example 5, R = √(0.16 + 0.04) ≈ 0.447, which is the height of the dashed envelope in the graph.
Why the real part is a solution
If z(x) = u(x) + iv(x) solves ay″ + by′ + cy = 0 with real a, b and c, then substituting gives (au″ + bu′ + cu) + i(av″ + bv′ + cv) = 0. A complex number is 0 only when its real and imaginary parts are both 0, so u and v are each solutions.
Practice problems
- Solve y″ + 16y = 0.
- Solve y″ + 4y′ + 5y = 0.
- Solve y″ − 2y′ + 10y = 0.
- Solve y″ + 6y′ + 34y = 0.
- Solve 9y″ + 4y = 0.
- Solve y″ + y′ + y = 0.
- Solve y″ + 25y = 0 with y(0) = 3 and y′(0) = 10.
- Solve y″ − 2y′ + 2y = 0 with y(0) = 1 and y′(0) = 3.
- Find a second-order equation ay″ + by′ + cy = 0 that has the solution y = e^(−3x) sin 2x.
- A spring satisfies x″ + 4x′ + 20x = 0 with x(0) = 0 and x′(0) = 2 (x in meters, t in seconds). Find x(t) and the first positive time the mass is back at rest position.
Show answers
1.
r^2 + 16 = 0 \Rightarrow r^2 = -16
Write the characteristic equation and subtract 16.
r = \pm 4i
Take square roots: α = 0, β = 4.
Answer: y = C₁ cos 4x + C₂ sin 4x
2.
r = \dfrac{-4 \pm \sqrt{16 - 20}}{2}Use the quadratic formula on r² + 4r + 5 = 0.
r = \dfrac{-4 \pm 2i}{2} = -2 \pm iUse √−4 = 2i and divide by 2.
Answer: y = e^(−2x)(C₁ cos x + C₂ sin x)
3.
r = \dfrac{2 \pm \sqrt{4 - 40}}{2}Use the quadratic formula on r² − 2r + 10 = 0.
r = \dfrac{2 \pm 6i}{2} = 1 \pm 3iUse √−36 = 6i and divide by 2.
Answer: y = e^x(C₁ cos 3x + C₂ sin 3x)
4.
r = \dfrac{-6 \pm \sqrt{36 - 136}}{2}Use the quadratic formula on r² + 6r + 34 = 0.
r = \dfrac{-6 \pm 10i}{2} = -3 \pm 5iUse √−100 = 10i and divide by 2.
Answer: y = e^(−3x)(C₁ cos 5x + C₂ sin 5x)
5.
9r^2 + 4 = 0 \Rightarrow r^2 = -\tfrac{4}{9}Subtract 4 and divide by 9.
r = \pm \tfrac{2}{3}iTake square roots: α = 0, β = 2/3.
Answer: y = C₁ cos(2x/3) + C₂ sin(2x/3)
6.
r = \dfrac{-1 \pm \sqrt{1 - 4}}{2}Use the quadratic formula on r² + r + 1 = 0.
r = -\tfrac{1}{2} \pm \tfrac{\sqrt{3}}{2}iUse √−3 = i√3 and split the fraction.
Answer: y = e^(−x/2)(C₁ cos(√3x/2) + C₂ sin(√3x/2))
7.
y = C_1\cos 5x + C_2\sin 5x
The roots of r² + 25 = 0 are ±5i.
y(0) = C_1 = 3
Substitute x = 0.
y' = -5C_1\sin 5x + 5C_2\cos 5x
Differentiate.
5C_2 = 10 \Rightarrow C_2 = 2
Substitute x = 0 into y′ and divide by 5.
Answer: y = 3 cos 5x + 2 sin 5x
8.
r = \dfrac{2 \pm \sqrt{4 - 8}}{2} = 1 \pm iUse the quadratic formula; √−4 = 2i.
y = e^{x}\left(C_1\cos x + C_2\sin x\right),\quad C_1 = 1Write the general solution and substitute x = 0.
y' = e^{x}\left[(C_1 + C_2)\cos x + (C_2 - C_1)\sin x\right]Differentiate with the product rule and group terms.
1 + C_2 = 3 \Rightarrow C_2 = 2
Substitute x = 0 and C₁ = 1, then subtract 1.
Answer: y = e^x(cos x + 2 sin x)
9.
r = -3 \pm 2i
The solution e^(−3x) sin 2x needs α = −3 and β = 2.
(r + 3)^2 = -4
Add 3 to both sides, then square both sides: (±2i)² = −4.
r^2 + 6r + 9 = -4
Expand the square.
r^2 + 6r + 13 = 0
Add 4 to both sides.
Answer: y″ + 6y′ + 13y = 0 (or any nonzero multiple)
10.
r = \dfrac{-4 \pm \sqrt{16 - 80}}{2} = -2 \pm 4iUse the quadratic formula; √−64 = 8i.
x = e^{-2t}\left(C_1\cos 4t + C_2\sin 4t\right),\quad C_1 = 0Write the general solution and substitute t = 0.
x = C_2e^{-2t}\sin 4t,\quad x' = C_2e^{-2t}(4\cos 4t - 2\sin 4t)Drop the C₁ term and differentiate with the product rule.
4C_2 = 2 \Rightarrow C_2 = 0.5
Substitute t = 0 into x′ and divide by 4.
\sin 4t = 0 \Rightarrow 4t = \pi \Rightarrow t = \dfrac{\pi}{4} \approx 0.785Set x = 0 and take the first positive solution.
Answer: x(t) = 0.5e^(−2t) sin 4t; it is back at rest position at t = π/4 ≈ 0.785 s
Complex roots FAQ
What happens when the characteristic equation has complex roots?
The roots come as a conjugate pair α ± βi, and the general solution is y = e^(αx)(C₁ cos βx + C₂ sin βx). The solution oscillates, and the factor e^(αx) makes the swings grow, shrink or stay the same size.
Why do complex roots give sine and cosine?
Euler’s formula writes e^(iβx) as cos βx + i sin βx. The real and imaginary parts of the complex solution e^((α + βi)x) are each real solutions, and they are e^(αx)cos βx and e^(αx)sin βx.
Do I use both complex roots?
No. The pair α + βi and α − βi gives the same two real solutions, so you use α and β once. The ± only tells you β.
What if the real part is 0?
Then the roots are ±βi and the solution is y = C₁ cos βx + C₂ sin βx, a steady oscillation such as an undamped spring.
Summary
- Complex roots happen when b² − 4ac is negative; they come in a pair α ± βi.
- The general solution is y = e^(αx)(C₁ cos βx + C₂ sin βx).
- α = −b/(2a) controls growth or decay; β controls the oscillation.
- Use the product rule to find y′ for initial conditions.
- No i appears in the final real solution.
Previous lesson: Reduction of Order
Next lesson: Repeated Roots of the Characteristic Equation
Back to the Differential Equations Index