LeoMath

Introduction to differential equations

Second-order linear equations

Why the characteristic equation works: it is an eigenvalue problem.

about 8 min

Start from a problem

Problem

A damped oscillator behaves in three sharply different ways: it oscillates forever, it oscillates and decays, or it slides back without oscillating. What decides whether it oscillates?

We need a method that turns a second-order differential equation into an algebra problem, and explains why the answer splits into exactly three cases.

Observe

Choose "Damped oscillator": x′′+2γx′+ω2x=0x''+2\gamma x'+\omega^2x=0. With γ=0\gamma=0 the solution is an undying sine wave; for small γ>0\gamma>0 the oscillation decays; once γ\gamma exceeds ω\omega it stops oscillating and simply slides back to zero. In the phase portrait these are an ellipse, an inward spiral, and a curve heading straight for the origin.

Interactive experimentNumerical ODE explorer
Equation
x′′+2γx′+ω2x=0x'' + 2\gamma x' + \omega^2 x = 0
Time series
Phase portrait
Method exactEuler error at end: 3.1775RK4 error at end: 4.10e-4
Conjecture

The shape of the solution (oscillating or not) depends on how γ\gamma compares with ω\omega, like the sign of a discriminant of some quadratic. And solutions are always exponentials or exponentials times trigonometric functions, all relatives of erte^{rt}. Perhaps substituting y=erty=e^{rt} turns the differential equation into an algebraic one.

Definition

Definition 3.1Second-order linear homogeneous equation with constant coefficients

y′′+py′+qy=0,p,q∈R.y''+py'+qy=0,\qquad p,q\in\mathbb R.

Derivation: the characteristic equation

Substitute y=erty=e^{rt}: y′=rerty'=re^{rt}, y′′=r2erty''=r^2e^{rt}, so (r2+pr+q)ert=0  ⟺  r2+pr+q=0.(r^2+pr+q)e^{rt}=0\iff r^2+pr+q=0.

Definition 3.2Characteristic equation

r2+pr+q=0r^2+pr+q=0 is the characteristic equation of the ODE.

Why "characteristic"? Let v=(yy′)v=\begin{pmatrix}y\\y'\end{pmatrix}. Then v′=(y′y′′)=(01−q−p)v=:Avv'=\begin{pmatrix}y'\\y''\end{pmatrix}=\begin{pmatrix}0&1\\-q&-p\end{pmatrix}v=:Av. The characteristic polynomial of AA is det⁡(A−λI)=λ2+pλ+q.\det(A-\lambda I)=\lambda^2+p\lambda+q. The characteristic equation of the ODE is literally the characteristic equation of AA. And the eigenvector v=(1,λ)v=(1,\lambda) of Av=λvAv=\lambda v corresponds exactly to the solution y=eλty=e^{\lambda t} (for which y′=λyy'=\lambda y). Solving a second-order linear ODE is finding the eigenvalues of a 2×22\times2 matrix.

Theorems and proofs

Theorem 3.1The solution space is a 2-dimensional vector space

The solutions of y′′+py′+qy=0y''+py'+qy=0 form a two-dimensional real vector space.

Proof

Linearity: if y1,y2y_1,y_2 are solutions, (ay1+by2)′′+p(ay1+by2)′+q(ay1+by2)=a(⋯ )+b(⋯ )=0(ay_1+by_2)''+p(ay_1+by_2)'+q(ay_1+by_2)=a(\cdots)+b(\cdots)=0, so the solution set is a subspace of the space of functions.

Dimension: by existence and uniqueness (for the system v′=Avv'=Av), the map y↦(y(0),y′(0))∈R2y\mapsto(y(0),y'(0))\in\mathbb R^2 is a linear bijection from the solution space onto R2\mathbb R^2: injective because equal initial data give equal solutions, surjective because every initial datum has a solution. So the solution space is isomorphic to R2\mathbb R^2.

Hence it suffices to find two independent solutions y1,y2y_1,y_2; the general solution is C1y1+C2y2C_1y_1+C_2y_2.

Theorem 3.2General solution in three cases

Let the characteristic roots be r1,r2r_1,r_2 and Δ=p2−4q\Delta=p^2-4q.

  1. Δ>0\Delta>0, distinct real r1≠r2r_1\ne r_2: y=C1er1t+C2er2ty=C_1e^{r_1t}+C_2e^{r_2t}.
  2. Δ=0\Delta=0, r1=r2=rr_1=r_2=r: y=(C1+C2t)erty=(C_1+C_2t)e^{rt}.
  3. Δ<0\Delta<0, r=α±iβr=\alpha\pm i\beta: y=eαt(C1cos⁡βt+C2sin⁡βt)y=e^{\alpha t}(C_1\cos\beta t+C_2\sin\beta t).
Proof

Case 1. er1t,er2te^{r_1t},e^{r_2t} are solutions. Independence: if aer1t+ber2t≡0ae^{r_1t}+be^{r_2t}\equiv0, divide by er1te^{r_1t} to get a+be(r2−r1)t≡0a+be^{(r_2-r_1)t}\equiv0; differentiating gives b(r2−r1)e(r2−r1)t≡0b(r_2-r_1)e^{(r_2-r_1)t}\equiv0, so b=0b=0 and then a=0a=0.

Case 2. r=−p/2r=-p/2 and q=r2q=r^2. Check tertte^{rt}: (tert)′=(1+rt)ert(te^{rt})'=(1+rt)e^{rt}, (tert)′′=(2r+r2t)ert(te^{rt})''=(2r+r^2t)e^{rt}; substituting, ert[(2r+p)+(r2+pr+q)t]=0e^{rt}\bigl[(2r+p)+(r^2+pr+q)t\bigr]=0 since 2r+p=02r+p=0 and rr is a root. erte^{rt} and tertte^{rt} are clearly independent. This is the case where AA has only one eigen-direction (like a shear): the missing second solution is supplied by the factor tt.

Case 3. e(α+iβ)t=eαt(cos⁡βt+isin⁡βt)e^{(\alpha+i\beta)t}=e^{\alpha t}(\cos\beta t+i\sin\beta t) (Euler's formula, see Taylor expansion) is a complex solution. The coefficients are real, so its real and imaginary parts are real solutions: eαtcos⁡βte^{\alpha t}\cos\beta t and eαtsin⁡βte^{\alpha t}\sin\beta t. They are independent since cos⁡βt,sin⁡βt\cos\beta t,\sin\beta t are (β≠0\beta\ne0).

For the damped oscillator p=2γp=2\gamma, q=ω2q=\omega^2, Δ=4(γ2−ω2)\Delta=4(\gamma^2-\omega^2): γ<ω\gamma<\omega underdamped (decaying oscillation), γ=ω\gamma=\omega critical, γ>ω\gamma>\omega overdamped. Exactly the three behaviours in the experiment.

Example 3.1

y′′+4y=0y''+4y=0: r2+4=0r^2+4=0, r=±2ir=\pm2i, y=C1cos⁡2t+C2sin⁡2ty=C_1\cos2t+C_2\sin2t.

y′′−3y′+2y=0y''-3y'+2y=0: r2−3r+2=(r−1)(r−2)r^2-3r+2=(r-1)(r-2), y=C1et+C2e2ty=C_1e^t+C_2e^{2t}.

Common mistake

For a double root rr the second solution is tertte^{rt}, not another erte^{rt}: two proportional solutions span only one dimension and cannot fill a two-dimensional solution space. For complex roots the general solution is eαt(C1cos⁡βt+C2sin⁡βt)e^{\alpha t}(C_1\cos\beta t+C_2\sin\beta t) with β\beta the imaginary part, not some combination like α2+β2\alpha^2+\beta^2.

Applications

ApplicationInhomogeneous equations

The general solution of y′′+py′+qy=g(t)y''+py'+qy=g(t) is the homogeneous general solution plus one particular solution; the proof is identical to the first-order case. For forced vibration x′′+ω2x=Fcos⁡Ωtx''+\omega^2x=F\cos\Omega t the particular solution's amplitude blows up as Ω→ω\Omega\to\omega: resonance.

ApplicationWhy linear algebra reaches so far

An nn-th order constant-coefficient linear ODE   ⟺  \iff an eigenvalue problem for an n×nn\times n matrix; the solution space is an nn-dimensional vector space; inhomogeneous solutions form its translate. Vibration modes in mechanics and RLC responses in circuits are diagonalisation in disguise.

Remark

Textbooks usually give the name "characteristic equation" first and then ask you to memorise three cases. Here the order is reversed: first see the three behaviours, then guess erte^{rt}, then discover that the "characteristic equation" really is the characteristic equation of a matrix. The name is no coincidence; it is one mathematical object seen from two fields.

Exercises

01
What is the larger root of the characteristic equation of y′′−3y′+2y=0y''-3y'+2y=0?
02
The general solution of y′′+4y=0y''+4y=0 is