On this page
Loading guide controls…
Continue lessonNew guided lessons are not available yet.
Guided lesson options
You stopped at:
ContinueRevision Mode is on. Questions and activities are hidden.
The linked question or activity is hidden by Revision Mode.
Second-order linear differential equations model vibrating springs, electrical circuits and swinging pendulums. With constant coefficients they can be solved completely by trying exponential solutions. This lesson derives the auxiliary equation, matches each kind of root (real distinct, repeated, complex) to the form of the complementary function, finds a particular integral for polynomial, exponential and trigonometric forcing, and interprets the solution of a forced oscillation in the long term.
An exponential trial gives the auxiliary equation
This lesson solves equations of the form
Start with f(x) = 0, the homogeneous equation. Its left side is linear: if y₁ and y₂ are solutions, so is Ay₁ + By₂ for any constants A and B, because differentiation respects sums and constant multiples.
Try y = e^mx. Then y' = me^mx and y'' = m²e^mx, so
Since e^mx is never zero, e^mx is a solution exactly when m² + am + b = 0. This quadratic is the auxiliary equation. A second-order equation needs two independent solutions, giving a general solution with two arbitrary constants.
The roots decide the form of the solution
| Roots of m² + am + b = 0 | General solution of the homogeneous equation |
|---|---|
| Real, distinct m₁, m₂ | y = Ae^m₁x + Be^m₂x |
| Real, repeated m | y = (A + Bx)e^mx |
| Complex, p± iq, q ≠ 0 | y = e^px(A cos qx + B sin qx) |
Why the repeated case needs xe^mx. A repeated root gives only one exponential. Substitute y = xe^mx: y' = e^mx(1 + mx) and y'' = e^mx(2m + m²x), so
The first bracket is zero because m is a root, and the second is zero because a repeated root is m = -a/2. So xe^mx is a second, independent solution.
Why the complex case gives sines and cosines. The exponentials e^((p± iq)x) = e^px(cos qx± i sin qx) solve the equation. Their sum and difference, divided by 2 and 2i, are the real solutions e^px cos qx and e^px sin qx.
The solid solution is exp(−0.200x) cos(2x), bounded by the dashed envelopes plus and minus exp(−0.200x). Its cosine factor has period π; the positive envelope at x = 4 is 0.449.
- Envelope at x = 4
- 0.449
- Period of the cosine factor
- 3.14
- Coefficient of y: p² + 4
- 4.04
Check your understanding 1
One equation of each kind
Check your understanding 1
One equation of each kind
Find the general solution of each equation.
- y'' + y'-6y = 0
- y'' + 6y' + 9y = 0
- y'' + 9y = 0
Show answerHide answer
- m² + m-6 = (m + 3)(m-2) = 0, so y = Ae^2x + Be^(-3x).
- (m + 3)² = 0, a repeated root, so y = (A + Bx)e^(-3x).
- m² = -9, so m = ±3i with p = 0, and y = A cos 3x + B sin 3x.
Each answer has two arbitrary constants. Writing Ae^(-3x) + Be^(-3x) in the second case is really one constant, (A + B)e^(-3x), so it cannot be the general solution.
Worked example 1
Two conditions fix two constants
Worked example 1
Two conditions fix two constants
Solve y''-2y' + 5y = 0 given that y = 1 and dy/(dx) = 5 when x = 0.
Show full solutionHide solution
Solve the auxiliary equation
Method
m²-2m + 5 = 0 has discriminant 4-20 = -16.Reason
Complex roots p± iq give e^px(A cos qx + B sin qx).Working
Answer
m = 2±4i/2 = 1±2i, so y = e^x(A cos 2x + B sin 2x).
Use both initial conditions
Method
Substitute x = 0 into y and into y'.Reason
The value fixes A; the gradient then fixes B.Working
Answer
y(0) = A = 1. Differentiating with the product rule,
y' = e^x(A cos 2x + B sin 2x) + e^x(-2A sin 2x + 2B cos 2x),so y'(0) = A + 2B = 5 and B = 2. Hence y = e^x(cos 2x + 2 sin 2x).
Quick check
Substitute back: with y = e^x(cos 2x + 2 sin 2x), y' = e^x(5 cos 2x) and y'' = e^x(5 cos 2x-10 sin 2x). Then y''-2y' + 5y = e^x[(5-10 + 5) cos 2x + (-10 + 10) sin 2x] = 0. The factor e^x makes the oscillations grow, because the real part of the roots is positive.
General solution equals complementary function plus particular integral
For y'' + ay' + by = f(x) with f ≠ 0, suppose yₚ is any one solution, called a particular integral. If y is another solution, subtracting the two equations shows that y-yₚ solves the homogeneous equation. So every solution is
where yc, the complementary function, is the general solution of the homogeneous equation. The two arbitrary constants are in yc; the particular integral has none.
Find yₚ with a trial function shaped like f(x):
| f(x) | First trial |
|---|---|
| Polynomial of degree n | Polynomial of degree n |
| pe^kx | Ce^kx |
| p cos kx + q sin kx | C cos kx + D sin kx |
If the first trial is already part of the complementary function, it gives zero on the left, so multiply the trial by x; multiply by x² if e^kx comes from a repeated root. If b = 0, a polynomial trial needs one degree more, because y itself never appears.
Worked example 2
A polynomial forcing term
Worked example 2
A polynomial forcing term
Find the general solution of y''-3y' + 2y = 4x.
Show full solutionHide solution
Complementary function
Reason
The homogeneous part supplies both arbitrary constants.Working
Answer
m²-3m + 2 = (m-1)(m-2) = 0, so yc = Ae^x + Be^2x.
Try a linear polynomial
Method
Try y = cx + d, so y' = c and y'' = 0.Reason
A degree-one right-hand side needs a degree-one trial, including its constant term.Working
Answer
0-3c + 2(cx + d) = 4x Longrightarrow 2c = 4, -3c + 2d = 0.So c = 2, d = 3 and yₚ = 2x + 3. The general solution is y = Ae^x + Be^2x + 2x + 3.
Quick check
Check: (2x + 3)''-3(2x + 3)' + 2(2x + 3) = 0-6 + 4x + 6 = 4x. Leaving out d would force -3c = 0 and 2c = 4 together, which is impossible.
Spot the mistake 1
When the trial gives zero
Spot the mistake 1
When the trial gives zero
A student solving y''-3y' + 2y = e^2x tries y = Ce^2x, gets 0 = e^2x and concludes that the equation has no solution. Explain the error and find a particular integral.
Write your answer, then compare it with the solution
Show full solutionHide solution
See why the trial fails
Method
e^2x is already in yc = Ae^x + Be^2x.Reason
Anything in the complementary function makes the left side zero, so it can never produce e^2x.Working
Answer
The failed trial shows that this trial is unsuitable, not that no solution exists.
Try x times the exponential
Method
Try y = Cxe^2x.Reason
2 is a single root of the auxiliary equation, so one factor of x is enough.Working
Answer
y' = Ce^2x(1 + 2x) and y'' = Ce^2x(4 + 4x), so
y''-3y' + 2y = Ce^2x[(4 + 4x)-3(1 + 2x) + 2x] = Ce^2x.So C = 1, yₚ = xe^2x and y = Ae^x + Be^2x + xe^2x.
Common mistake
Before choosing a trial, compare the forcing term with the complementary function. The same check applies to trigonometric forcing: for y'' + 4y = 4 sin 2x, the trial C cos 2x + D sin 2x is part of yc, and x(C cos 2x + D sin 2x) gives yₚ = -x cos 2x.
Check your understanding 2
Choose the trial first
Check your understanding 2
Choose the trial first
For each equation, write the complementary function and the form of trial you would use for the particular integral. Do not find the constants.
- y'' + 6y' + 9y = 5e^(-3x)
- y'' + 4y = 8x²
- y''-y' = 3
Show answerHide answer
- yc = (A + Bx)e^(-3x). Both e^(-3x) and xe^(-3x) are in yc, so try Cx²e^(-3x).
- yc = A cos 2x + B sin 2x. No polynomial is in yc, so try cx² + dx + e. (It gives yₚ = 2x²-1.)
- m²-m = 0 gives yc = A + Be^x. A constant is in yc (and b = 0), so try cx. (It gives yₚ = -3x.)
A forced oscillation settles to its particular integral
Common mistakes
- Writing Ae^mx + Be^mx for a repeated root instead of (A + Bx)e^mx.
- Choosing a particular integral that duplicates part of the complementary function, so that it gives 0 = f(x).
- Using only p cos kx as a trial for cos kx forcing; the trial needs both p cos kx + q sin kx.
- Fitting the initial conditions to the complementary function before adding the particular integral.
- Forgetting that a decaying complementary function means the long-term motion is the particular integral.
Before you move on
Try it yourself 1
What remains after a long time
Try it yourself 1
What remains after a long time
The displacement y of a damped, driven spring at time t satisfies
and it starts at rest at y = 0. Find y, and describe its motion for large t, including its amplitude.
Write your answer, then compare it with the solution
Hint 1
The trial needs both cosine and sine
Try C cos t + D sin t. The dy/dt term turns cosines into sines, so a cosine alone cannot match.
Show full solutionHide solution
Complementary function
Reason
Its roots tell us whether the free motion dies away.Working
Answer
m² + 2m + 5 = 0 gives m = -1±2i, so yc = e^(-t)(A cos 2t + B sin 2t).
Particular integral
Method
Substitute y = C cos t + D sin t and compare the coefficients of cos t and sin t.Reason
± i are not roots of the auxiliary equation, so this trial is not in yc.Working
Answer
The left side becomes (4C + 2D) cos t + (4D-2C) sin t. Matching it with 10 cos t:
cos t: 4C + 2D = 10,; sin t: 4D-2C = 0.So C = 2D, 10D = 10, D = 1 and C = 2: yₚ = 2 cos t + sin t.
Fit the start at rest
Method
Use y(0) = 0 and y'(0) = 0 on the whole solution.Reason
The initial conditions apply to yc + yₚ, not to yc alone.Working
Answer
y(0) = A + 2 = 0, so A = -2. Also y'(0) = -A + 2B + 1 = 0, so B = -3/2. Hence
y = e^(-t)(-2 cos 2t-3/2 sin 2t); + 2 cos t + sin t.Long-term motion
Method
e^(-t) → 0, so the complementary part dies away.Reason
What remains is the particular integral, which has the driving frequency.Working
Answer
For large t, y ≈ 2 cos t + sin t = square root of 5 cos(t-α) with tan α = 1/2. The spring oscillates with period 2π and amplitude square root of 5, whatever its starting state.
Quick check
Check y(0) = -2 + 2 = 0. Fitting the constants to yc alone, with y(0) = 0 giving A = 0, is the commonest error. Compare your description of the long-term motion with the solution yourself; this answer is not marked automatically.
First-order linear equations, given substitutions, phase lines and growth models are taught in First-order equations and growth models.
Loading reading progress…
Lesson done
- Monday
- Tuesday
- Wednesday
- Thursday
- Friday
- Saturday
- Sunday
Checking learning on this device…
Change goal
Progress options
Loading questions…