MathLabs

Differential equations and dynamical systems

Linear differential equations

Higher-order equations with a superposition principle, solved via characteristic equations.

IntuitionIntuition: oscillation and the superposition principle

A mass on a spring, a swinging pendulum with small amplitude, and the current in an RLC circuit all obey the same shape of law: an unknown function together with its derivatives combine linearly. If you know two separate motions that each satisfy the law, their sum (or any weighted combination) also satisfies it — this is the superposition principle. It is the reason we can build every possible motion out of just two building-block solutions.

Parabola for the characteristic polynomial r^2-3r+2, crossing the r-axis at r=1 and r=2.
Damped harmonic oscillator y′′+2ζy′+y=0y'' + 2\zeta y' + y = 0: the solution oscillates inside the decaying exponential envelope ±e−ζt\pm e^{-\zeta t}.

SchoolPrecise statement: second-order linear equations with constant coefficients

Definition: Homogeneous linear differential equation

A second-order equation of the form ay′′+by′+cy=0ay'' + by' + cy = 0, where a,b,ca,b,c are constants and a≠0a\neq 0, is called homogeneous linear because the right-hand side is zero and yy appears only to the first power in every term.

ay′′+by′+cy=0ay'' + by' + cy = 0

Because differentiating erxe^{rx} just multiplies it by rr, we try the ansatz y=erxy=e^{rx}. Substituting into the equation and dividing by the common factor erx≠0e^{rx}\neq 0 turns the differential equation into a plain quadratic equation in rr:

ar2+br+c=0ar^2+br+c=0
The three cases of the characteristic equation ar2+br+c=0ar^2+br+c=0 and the resulting general solution
DiscriminantRootsGeneral solution
Δ>0\Delta>0Two distinct real roots r1≠r2r_1\neq r_2y=c1er1x+c2er2xy = c_1 e^{r_1 x} + c_2 e^{r_2 x}
Δ=0\Delta=0One repeated real root rry=(c1+c2x)erxy = (c_1 + c_2 x) e^{r x}
Δ<0\Delta<0Complex conjugate roots r=α±iβr = \alpha \pm i\betay=eαx(c1cos⁡(βx)+c2sin⁡(βx))y = e^{\alpha x}\left(c_1 \cos(\beta x) + c_2 \sin(\beta x)\right)

UndergraduateUniversity level: theorems and proofs

If y1y_1 and y2y_2 both satisfy ay′′+by′+cy=0ay'' + by' + cy = 0, then for any constants c1,c2c_1,c_2 the combination y=c1y1+c2y2y=c_1y_1+c_2y_2 also satisfies the equation. If moreover the Wronskian W(y1,y2)=y1y2′−y2y1′W(y_1,y_2) = y_1y_2' - y_2y_1' is nonzero at some point, every solution of the equation has this form.

Why is it true?

Differentiation is a linear operation: the derivative of a sum is the sum of derivatives, and constants factor out. Since the left side of the equation is built only from yy, y′y', y′′y'' multiplied by constants and added together, plugging in a combination of two solutions just adds up two copies of zero.

Proof

Suppose L[y]=ay′′+by′+cyL[y] = ay''+by'+cy. Since differentiation satisfies (u+v)′=u′+v′(u+v)'=u'+v' and (ku)′=ku′(ku)'=ku' for a constant kk, the operator LL is linear: L[c1y1+c2y2]=a(c1y1+c2y2)′′+b(c1y1+c2y2)′+c(c1y1+c2y2)=c1(ay1′′+by1′+cy1)+c2(ay2′′+by2′+cy2)=c1L[y1]+c2L[y2]L[c_1y_1+c_2y_2] = a(c_1y_1+c_2y_2)'' + b(c_1y_1+c_2y_2)' + c(c_1y_1+c_2y_2) = c_1(ay_1''+by_1'+cy_1) + c_2(ay_2''+by_2'+cy_2) = c_1L[y_1]+c_2L[y_2].

Because y1,y2y_1,y_2 solve the equation, L[y1]=0L[y_1]=0 and L[y2]=0L[y_2]=0, so L[c1y1+c2y2]=c1⋅0+c2⋅0=0L[c_1y_1+c_2y_2]=c_1\cdot 0+c_2\cdot 0=0: the combination is again a solution. This proves the first half.

For the second half, the theory of linear ODEs guarantees that the solution space of a second-order equation is exactly two-dimensional (an initial condition y(x0)=y0y(x_0)=y_0, y′(x0)=y0′y'(x_0)=y_0' picks out a unique solution, giving two free parameters). A nonzero Wronskian W(y1,y2)=y1y2′−y2y1′W(y_1,y_2)=y_1y_2'-y_2y_1' at some point x0x_0 means the linear system c1y1(x0)+c2y2(x0)=y0c_1y_1(x_0)+c_2y_2(x_0)=y_0, c1y1′(x0)+c2y2′(x0)=y0′c_1y_1'(x_0)+c_2y_2'(x_0)=y_0' has a unique solution (c1,c2)(c_1,c_2) for every choice of initial data. So every solution matches some c1y1+c2y2c_1y_1+c_2y_2 for suitable constants, which means {y1,y2}\{y_1,y_2\} spans the whole two-dimensional solution space.

The general solution of ay′′+by′+cy=0ay'' + by' + cy = 0 is determined entirely by the roots of the characteristic equation ar2+br+c=0ar^2+br+c=0: distinct real roots give y=c1er1x+c2er2xy = c_1 e^{r_1 x} + c_2 e^{r_2 x}, a repeated real root gives y=(c1+c2x)erxy = (c_1 + c_2 x) e^{r x}, and complex conjugate roots r=α±iβr = \alpha \pm i\beta give y=eαx(c1cos⁡(βx)+c2sin⁡(βx))y = e^{\alpha x}\left(c_1 \cos(\beta x) + c_2 \sin(\beta x)\right).

Why is it true?

Exponentials are the natural building blocks because differentiating erxe^{rx} just rescales it by rr; feeding this ansatz into a linear equation with constant coefficients collapses calculus into algebra — finding roots of a polynomial.

Proof

Try the ansatz y=erxy=e^{rx}. Then y′=rerxy'=re^{rx} and y′′=r2erxy''=r^2e^{rx}; substituting into ay′′+by′+cy=0ay'' + by' + cy = 0 gives (ar2+br+c)erx=0(ar^2+br+c)e^{rx}=0. Since erxe^{rx} is never zero, this forces the characteristic equation ar2+br+c=0ar^2+br+c=0. By the quadratic formula, r=−b±b2−4ac2ar = \dfrac{-b \pm \sqrt{b^2-4ac}}{2a}.

Case Δ>0\Delta>0: the two roots r1≠r2r_1\neq r_2 give solutions er1xe^{r_1x} and er2xe^{r_2x}. Their Wronskian is (r2−r1)e(r1+r2)x≠0(r_2-r_1)e^{(r_1+r_2)x}\neq 0, so by the superposition theorem the general solution is y=c1er1x+c2er2xy = c_1 e^{r_1 x} + c_2 e^{r_2 x}.

Case Δ=0\Delta=0: there is one repeated root r=−b/(2a)r=-b/(2a), giving only one exponential solution erxe^{rx}. To find a second independent solution, try y2=v(x)erxy_2=v(x)e^{rx} (reduction of order) and substitute into the equation; because rr is a double root of ar2+br+car^2+br+c, the terms in vv and v′v' cancel, leaving av′′erx=0av''e^{rx}=0, i.e. v′′=0v''=0, so v=c1+c2xv=c_1+c_2x. This yields the second solution xerxxe^{rx}, and the general solution y=(c1+c2x)erxy = (c_1 + c_2 x) e^{r x}.

Case Δ<0\Delta<0: the roots are complex conjugates r=α±iβr = \alpha \pm i\beta with α=−b/(2a)\alpha=-b/(2a), β=−Δ/(2a)\beta=\sqrt{-\Delta}/(2a). Euler's formula eiβx=cos⁡(βx)+isin⁡(βx)e^{i\beta x}=\cos(\beta x)+i\sin(\beta x) turns the complex solutions e(α±iβ)xe^{(\alpha\pm i\beta)x} into two independent real solutions eαxcos⁡(βx)e^{\alpha x}\cos(\beta x) and eαxsin⁡(βx)e^{\alpha x}\sin(\beta x) (by taking the real and imaginary parts, which are themselves solutions since LL has real coefficients), giving the general solution y=eαx(c1cos⁡(βx)+c2sin⁡(βx))y = e^{\alpha x}\left(c_1 \cos(\beta x) + c_2 \sin(\beta x)\right).

UndergraduateReal-World Applications and Worked Examples

The three cases of the characteristic equation are not just algebra — they describe three physically distinct behaviours of a damped spring-mass system my′′+cy′+ky=0my'' + cy' + ky = 0 (mass mm, damping cc, stiffness kk): underdamped oscillation that dies out while wiggling (Δ<0\Delta<0), overdamped return with no wiggle at all (Δ>0\Delta>0), and critically damped return, the fastest possible non-oscillating return (Δ=0\Delta=0) — exactly the design goal of a car's shock absorber or a door closer.

Example: Finding a general solution: distinct real roots

Solve y′′−5y′+6y=0y'' - 5y' + 6y = 0.

Solution

The characteristic equation is r2−5r+6=0r^2-5r+6=0.

Factoring, (r−2)(r−3)=0(r-2)(r-3)=0, so the roots are r1=2r_1=2 and r2=3r_2=3: two distinct real roots.

By the theorem above (case Δ>0\Delta>0), the general solution is y=c1e2x+c2e3xy = c_1e^{2x}+c_2e^{3x}, where c1,c2c_1,c_2 are arbitrary constants fixed by initial conditions.

Example: Undetermined coefficients for a forced equation

Find a particular solution of y′′−y=e2xy'' - y = e^{2x}.

Solution

The homogeneous equation y′′−y=0y''-y=0 has characteristic equation r2−1=0r^2-1=0, with roots r=±1r=\pm 1; the forcing term e2xe^{2x} has exponent 22, which is not one of these roots, so there is no resonance.

Try the ansatz yp=Ae2xy_p = Ae^{2x}. Then yp′′=4Ae2xy_p''=4Ae^{2x}, and substituting gives 4Ae2x−Ae2x=3Ae2x4Ae^{2x}-Ae^{2x}=3Ae^{2x}, which must equal e2xe^{2x}.

Matching coefficients, 3A=13A=1, so A=13A=\tfrac{1}{3}, giving the particular solution yp=13e2xy_p=\tfrac{1}{3}e^{2x}. The full general solution is y=c1ex+c2e−x+13e2xy=c_1e^{x}+c_2e^{-x}+\tfrac{1}{3}e^{2x}.

What is the general solution of y′′−7y′+12y=0y''-7y'+12y=0?

For y′′+2y′+5y=0y''+2y'+5y=0, what kind of roots does the characteristic equation have, and what is the general solution?

A car's shock absorber, modeled by my′′+cy′+ky=0my'' + cy' + ky = 0, is designed to return the car body to rest as fast as possible without any bouncing. Which case of the characteristic equation should the engineer aim for?

To find a particular solution of y′′−y=e2xy''-y=e^{2x} by undetermined coefficients, which trial form should you use?

References

  1. William E. Boyce, Richard C. DiPrima (2017). Elementary Differential Equations and Boundary Value Problems
  2. Lawrence Perko (2001). Differential Equations and Dynamical Systems