TExcelTAD
Home › Differential Equations › The Eigenvalue Method

The Eigenvalue Method

For a constant-coefficient system x′=Ax\mathbf{x}' = A\mathbf{x} we can guess solutions just as for single equations, except that the exponential now carries a direction:

x(t)=eλtv.\mathbf{x}(t) = e^{\lambda t}\mathbf{v}.

Substituting gives λeλtv=Aeλtv\lambda e^{\lambda t}\mathbf{v} = Ae^{\lambda t}\mathbf{v}, i.e. Av=λvA\mathbf{v} = \lambda\mathbf{v}. So the guess works exactly when λ\lambda is an eigenvalue of AA and v\mathbf{v} a corresponding eigenvector (Eigenvalues and Eigenvectors).

The method

  1. Find the eigenvalues: roots of det⁡(A−λI)=0\det(A - \lambda I) = 0.
  2. For each eigenvalue, find an eigenvector: a nonzero solution of (A−λI)v=0(A - \lambda I)\mathbf{v} = \mathbf{0}.
  3. If AA has nn linearly independent eigenvectors (always true when the eigenvalues are distinct), the general solution is
x=c1eλ1tv1+c2eλ2tv2+⋯+cneλntvn.\mathbf{x} = c_1e^{\lambda_1 t}\mathbf{v}_1 + c_2e^{\lambda_2 t}\mathbf{v}_2 + \dots + c_ne^{\lambda_n t}\mathbf{v}_n.

Example

x′=[1141]x\mathbf{x}' = \begin{bmatrix} 1 & 1 \\ 4 & 1 \end{bmatrix}\mathbf{x}. The characteristic polynomial is (1−λ)2−4=0(1 - \lambda)^2 - 4 = 0, so λ=3\lambda = 3 or λ=−1\lambda = -1.

  • λ=3\lambda = 3: [−214−2]v=0\begin{bmatrix} -2 & 1 \\ 4 & -2 \end{bmatrix}\mathbf{v} = \mathbf{0} gives v1=(1,2)\mathbf{v}_1 = (1, 2).
  • λ=−1\lambda = -1: [2142]v=0\begin{bmatrix} 2 & 1 \\ 4 & 2 \end{bmatrix}\mathbf{v} = \mathbf{0} gives v2=(1,−2)\mathbf{v}_2 = (1, -2).
x=c1e3t[12]+c2e−t[1−2].\mathbf{x} = c_1e^{3t}\begin{bmatrix} 1 \\ 2 \end{bmatrix} + c_2e^{-t}\begin{bmatrix} 1 \\ -2 \end{bmatrix}.
python · try it yourself
import sympy as sp

A = sp.Matrix([[1, 1], [4, 1]])
for lam, mult, vecs in A.eigenvects():
    print(f"lambda = {lam} (multiplicity {mult}), eigenvector {list(vecs[0])}")
lambda = -1 (multiplicity 1), eigenvector [-1/2, 1]
lambda = 3 (multiplicity 1), eigenvector [1/2, 1]

SymPy may scale eigenvectors differently; any nonzero multiple is fine.

Numerically: diagonalization

If A=VΛV−1A = V\Lambda V^{-1} with eigenvectors as the columns of VV, then in the coordinates y=V−1x\mathbf{y} = V^{-1}\mathbf{x} the system decouples: yi′=λiyiy_i' = \lambda_iy_i. That gives a compact formula and an algorithm:

x(t)=V eΛt V−1x(0).\mathbf{x}(t) = V\,e^{\Lambda t}\,V^{-1}\mathbf{x}(0).
python · try it yourself
import numpy as np
from scipy.integrate import solve_ivp

A = np.array([[1.0, 1.0], [4.0, 1.0]])
x0 = np.array([3.0, 2.0])
lam, V = np.linalg.eig(A)
x_eig = lambda t: V @ (np.exp(lam * t) * np.linalg.solve(V, x0))
sol = solve_ivp(lambda t, x: A @ x, (0, 1), x0, rtol=1e-11, atol=1e-12)
print("eigenvalues:", lam)
print("eigen formula x(1):", np.round(x_eig(1.0), 6))
print("solve_ivp      x(1):", np.round(sol.y[:, -1], 6))
eigenvalues: [ 3. -1.]
eigen formula x(1): [40.538953 79.606389]
solve_ivp      x(1): [40.538953 79.606389]

A three-dimensional example: cascading tanks

Three tanks drain into each other: x1′=−2x1x_1' = -2x_1, x2′=2x1−x2x_2' = 2x_1 - x_2, x3′=x2−0.5x3x_3' = x_2 - 0.5x_3. The matrix is lower triangular, so its eigenvalues are the diagonal entries −2,−1,−0.5-2, -1, -0.5, all negative: everything eventually drains away, and the slowest mode (e−0.5te^{-0.5t}) dominates the long run.

python · try it yourself
import numpy as np

A = np.array([[-2.0, 0, 0], [2.0, -1.0, 0], [0, 1.0, -0.5]])
lam, V = np.linalg.eig(A)
x0 = np.array([10.0, 0, 0])
c = np.linalg.solve(V, x0)
for t in (1.0, 3.0, 10.0):
    print(f"t = {t:4}: x =", np.round(V @ (c * np.exp(lam * t)), 4))
t =  1.0: x = [1.3534 4.6509 3.2634]
t =  3.0: x = [0.0248 0.9462 3.9917]
t = 10.0: x = [0.     0.0009 0.1779]

In software

  • Modal analysis in mechanical engineering and the normal modes of molecules are eigenvalue problems of this kind (Coupled Oscillators and Normal Modes).
  • Continuous-time Markov chains (queueing models, reliability of server clusters) evolve by p′=QTp\mathbf{p}' = Q^T\mathbf{p}; the eigenvalue 0 gives the steady state and the next eigenvalue the mixing rate.

Exercises

Exercise 1: Eigenvalues and solution

Solve x′=[200−3]x\mathbf{x}' = \begin{bmatrix} 2 & 0 \\ 0 & -3 \end{bmatrix}\mathbf{x}.

Answer

x=c1e2t(1,0)+c2e−3t(0,1)\mathbf{x} = c_1e^{2t}(1, 0) + c_2e^{-3t}(0, 1).

Solution

A diagonal matrix has the standard basis vectors as eigenvectors; the system is already decoupled.

Exercise 2: A full example

Solve x′=[4−211]x\mathbf{x}' = \begin{bmatrix} 4 & -2 \\ 1 & 1 \end{bmatrix}\mathbf{x}.

Answer

x=c1e2t(1,1)+c2e3t(2,1)\mathbf{x} = c_1e^{2t}(1, 1) + c_2e^{3t}(2, 1).

Solution

det⁡(A−λI)=(4−λ)(1−λ)+2=λ2−5λ+6=(λ−2)(λ−3)\det(A - \lambda I) = (4 - \lambda)(1 - \lambda) + 2 = \lambda^2 - 5\lambda + 6 = (\lambda - 2)(\lambda - 3). For λ=2\lambda = 2: 2v1−2v2=02v_1 - 2v_2 = 0, v=(1,1)\mathbf{v} = (1, 1). For λ=3\lambda = 3: v1−2v2=0v_1 - 2v_2 = 0, v=(2,1)\mathbf{v} = (2, 1).

Exercise 3: Match an initial condition (code)

For the system of Exercise 2, find c1c_1, c2c_2 for x(0)=(1,0)\mathbf{x}(0) = (1, 0).

Answer

c1=−1c_1 = -1, c2=1c_2 = 1.

Solution

c1(1,1)+c2(2,1)=(1,0)c_1(1, 1) + c_2(2, 1) = (1, 0).

python · try it yourself
import numpy as np
print(np.linalg.solve([[1.0, 2.0], [1.0, 1.0]], [1.0, 0.0]))
[-1.  1.]

Test yourself

eλtve^{\lambda t}\mathbf{v} solves x′=Ax\mathbf{x}' = A\mathbf{x} exactly when…

  1. Av=λvA\mathbf{v} = \lambda\mathbf{v}
  2. det⁡A=λ\det A = \lambda
  3. v=0\mathbf{v} = \mathbf{0}
  4. A=λIA = \lambda I

If all eigenvalues of AA are real and negative (and AA is diagonalizable), all solutions…

  1. grow
  2. tend to 0\mathbf{0}
  3. oscillate
  4. are constant

In eigenvector coordinates y=V−1x\mathbf{y} = V^{-1}\mathbf{x}, the system x′=Ax\mathbf{x}' = A\mathbf{x} becomes…

  1. yi′=λiyiy_i' = \lambda_iy_i (decoupled)
  2. y′=Ay\mathbf{y}' = A\mathbf{y}
  3. nonlinear
  4. y′=0\mathbf{y}' = \mathbf{0}