Maths › Differential equations › Second order equations

Second order equations

For a constant-coefficient homogeneous equation, solve the auxiliary equation and choose the complementary-function form from its roots. For a non-homogeneous equation, add a particular integral of the same functional type as the forcing term. If the trial duplicates a complementary-function term, multiply the trial by a sufficient power of x.

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.
  • Multiply the trial function by x when it duplicates a term of the complementary function.
  • Use two initial conditions to pin both constants, applied to the full solution.
  • Carry the same three root cases across to a second order recurrence relation.

COMMON MISCONCEPTION

The auxiliary equation method applies to any second order differential equation.

It applies to linear equations with constant coefficients. Substituting y = emx into ay'' + by' + cy = 0 works because every term then carries the same factor emx, which cancels to leave am2 + bm + c = 0. With variable coefficients, or with a nonlinear term, no such cancellation occurs and there is no auxiliary quadratic to solve.

The auxiliary equation

For a homogeneous linear differential equation with constant coefficients, substituting y = emx gives the auxiliary polynomial. In ay'' + by' + cy = 0 every term carries a factor emx, which cancels, leaving the auxiliary equation:

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

The method requires the equation to be linear with constant coefficients; it does not apply to variable coefficients or to nonlinear equations. 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). A root with negative real part produces decay, a root with positive real part produces growth, and a non-real pair produces oscillation multiplied by the corresponding exponential envelope.

Three root cases, three behaviours: real decay, the repeated borderline, and complex-root oscillation
Describe the drawing

Three small panels. In the first, two exponential curves sink to the axis at different rates: distinct real roots. In the second, a curve rises briefly before its exponential hauls it down: the repeated root's extra factor of x. In the third, a wave wobbles above and below the axis while shrinking: complex roots, oscillation inside decay.

FIG. 1The three cases of ay'' + by' + cy = 0: two distinct real roots, a repeated root with its extra factor of x, and a non-real pair giving 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. Both conditions were used, one for each constant.

Non-real roots

A non-real pair of roots corresponds to oscillation. For y'' + 4y = 0 the auxiliary equation m² + 4 = 0 gives m = ±2i, so y = A cos 2x + B sin 2x, an oscillation of angular frequency 2 with no exponential envelope, since the real part is zero. This is the differential equation of simple harmonic motion. The real part of the root determines growth or decay and the imaginary part the frequency.

A cosine wave of amplitude one crossing the axis again and again, with the first period marked at pi. The auxiliary roots plus and minus two i put the frequency at two and keep the swing going undamped for ever.
FIG. 2y = cos 2x solves y'' + 4y = 0: acceleration proportional to minus displacement, the signature of simple harmonic motion.

The same three cases apply to a linear constant-coefficient recurrence relation. Substituting un = mn into un+2 + bun+1 + cun = 0 leaves an auxiliary quadratic of the same kind, and a complex pair of roots is handled by writing one of them in modulus-argument form as R(cos θ + i sin θ). The general solution is then un = Rn(A cos nθ + B sin nθ), with Rn in place of epx and the argument θ in place of the frequency q.

WORKED EXAMPLE

Complex roots of a recurrence

Solve un+2 = 2un+1 − 2un with u₀ = 1 and u₁ = 3.

The auxiliary equation m² − 2m + 2 = 0 has roots m = 1 ± i.

1 + i has modulus √2 and argument π/4, so un = (√2)n(A cos(nπ/4) + B sin(nπ/4)).

u₀ = 1 gives A = 1. At n = 1 the bracket is (A + B)/√2, and the √2 outside cancels it, so A + B = 3 and B = 2.

un = (√2)n(cos(nπ/4) + 2 sin(nπ/4)). The recurrence gives 1, 3, 4, 2, −4, −12, −16, −8, 16 and so does the formula.

Interpret the two parts. The modulus √2 exceeds 1, so the magnitude of the terms grows overall; the argument π/4 completes a full turn in eight steps, so un+8 = 16un.

Plotting the nine terms against n shows both features. The signs have period eight while the envelope is multiplied by √2 at each step, so the sequence lies within the envelope ±√5(√2)n without attaining either bound.

The first nine terms of u(n) = (√2) to the n times cos(nπ/4) + 2 sin(nπ/4), inside the envelope ±√5 (√2) to the n
Describe the drawing

Nine points plotted against n, each on a short stalk from the axis. The first four sit close above the axis at one, three, four and two; the next four swing below to minus four, minus twelve, minus sixteen and minus eight; and the ninth is back above at sixteen. Two dashed curves spreading outwards, plus and minus root five times root two to the n, hold every point between them. One turn of the argument takes eight steps, and the modulus has multiplied the whole sequence by sixteen by the time it is complete.

FIG. 3The first nine terms plotted against n, within the envelope ±√5(√2)ⁿ: eight steps of the argument, over which the modulus multiplies the term by 16.

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-root case requires the extra factor x, so y = (A + Bx)e2x.

Without the Bx term the two terms would both be multiples of e2x, so they would not be independent and two initial conditions could not both be satisfied.

Adding a right-hand side

With a forcing term on the right, 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 one function satisfying the full equation, found by trying a form matching f(x).

Three solutions, three root cases: distinct real roots, a repeated root, and complex roots, each curve checked against its own equation
Describe the drawing

Three curves leaving the vertical axis on shared axes: a cyan hump from distinct real roots, built of two plain exponentials; an amber hump from a repeated root, whose extra factor of x lifts it from zero before the exponential wins; and a coral wave from complex roots, oscillating as it dies. Each curve was substituted back into its own equation and satisfies it at every sampled point.

FIG. 4Three complementary functions on one pair of axes, one from each root case: y'' + 3y' + 2y = 0 with roots −1 and −2, y'' + 2y' + y = 0 with its repeated root carrying an extra factor of x, and y'' + 2y' + 5y = 0 with roots −1 ± 2i, giving oscillation inside a decaying envelope.

Choosing the trial function

Choose a particular integral of the same functional type as the forcing term. A constant forcing term needs a constant. A polynomial of degree n needs a complete polynomial of degree n, including terms absent from the right-hand side. An exponential kepx needs λepx. A term in cos ωx or sin ωx needs λ cos ωx + μ sin ωx, with both terms present.

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, complementary function plus particular integral, not to the complementary function alone: applying them earlier gives incorrect values for the constants.

When the trial duplicates a complementary-function term

Trying λepx fails if epx already appears in the complementary function, since substituting it gives zero on the left-hand side. 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: multiply by a sufficient power of x to remove the duplication.

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 simplifies to −λex = ex, giving λ = −1.

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

Write the complementary function before choosing a trial, so that any duplication is identified before the algebra is done.

ASSESSMENT FOCUS

  • Write the auxiliary equation as a labelled step.
  • The repeated-root case carries (A + Bx)emx; the factor x is required for the two terms to be independent.
  • For complex roots p ± qi, epx comes from the real part and cos/sin from the imaginary part.
  • For a recurrence with complex roots, put one root in modulus-argument form: Rn replaces the exponential and nθ replaces the angle.
  • 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. Both roots have negative real part, so every solution tends to 2.

For a linear constant-coefficient homogeneous equation, substituting emx gives am² + bm + c = 0, and the roots determine the form of the solution.

A root with negative real part gives decay and one with positive real part growth; a repeated root needs (A + Bx); a non-real pair p ± qi gives oscillation of frequency q inside the envelope epx.

With a forcing term, the general solution is the complementary function plus a particular integral of the same functional type.

If the trial duplicates a complementary-function term, multiply it by a sufficient power of 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.

15 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.
  • Multiply the trial function by x when it duplicates a term of the complementary function.
  • Use two initial conditions to pin both constants, applied to the full solution.
  • Carry the same three root cases across to a second order recurrence relation.

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