Skip to main content
ScotlandMathsSyllabus dot point

How do you solve a linear second-order differential equation with constant coefficients?

Solve homogeneous and non-homogeneous second-order linear differential equations with constant coefficients using the auxiliary equation, the complementary function and a particular integral, covering distinct real, equal and complex roots.

A focused answer to the SQA Advanced Higher Mathematics second-order differential equations content, covering the auxiliary equation, the three cases of distinct real, equal and complex roots, the complementary function, finding a particular integral for non-homogeneous equations, and the general solution.

Generated by Claude Opus 4.812 min answer

Reviewed by: AI editorial process; not yet individually human-reviewed

Have a quick question? Jump to the Q&A page

Jump to a section
  1. What this dot point is asking
  2. The auxiliary equation and the three cases
  3. Non-homogeneous equations
  4. Boundary conditions
  5. Why the three cases look so different
  6. Try this

What this dot point is asking

The SQA wants you to solve linear second-order differential equations with constant coefficients of the form ad2ydx2+bdydx+cy=f(x)a\dfrac{d^2y}{dx^2} + b\dfrac{dy}{dx} + cy = f(x). You build the solution from the auxiliary equation, handling distinct real, equal and complex roots, and add a particular integral when the right-hand side is non-zero.

The auxiliary equation and the three cases

For the homogeneous equation ad2ydx2+bdydx+cy=0a\dfrac{d^2y}{dx^2} + b\dfrac{dy}{dx} + cy = 0, trying y=emxy = e^{mx} leads to am2+bm+c=0am^2 + bm + c = 0. The nature of the roots, decided by the discriminant, gives three forms for the solution.

Non-homogeneous equations

When the right-hand side f(x)f(x) is not zero, the general solution is the complementary function plus a particular integral ypy_p: a single function that satisfies the full equation. You find ypy_p by trying a form that matches f(x)f(x) (a polynomial for a polynomial, pekxpe^{kx} for an exponential, pcoskx+qsinkxp\cos kx + q\sin kx for a trigonometric term) and solving for its coefficients.

Boundary conditions

The general solution of a second-order equation contains two arbitrary constants, so you need two pieces of information to find a particular solution: typically the value of yy and of dydx\dfrac{dy}{dx} at a point, or the value of yy at two points. Apply the conditions to the full general solution y=yc+ypy = y_c + y_p, not just to the complementary function.

Why the three cases look so different

The three forms all come from the same idea, that solutions are built from exponentials emxe^{mx}. With two distinct real roots you simply have two independent exponentials. With a repeated root there is only one exponential, so a second independent solution is manufactured by multiplying by xx, giving the (A+Bx)emx(A + Bx)e^{mx} shape. With complex roots α±βi\alpha \pm \beta i, the exponentials e(α±βi)xe^{(\alpha \pm \beta i)x} are rewritten with Euler's relation into the real combination eαx(Acosβx+Bsinβx)e^{\alpha x}(A\cos\beta x + B\sin\beta x), where α\alpha controls growth or decay and β\beta controls the oscillation. This is why oscillating physical systems, such as a mass on a spring with light damping, lead naturally to the complex-root case.

Try this

Q1. Write the general solution form if the auxiliary equation has roots m=1±3im = -1 \pm 3i. [2 marks]

  • Cue. α=1\alpha = -1, β=3\beta = 3, so y=ex(Acos3x+Bsin3x)y = e^{-x}(A\cos 3x + B\sin 3x).

Q2. Find the auxiliary equation of d2ydx2+2dydx+y=0\dfrac{d^2y}{dx^2} + 2\dfrac{dy}{dx} + y = 0 and its root. [2 marks]

  • Cue. m2+2m+1=(m+1)2=0m^2 + 2m + 1 = (m + 1)^2 = 0, equal root m=1m = -1.

Exam-style practice questions

Practice questions written in the style of SQA exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.

AH style: complex roots4 marksFind the general solution of d2ydx2+4y=0\dfrac{d^2y}{dx^2} + 4y = 0.
Show worked answer →

Auxiliary equation: m2+4=0m^2 + 4 = 0, so m2=4m^2 = -4 and m=±2im = \pm 2i (1 mark).

Complex roots m=α±βim = \alpha \pm \beta i with α=0\alpha = 0, β=2\beta = 2 (1 mark).

The general solution is y=eαx(Acosβx+Bsinβx)y = e^{\alpha x}(A\cos\beta x + B\sin\beta x) (1 mark).

With α=0\alpha = 0, β=2\beta = 2: y=Acos2x+Bsin2xy = A\cos 2x + B\sin 2x (1 mark). Markers reward the auxiliary equation, identifying complex roots, the correct form, and the final solution.

AH style: non-homogeneous6 marksFind the general solution of d2ydx23dydx+2y=4x\dfrac{d^2y}{dx^2} - 3\dfrac{dy}{dx} + 2y = 4x.
Show worked answer →

Auxiliary equation: m23m+2=0m^2 - 3m + 2 = 0, so (m1)(m2)=0(m - 1)(m - 2) = 0 and m=1,2m = 1, 2 (1 mark). Complementary function yc=Aex+Be2xy_c = Ae^{x} + Be^{2x} (1 mark).

Try particular integral yp=ax+by_p = ax + b, so yp=ay_p' = a, yp=0y_p'' = 0 (1 mark).

Substitute: 03a+2(ax+b)=4x0 - 3a + 2(ax + b) = 4x, giving 2a=42a = 4 so a=2a = 2, and 3a+2b=0-3a + 2b = 0 so b=3b = 3 (2 marks).

General solution y=Aex+Be2x+2x+3y = Ae^{x} + Be^{2x} + 2x + 3 (1 mark). Markers reward the complementary function, the trial form, solving for the coefficients, and combining into the general solution.

Related dot points

Sources & how we know this