Differential Equations · Undergraduate

Second-Order Linear Equations with Constant Coefficients

Quick answer

The equation ay″ + by′ + cy = 0 is solved by guessing y = e^(rx), which turns it into the characteristic equation ar² + br + c = 0. Two distinct real roots give y = c₁e^(r₁x) + c₂e^(r₂x). A repeated root r gives y = (c₁ + c₂x)e^(rx). Complex roots α ± βi give y = e^(αx)(c₁cos βx + c₂sin βx), an oscillation. Two initial conditions, y(0) and y′(0), fix the two constants.

What you'll learn

  • Form the characteristic equation of a constant-coefficient equation
  • Write the general solution in each of the three root cases
  • Solve initial value problems with y(0) and y′(0)
  • Explain why linear combinations of solutions are solutions

Guess an exponential

A second-order linear equation with constant coefficients is

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

Derivatives of erxe^{rx} are multiples of erxe^{rx}, so try y=erxy = e^{rx}. Then y′=rerxy' = re^{rx} and y′′=r2erxy'' = r^2e^{rx}, and the equation becomes erx(ar2+br+c)=0e^{rx}(ar^2 + br + c) = 0. Since erxe^{rx} is never zero,

ar2+br+c=0ar^2 + br + c = 0

This is the characteristic equation. Its roots decide everything.

RootsGeneral solution
real, r1≠r2r_1 \ne r_2y=c1er1x+c2er2xy = c_1e^{r_1x} + c_2e^{r_2x}
repeated, rry=(c1+c2x)erxy = (c_1 + c_2x)e^{rx}
complex, α±βi\alpha \pm \beta iy=eαx(c1cos⁡βx+c2sin⁡βx)y = e^{\alpha x}(c_1\cos\beta x + c_2\sin\beta x)

Why two solutions combine

The equation is linear and homogeneous: if y1y_1 and y2y_2 solve it, so does c1y1+c2y2c_1y_1 + c_2y_2, because derivatives respect sums and constant multiples and the right side is 00. So the solutions form a two-dimensional space, like the span of two vectors in linear algebra, and two independent solutions are enough to describe all of them.

That is why a repeated root needs extra work: erxe^{rx} alone gives only one direction. Checking shows xerxxe^{rx} is a second solution. And complex roots give complex exponentials e(α±βi)xe^{(\alpha \pm \beta i)x}, whose combinations, by Euler’s formula, are the real functions eαxcos⁡βxe^{\alpha x}\cos\beta x and eαxsin⁡βxe^{\alpha x}\sin\beta x, the same rotation-and-scaling story as complex eigenvalues.

Worked examples

A decaying oscillation The solution y = e^(−x)(cos 2x + sin 2x), starting at y = 1 and swinging above and below the x-axis with shrinking amplitude, inside the dashed envelope curves y = ±√2·e^(−x). 123456−11xy
  • y = e^(−x)(cos 2x + sin 2x)
  • envelope ±√2 e^(−x)
A decaying oscillation

Common mistakes

Practice problems

  1. Find the general solution of y′′−y=0y'' - y = 0.

    Answer

    y=c1ex+c2e−xy = c_1e^x + c_2e^{-x}

    Full solution

    r2−1=0r^2 - 1 = 0 gives r=±1r = \pm 1.

  2. Find the general solution of y′′+y′−6y=0y'' + y' - 6y = 0.

    Answer

    y=c1e2x+c2e−3xy = c_1e^{2x} + c_2e^{-3x}

    Full solution

    r2+r−6=(r−2)(r+3)r^2 + r - 6 = (r - 2)(r + 3).

  3. Find the general solution of y′′−6y′+9y=0y'' - 6y' + 9y = 0.

    Answer

    y=(c1+c2x)e3xy = (c_1 + c_2x)e^{3x}

    Full solution

    (r−3)2=0(r - 3)^2 = 0 gives a repeated root 33.

  4. Solve y′′+4y=0y'' + 4y = 0 with y(0)=2y(0) = 2, y′(0)=6y'(0) = 6.

    Answer

    y=2cos⁡2x+3sin⁡2xy = 2\cos 2x + 3\sin 2x

    Full solution

    r=±2ir = \pm 2i, so y=c1cos⁡2x+c2sin⁡2xy = c_1\cos 2x + c_2\sin 2x. c1=2c_1 = 2, and y′(0)=2c2=6y'(0) = 2c_2 = 6.

  5. Find the general solution of y′′−4y′+13y=0y'' - 4y' + 13y = 0.

    Answer

    y=e2x(c1cos⁡3x+c2sin⁡3x)y = e^{2x}(c_1\cos 3x + c_2\sin 3x)

    Full solution

    r=4±16−522=2±3ir = \tfrac{4 \pm \sqrt{16 - 52}}{2} = 2 \pm 3i.

  6. Solve y′′+2y′+y=0y'' + 2y' + y = 0 with y(0)=3y(0) = 3, y′(0)=−1y'(0) = -1.

    Answer

    y=(3+2x)e−xy = (3 + 2x)e^{-x}

    Full solution

    Repeated root −1-1: y=(c1+c2x)e−xy = (c_1 + c_2x)e^{-x}. c1=3c_1 = 3, and y′(0)=c2−c1=−1y'(0) = c_2 - c_1 = -1 gives c2=2c_2 = 2.

  7. For which values of cc does y′′+4y′+cy=0y'' + 4y' + cy = 0 have oscillating solutions?

    Answer

    c>4c > 4

    Full solution

    The roots are complex when 16−4c<016 - 4c < 0.

  8. A student writes y=c1e−2x+c2e−2xy = c_1e^{-2x} + c_2e^{-2x} for y′′+4y′+4y=0y'' + 4y' + 4y = 0 and cannot match y(0)=1y(0) = 1, y′(0)=0y'(0) = 0. Why?

    Answer

    Both terms are the same function; the second solution must be xe−2xxe^{-2x}.

    Full solution

    With only Ce−2xCe^{-2x}, y(0)=C=1y(0) = C = 1 forces y′(0)=−2y'(0) = -2, not 00. Using (c1+c2x)e−2x(c_1 + c_2x)e^{-2x} gives the extra freedom.

Frequently asked questions

What is the characteristic equation?

For ay″ + by′ + cy = 0, it is ar² + br + c = 0. It comes from substituting y = e^(rx), since each derivative brings down a factor of r.

What is the solution when the roots are real and different?

y = c₁e^(r₁x) + c₂e^(r₂x).

What is the solution for a repeated root?

y = (c₁ + c₂x)e^(rx). The extra factor x supplies the second independent solution.

What is the solution for complex roots α ± βi?

y = e^(αx)(c₁cos βx + c₂sin βx): an oscillation with frequency β whose size grows or decays like e^(αx).

Why are two initial conditions needed?

A second-order equation has a two-constant family of solutions, so it takes two facts, usually y(0) and y′(0), to single one out.

What to learn next