Linear Algebra & DE · Unit 2 · Topic 09

Higher-order linear equations: solve a polynomial, then add a particular integral.

Short answer

For \(f(D)y = X\) with constant coefficients, the general solution is \(y = \text{CF} + \text{PI}\). The CF comes from the roots of the auxiliary equation \(f(m) = 0\). The PI is \(\dfrac{1}{f(D)}X\), found by short rules such as \(\dfrac{1}{f(D)}e^{ax} = \dfrac{e^{ax}}{f(a)}\).

Example: \(y'' - 3y' + 2y = e^{3x}\) gives \(y = c_1e^x + c_2e^{2x} + \tfrac{1}{2}e^{3x}\).

Engineering MathsB Tech / BEBSc
01

The equation and its general solution

Before you start: you need higher-order derivatives and the roots of quadratic and cubic polynomials.

Write \(D\) for \(\dfrac{d}{dx}\), so \(D^2y = y''\). A linear equation with constant coefficients looks like \[a_0\frac{d^ny}{dx^n} + a_1\frac{d^{n-1}y}{dx^{n-1}} + \cdots + a_ny = X \quad\text{or}\quad f(D)\,y = X,\] where the \(a_i\) are constants and \(X\) is a function of \(x\).

General solution

\[y = \text{CF} + \text{PI}\]

The complementary function (CF) solves \(f(D)y = 0\) and holds \(n\) arbitrary constants. The particular integral (PI) is any one solution of \(f(D)y = X\), with no constants.

Why this works: \(f(D)\) is linear, so \(f(D)(\text{CF} + \text{PI}) = 0 + X = X\). And since \(D\,e^{mx} = m\,e^{mx}\), we get \(f(D)\,e^{mx} = f(m)\,e^{mx}\). So \(e^{mx}\) solves \(f(D)y = 0\) exactly when \(f(m) = 0\). That polynomial equation \(f(m) = 0\) is the auxiliary equation.

02

The complementary function

Roots of \(f(m) = 0\)Part of the CF
Real and distinct \(m_1, m_2\)\(c_1e^{m_1x} + c_2e^{m_2x}\)
Real, repeated twice: \(m, m\)\((c_1 + c_2x)\,e^{mx}\)
Real, repeated three times\((c_1 + c_2x + c_3x^2)\,e^{mx}\)
Complex \(\alpha \pm i\beta\)\(e^{\alpha x}(c_1\cos\beta x + c_2\sin\beta x)\)
Complex \(\alpha \pm i\beta\), repeated\(e^{\alpha x}\big[(c_1 + c_2x)\cos\beta x + (c_3 + c_4x)\sin\beta x\big]\)

A repeated root needs the extra factor \(x\) because \(c_1e^{mx} + c_2e^{mx}\) is really one constant times \(e^{mx}\). You would be one solution short.

03

Particular integral: the short methods

\(\text{PI} = \dfrac{1}{f(D)}X\), where \(\dfrac{1}{D}\) means integrate once. For the usual right-hand sides there are shortcuts.

Short methods for the PI

\(X = e^{ax}\): \(\dfrac{1}{f(D)}e^{ax} = \dfrac{e^{ax}}{f(a)}\) if \(f(a) \ne 0\). If \(f(a) = 0\), use \(\dfrac{x\,e^{ax}}{f'(a)}\); if \(f'(a) = 0\) too, use \(\dfrac{x^2e^{ax}}{f''(a)}\).

\(X = \sin ax\) or \(\cos ax\): write \(f(D)\) in terms of \(D^2\) where you can and replace \(D^2\) by \(-a^2\). If that gives zero (the case \(\dfrac{1}{D^2 + a^2}\)): \[\frac{1}{D^2 + a^2}\sin ax = -\frac{x}{2a}\cos ax, \qquad \frac{1}{D^2 + a^2}\cos ax = \frac{x}{2a}\sin ax\]

\(X = x^n\): write \(\dfrac{1}{f(D)} = [1 \pm \phi(D)]^{-1}\) after taking out the constant term, expand by the binomial series up to \(D^n\), and apply it to \(x^n\).

\(X = e^{ax}V\): \(\dfrac{1}{f(D)}e^{ax}V = e^{ax}\dfrac{1}{f(D + a)}V\). Move \(e^{ax}\) to the front and shift \(D\) to \(D + a\).

If a single \(D\) is left after replacing \(D^2\) by \(-a^2\), multiply top and bottom to bring \(D^2\) into the denominator, as in Example 6. Never replace \(D\) itself by \(-a^2\).

04

Solved examples

Example 1: Real distinct roots

Easy

Solve \(y'' - 5y' + 6y = 0\).

  1. Auxiliary equation: \(m^2 - 5m + 6 = 0\), so \((m - 2)(m - 3) = 0\) and \(m = 2, 3\).

Answer\(y = c_1e^{2x} + c_2e^{3x}\)

Example 2: Complex roots

Easy

Solve \((D^2 + 2D + 5)\,y = 0\).

  1. \(m = \dfrac{-2 \pm \sqrt{4 - 20}}{2} = -1 \pm 2i\). So \(\alpha = -1\), \(\beta = 2\).

Answer\(y = e^{-x}(c_1\cos 2x + c_2\sin 2x)\)

Example 3: A repeated root in a cubic

Medium

Solve \((D^3 - 3D^2 + 4)\,y = 0\).

  1. Try \(m = -1\): \(-1 - 3 + 4 = 0\). So \((m + 1)\) is a factor.
  2. Divide: \(m^3 - 3m^2 + 4 = (m + 1)(m^2 - 4m + 4) = (m + 1)(m - 2)^2\).
  3. Roots \(-1, 2, 2\). The repeated root gets \((c_2 + c_3x)\).

Answer\(y = c_1e^{-x} + (c_2 + c_3x)\,e^{2x}\)

Example 4: Exponential right side, with initial conditions

Medium

Solve \(y'' - 3y' + 2y = e^{3x}\), \(y(0) = 1\), \(y'(0) = 0\).

  1. \(m^2 - 3m + 2 = 0\) gives \(m = 1, 2\). CF \(= c_1e^x + c_2e^{2x}\).
  2. PI \(= \dfrac{e^{3x}}{9 - 9 + 2} = \dfrac{e^{3x}}{2}\).
  3. \(y(0) = 1\): \(c_1 + c_2 + \tfrac{1}{2} = 1\). \(y'(0) = 0\): \(c_1 + 2c_2 + \tfrac{3}{2} = 0\).
  4. Subtracting, \(c_2 = -2\), and then \(c_1 = \tfrac{5}{2}\).

Answer\(y = \tfrac{5}{2}e^x - 2e^{2x} + \tfrac{1}{2}e^{3x}\)

Example 5: The failure case f(a) = 0

Medium

Solve \((D^2 - 3D + 2)\,y = e^{2x}\).

  1. CF \(= c_1e^x + c_2e^{2x}\), as in Example 4.
  2. \(f(2) = 4 - 6 + 2 = 0\), so the plain rule fails. \(f'(D) = 2D - 3\) and \(f'(2) = 1\).
  3. PI \(= \dfrac{x\,e^{2x}}{f'(2)} = x\,e^{2x}\).

Answer\(y = c_1e^x + c_2e^{2x} + x\,e^{2x}\)

Example 6: A sine on the right

Medium

Find the PI of \((D^2 + D + 1)\,y = \sin 2x\).

  1. Replace \(D^2\) by \(-4\): \(\dfrac{1}{-4 + D + 1}\sin 2x = \dfrac{1}{D - 3}\sin 2x\).
  2. Multiply top and bottom by \(D + 3\): \(\dfrac{D + 3}{D^2 - 9}\sin 2x = \dfrac{(D + 3)\sin 2x}{-13}\).
  3. \((D + 3)\sin 2x = 2\cos 2x + 3\sin 2x\).

AnswerPI \(= -\dfrac{2\cos 2x + 3\sin 2x}{13}\)

Example 7: A polynomial on the right

Exam level

Solve \((D^2 + D - 2)\,y = x^2\).

  1. \(m^2 + m - 2 = (m + 2)(m - 1)\), so CF \(= c_1e^x + c_2e^{-2x}\).
  2. Take out \(-2\) and expand: \[\text{PI} = -\frac{1}{2}\left[1 - \frac{D + D^2}{2}\right]^{-1}x^2 = -\frac{1}{2}\left[1 + \frac{D + D^2}{2} + \frac{(D + D^2)^2}{4} + \cdots\right]x^2\]
  3. Keep terms up to \(D^2\): \(1 + \dfrac{D}{2} + \dfrac{D^2}{2} + \dfrac{D^2}{4} = 1 + \dfrac{D}{2} + \dfrac{3D^2}{4}\).
  4. Apply to \(x^2\): \(x^2 + x + \tfrac{3}{2}\). Multiply by \(-\tfrac{1}{2}\).

Answer\(y = c_1e^x + c_2e^{-2x} - \dfrac{x^2}{2} - \dfrac{x}{2} - \dfrac{3}{4}\)

Example 8: The shift rule meets a failure case

Exam level

Solve \((D^2 - 2D + 5)\,y = e^x\cos 2x\).

  1. \(m = 1 \pm 2i\), so CF \(= e^x(c_1\cos 2x + c_2\sin 2x)\).
  2. Shift \(D\) to \(D + 1\): PI \(= e^x\dfrac{1}{(D + 1)^2 - 2(D + 1) + 5}\cos 2x\).
  3. The denominator simplifies to \(D^2 + 4\), so PI \(= e^x\dfrac{1}{D^2 + 4}\cos 2x\).
  4. Replacing \(D^2\) by \(-4\) gives zero, so use the failure formula: \(\dfrac{1}{D^2 + 4}\cos 2x = \dfrac{x}{4}\sin 2x\).

Answer\(y = e^x(c_1\cos 2x + c_2\sin 2x) + \dfrac{x}{4}e^x\sin 2x\)

Vipul Sir's tip

Before you touch the PI, write the CF and look at it. If the right-hand side already appears in the CF (like \(e^{2x}\) in Example 5 or \(e^x\cos 2x\) in Example 8), you know straight away it is a failure case and an extra \(x\) is coming.

05

Common mistakes

1. One constant for a repeated root

For roots \(2, 2\), writing \(y = c_1e^{2x} + c_2e^{2x}\) is wrong: that is just \((c_1 + c_2)e^{2x}\). The correct CF is \((c_1 + c_2x)\,e^{2x}\).

2. Mixing up \(\alpha\) and \(\beta\)

For roots \(-1 \pm 2i\), writing \(e^{2x}(c_1\cos x + c_2\sin x)\) puts the numbers in the wrong places. The real part goes in the exponential and the imaginary part goes inside the sine and cosine: \(e^{-x}(c_1\cos 2x + c_2\sin 2x)\).

3. Ignoring \(f(a) = 0\)

For \((D^2 - 3D + 2)y = e^{2x}\), the formula \(\dfrac{e^{2x}}{f(2)}\) divides by zero. Writing \(\text{PI} = e^{2x}\) instead is wrong: \(e^{2x}\) is part of the CF, so \(f(D)\,e^{2x} = 0\), not \(e^{2x}\). The PI is \(x\,e^{2x}\).

06

Practice questions

Try each one on paper before you open the answer.

Q1Solve \(y'' + y' - 6y = 0\).

\(m^2 + m - 6 = (m + 3)(m - 2)\).

\(y = c_1e^{2x} + c_2e^{-3x}\).

Q2Solve \((D^4 - 1)\,y = 0\).

\(m^4 - 1 = (m - 1)(m + 1)(m^2 + 1)\), roots \(\pm 1, \pm i\).

\(y = c_1e^x + c_2e^{-x} + c_3\cos x + c_4\sin x\).

Q3Solve \((D^2 + 4)\,y = \sin 2x\).

Failure case: PI \(= -\dfrac{x}{4}\cos 2x\).

\(y = c_1\cos 2x + c_2\sin 2x - \dfrac{x}{4}\cos 2x\).

Q4Solve \((D^2 - 4)\,y = e^{2x} + x\).

\(f(2) = 0\), \(f'(2) = 4\): first PI \(= \dfrac{x\,e^{2x}}{4}\). Second: \(-\dfrac{1}{4}\left(1 - \dfrac{D^2}{4}\right)^{-1}x = -\dfrac{x}{4}\).

\(y = c_1e^{2x} + c_2e^{-2x} + \dfrac{x\,e^{2x}}{4} - \dfrac{x}{4}\).

Q5Solve \((D^2 + 3D + 2)\,y = \sin x\).

Replace \(D^2\) by \(-1\): \(\dfrac{1}{3D + 1}\sin x = \dfrac{(3D - 1)\sin x}{9D^2 - 1}\). Now \(9D^2 \to -9\), so this is \(\dfrac{3\cos x - \sin x}{-10}\).

\(y = c_1e^{-x} + c_2e^{-2x} + \dfrac{\sin x - 3\cos x}{10}\).

Q6Solve \((D - 2)^2\,y = x^2e^{2x}\).

Shift: PI \(= e^{2x}\dfrac{1}{D^2}x^2 = e^{2x}\dfrac{x^4}{12}\).

\(y = \left(c_1 + c_2x + \dfrac{x^4}{12}\right)e^{2x}\).

Stuck on a question?

Bring it to a free demo class and work through it with Vipul Sir. Book on WhatsApp.

07

Frequently asked questions

What is the auxiliary equation?

The polynomial equation \(f(m) = 0\) you get by replacing \(D\) with \(m\) in \(f(D)y = 0\). Its roots decide the form of the complementary function.

What is the difference between the CF and the PI?

The CF solves the equation with zero on the right and carries all the arbitrary constants. The PI is one particular solution of the full equation. The general solution is their sum.

What do you do when f(a) = 0?

Multiply by \(x\) and differentiate the denominator: \(\dfrac{1}{f(D)}e^{ax} = \dfrac{x\,e^{ax}}{f'(a)}\). If \(f'(a) = 0\) as well, use \(\dfrac{x^2e^{ax}}{f''(a)}\).

How do you write the CF for complex roots?

For roots \(\alpha \pm i\beta\), the CF is \(e^{\alpha x}(c_1\cos\beta x + c_2\sin\beta x)\). This comes from \(e^{(\alpha + i\beta)x}\) and Euler's formula, written with real functions.

Related lessons

← All 12 Linear Algebra & DE topics
Vipul Sir
Written by Vipul Sir

Vipul Sir has taught mathematics for over 15 years to HSC, CBSE, ICSE, IGCSE/IB, Diploma, Engineering and BSc students at VVS Classes in Goregaon and Vile Parle, Mumbai. He teaches every class himself, concepts first and exam technique second.

Linear Algebra and Differential Equations

Get Linear Algebra & DE right, with Vipul Sir beside you.

Concept-first classes in small batches in Goregaon and Vile Parle, or online. Your first class is free.

WhatsApp↗