MathsDifferential equations › Second order equations

Second order equations

Guess e to the mx and a differential equation collapses to a quadratic. Its two roots, real, repeated or complex, dictate everything the solution can do; a right-hand side then adds one particular piece on top.

Builds on First order equations and integrating factors and Complex arithmetic and the Argand diagram.

IN THIS TOPIC

  • Reduce ay'' + by' + cy = 0 to its auxiliary quadratic and classify the roots.
  • Write the general solution in each of the three root cases.
  • Solve ay'' + by' + cy = f(x) as complementary function plus particular integral.
  • Use two initial conditions to pin both constants, applied to the full solution.

COMMON MISCONCEPTION

A differential equation with a second derivative in it is a whole order of magnitude harder than a quadratic.

The auxiliary quadratic

Try y = emx in ay'' + by' + cy = 0. Every term carries emx, which cancels, leaving the auxiliary equation:

am2+bm+c=0am^{2} + bm + c = 0NOT IN THE BOOKLET — LEARN IT

The differential equation is exactly as hard as this quadratic and no harder. Distinct real roots m₁ and m₂ give y = Aem₁x + Bem₂x. A repeated root m gives y = (A + Bx)emx. Complex roots p ± qi give y = epx(A cos qx + B sin qx), an oscillation inside an exponential.

Three root cases, three behaviours: real decay, the repeated borderline, and complex-root oscillationtwo real rootsrepeated rootcomplex rootsy'' , y' and y in balance: the auxiliary roots decide
FIG. 1The three faces of ay'' + by' + cy = 0: two real decays, the repeated borderline with its extra factor of x, and a complex-root oscillation.

WORKED EXAMPLE

Distinct roots with initial conditions

Solve y'' − 5y' + 6y = 0 with y(0) = 0 and y'(0) = 1.

The auxiliary equation m² − 5m + 6 = (m − 2)(m − 3) = 0 has roots m = 2, 3.

That gives y = Ae2x + Be3x.

y(0) = 0 gives A + B = 0, and y'(0) = 1 gives 2A + 3B = 1, so B = 1 and A = −1.

y = e3x − e2x. Two conditions, two constants, both used.

When the roots turn complex

Complex roots do not signal a mistake; they signal oscillation. For y'' + 4y = 0 the auxiliary m² + 4 = 0 gives m = ±2i, so y = A cos 2x + B sin 2x, pure oscillation at angular frequency 2. That is the differential equation behind simple harmonic motion. The real part of the root controls growth or decay and the imaginary part sets the frequency.

y = cos 2x solves y'' + 4y = 0: acceleration equals minus four times displacement, so it swings for everπamplitude 1y = cos 2xperiod π: frequency 2 from m = ±2i
FIG. 2y = cos 2x solves y'' + 4y = 0: acceleration proportional to minus displacement, the signature of simple harmonic motion.

GUIDED PRACTICE

A repeated root

Solve y'' − 4y' + 4y = 0.

Show the working

The auxiliary equation m² − 4m + 4 = (m − 2)² = 0 has a repeated root m = 2.

The repeated case needs its extra x, so y = (A + Bx)e2x.

Without the Bx term the 'two' solutions would be one in a wig, and two initial conditions could not both be met.

Adding a right-hand side

Put something on the right and the equation becomes ay'' + by' + cy = f(x). Its general solution is the sum of two pieces. The complementary function is the general solution of the homogeneous equation, found exactly as above. The particular integral is any single function satisfying the full equation, and you find it by trying a form that matches f(x). Add the two together and you have every solution the equation admits.

Choosing the trial

The trial follows the shape of the forcing term. A constant needs a constant. A polynomial of degree n needs a full polynomial of degree n, with every term present even if the right-hand side is missing some. An exponential kepx needs λepx. Anything built from cos ωx or sin ωx needs λ cos ωx + μ sin ωx, both terms, whichever one appears on the right.

WORKED EXAMPLE

Complementary function plus particular integral

Solve y'' + y' − 2y = 4x.

From m² + m − 2 = (m + 2)(m − 1) = 0, the complementary function is y = Aex + Be−2x.

The right-hand side is linear, so try y = λx + μ, giving y' = λ and y'' = 0.

Substituting leaves λ − 2λx − 2μ = 4x. Comparing x terms gives λ = −2, and the constants then give −2 − 2μ = 0, so μ = −1.

The general solution is y = Aex + Be−2x − 2x − 1.

Apply boundary conditions to the complete solution, never to the complementary function alone. Doing it early is the single most expensive error on this topic, because every subsequent line then inherits the wrong constants.

When the trial clashes with the complementary function

Trying λepx fails outright if epx already sits in the complementary function, since substituting it gives zero on the left and nothing to equate. The fix is to multiply the trial by x. If the root is repeated, so that both epx and xepx appear in the complementary function, multiply by x² instead.

WORKED EXAMPLE

A clash, and the cure

Solve y'' − 3y' + 2y = ex.

From (m − 1)(m − 2) = 0, the complementary function is Aex + Be2x.

λex is already a solution of the homogeneous equation, so try y = λxex instead.

Then y' = λ(1 + x)ex and y'' = λ(2 + x)ex, and substituting collapses to −λex = ex, giving λ = −1.

The general solution is y = Aex + Be2x − xex.

Always write the complementary function before choosing a trial. Candidates who pick the trial first walk into this clash every time, and the wasted algebra costs more minutes than the check would have.

ASSESSMENT FOCUS

  • Write the auxiliary equation down as a labelled step. The method mark attaches to it.
  • The repeated-root case must carry (A + Bx). Forgetting the x is the classic error.
  • For complex roots p ± qi, epx comes from the real part and cos/sin from the imaginary part.
  • Include both cos and sin in a trigonometric trial, whatever the right-hand side looks like.
  • Substitute boundary conditions into the full general solution, complementary function plus particular integral.
  • Differentiate the general solution before substituting a y' condition, not after.

CHECK YOURSELF

Find the general solution of y'' + 4y' + 3y = 6.

Show a hint

Solve the homogeneous part, then try a constant particular integral.

Show the answer

Auxiliary m² + 4m + 3 = (m + 1)(m + 3) = 0, so the complementary function is Ae−x + Be−3x. A constant trial y = λ gives 3λ = 6, so λ = 2. The general solution is y = Ae−x + Be−3x + 2, and every solution settles to 2.

Substitute emx: the equation becomes am² + bm + c = 0, and the roots classify the motion.

Real roots decay or grow, repeated roots need (A + Bx), complex p ± qi oscillate at frequency q inside epx.

With a right-hand side, the answer is complementary function plus particular integral.

If the trial already solves the homogeneous equation, multiply it by x.

WORKBOOK

Printable practice for this topic: original exam-style questions with room to work, and a fully worked answer book. Free to use; please do not redistribute or sell.

7 questions on this topicAnswer them one at a time and mark yourself against the worked answer.Practise this topic

Or read them with their worked answers on the second order equations questions page.

CHECK YOUR PROGRESS

Rate how confident you feel with each objective for this lesson. Ratings are saved in this browser, on this device, unless you sign in.

  • Reduce ay'' + by' + cy = 0 to its auxiliary quadratic and classify the roots.
  • Write the general solution in each of the three root cases.
  • Solve ay'' + by' + cy = f(x) as complementary function plus particular integral.
  • Use two initial conditions to pin both constants, applied to the full solution.

Open the full revision checklist to see every objective in the course in one place.