Systems of Linear ODEs and Eigenvalues
Write coupled equations as x′ = Ax, solve them with eigenvalues and eigenvectors, and turn any higher-order equation into a first-order system.
Welcome back!
Step 1 of 11Learn
Coupled quantities
Many systems involve several quantities that affect each other. Two tanks connected by pipes, predator and prey populations, currents in different loops of a circuit, the positions of two masses joined by springs. Each rate depends on more than one variable, so you get a system of differential equations.
A linear system with constant coefficients in two unknowns looks like
x′ = a·x + b·y y′ = c·x + d·y
or, in matrix form, x′ = A·x, with x = (x, y) and A = [[a, b], [c, d]].
Any higher-order equation can be written as a system. For y″ + 3y′ + 2y = 0, let x₁ = y and x₂ = y′. Then x₁′ = x₂ and x₂′ = −2x₁ − 3x₂, so A = [[0, 1], [−2, −3]]. This is how numerical solvers handle second-order equations: they only ever integrate first-order systems.
Try an exponential again. Guess x = v·e^(λt), where v is a constant vector. Then x′ = λv·e^(λt), and the equation becomes
A·v = λ·v
So λ must be an eigenvalue of A and v a corresponding eigenvector. The eigenvalues are roots of the characteristic equation det(A − λI) = 0, which for a 2×2 matrix is
λ^2 − (tr A)·λ + det A = 0
where tr A = a + d (the trace) and det A = ad − bc. For the system from y″ + 3y′ + 2y = 0, tr = −3 and det = 2, giving λ^2 + 3λ + 2 = 0: the same characteristic equation as before.
Step 2 of 11Practice · Work it out
For A = [[2, 1], [1, 2]], what is the larger eigenvalue?
Step 3 of 11Learn
Solving with eigenvectors
If A has two distinct real eigenvalues λ₁ and λ₂ with eigenvectors v₁ and v₂, the general solution is
x(t) = C₁·e^(λ₁t)·v₁ + C₂·e^(λ₂t)·v₂
Example. Solve x′ = x + y, y′ = 4x + y.
- Matrix. A = [[1, 1], [4, 1]], with tr = 2 and det = 1 − 4 = −3.
- Eigenvalues. λ^2 − 2λ − 3 = 0, so (λ − 3)(λ + 1) = 0: λ = 3 and λ = −1.
- Eigenvectors. For λ = 3: (A − 3I)v = 0 gives −2v₁ + v₂ = 0, so v = (1, 2). For λ = −1: 2v₁ + v₂ = 0, so v = (1, −2).
- General solution. x(t) = C₁e^(3t)(1, 2) + C₂e^(−t)(1, −2), meaning x = C₁e^(3t) + C₂e^(−t) and y = 2C₁e^(3t) − 2C₂e^(−t).
- Initial conditions. If x(0) = 2 and y(0) = 0: C₁ + C₂ = 2 and 2C₁ − 2C₂ = 0, so C₁ = C₂ = 1.
The eigenvectors are special directions. A solution starting on the line through (1, −2) stays on it and decays toward the origin. One starting on the line through (1, 2) stays on it and grows. Every other solution is a mix: the decaying part fades and the solution swings toward the growing direction. An equilibrium with one positive and one negative eigenvalue is a saddle, and it's unstable.
Complex eigenvalues λ = α ± βi give solutions with e^(αt) cos βt and e^(αt) sin βt: rotation combined with growth or decay.
Step 4 of 11Try the calculator
2×2 eigenvalue calculator
Enter the matrix A = [[a, b], [c, d]] for x′ = Ax.
- Trace
- 2
- Determinant
- -3
- Discriminant tr² − 4·det
- 16
- Real eigenvalue λ₁ (if discriminant ≥ 0)
- 3
- Real eigenvalue λ₂ (if discriminant ≥ 0)
- -1
- Imaginary part (if discriminant < 0)
- 0
Step 5 of 11Practice · Choose one
Which vector is an eigenvector of A = [[3, 0], [0, −2]] for the eigenvalue −2?
Step 6 of 11Learn
A two-tank example
Systems often come from mixing problems with several connected containers.
Setup. Tank 1 and tank 2 each hold 100 liters. Pure water flows into tank 1 at 10 L/min. Mixed solution flows from tank 1 to tank 2 at 10 L/min, and from tank 2 out of the system at 10 L/min. Let x and y be the kilograms of salt in each tank.
- Tank 1 loses salt at (x/100)(10) = 0.1x kg/min and gains none: x′ = −0.1x.
- Tank 2 gains 0.1x and loses 0.1y: y′ = 0.1x − 0.1y.
So A = [[−0.1, 0], [0.1, −0.1]]. The trace is −0.2 and the determinant 0.01, so λ^2 + 0.2λ + 0.01 = (λ + 0.1)2 = 0: a repeated eigenvalue −0.1.
With a repeated eigenvalue and only one eigenvector, the solution includes a t·e^(λt) term, just as in the repeated-root case for second-order equations. If tank 1 starts with 20 kg and tank 2 with none, then x = 20e^(−0.1t) and y = 2t·e^(−0.1t). Salt in tank 2 first rises as it arrives from tank 1, peaks at t = 10 minutes with y ≈ 7.4 kg, then washes out.
Both eigenvalues negative means every solution decays to the equilibrium (0, 0): a stable system. That's the general rule. The equilibrium of x′ = Ax is stable exactly when every eigenvalue has a negative real part.
Step 7 of 11Chart
Salt in the two tanks
Tank 1 simply drains (x = 20e^(−0.1t)). Tank 2 first fills with salt from tank 1, then washes out (y = 2t·e^(−0.1t)). The curves cross exactly at tank 2's peak, t = 10.
| Minutes | Tank 1, x(t) | Tank 2, y(t) |
|---|---|---|
| 0 | 20 | 0 |
| 5 | 12.1 | 6.1 |
| 10 | 7.4 | 7.4 |
| 15 | 4.5 | 6.7 |
| 20 | 2.7 | 5.4 |
| 25 | 1.6 | 4.1 |
| 30 | 1 | 3 |
| 40 | 0.4 | 1.5 |
Step 8 of 11Practice · Work it out
In the two-tank example, y(t) = 2t·e^(−0.1t). What is the maximum amount of salt in tank 2, in kg? Round to two decimals.
Step 9 of 11Note
Step 10 of 11Practice · Fill in the blanks
Fill in the blanks
To write y″ + 5y′ + 6y = 0 as a system with x₁ = y and x₂ = y′, the second equation is x₂′ = −6x₁ − x₂.
Step 11 of 11Practice · Select all that apply
For the system x′ = Ax with A = [[1, 1], [4, 1]] (eigenvalues 3 and −1), which statements are true?
Select all that apply.
Lesson complete!