Basics of Second-Order Differential Equations
Learn the standard solution patterns for second-order linear ODEs with constant coefficients: characteristic equation, forcing, and damping cases.
Continue where you stopped
The core idea
On this page
A second-order linear ODE with constant coefficients has the form
where a,b,c are constants and f(x) is the forcing (also called a source term).
- Oscillations and damping: Oscillations hub
- Second-order circuits (RLC transient): UY1: L-R-C Series Circuit
- Main hub: Second Order Differential Equations
- Math hub: Mathematics for Undergraduate Physics
- Homogeneous: f(x) = 0
- Forced / nonhomogeneous: f(x) ≠ 0
- The full solution is usually: general solution = homogeneous part + particular part
- Solve the homogeneous equation with the characteristic polynomial.
- If forced, guess a particular solution yₚ (undetermined coefficients) and use the resonance rule if needed.
- Add: y = yₕ + yₚ.
- Apply two conditions (e.g. y(0) and y'(0)) to determine constants.
1) Homogeneous constant-coefficient case
Start with:
Step A: characteristic equation
Assume a trial solution y = e^rx. Substitution gives the characteristic equation:
Let its roots be r₁ and r₂. The solution form depends on the root type.
Case 1: two distinct real roots (r₁ ≠ r₂)
Example: y''-5y' + 6y = 0
Characteristic equation: r²-5r + 6 = 0 = (r-2)(r-3), so:
Case 2: repeated real root (r₁ = r₂ = r)
Example: y''-4y' + 4y = 0
Characteristic: r²-4r + 4 = (r-2)², so:
Case 3: complex roots (r = α± iβ)
Example: y'' + y = 0
Characteristic: r² + 1 = 0 ⇒ r = ± i, so:
Step B: apply initial conditions (don’t skip this in physics)
Second-order solutions have two constants, so you typically need two conditions (often y(0) and y'(0)).
Example: solve
General solution:
Apply y(0) = 0:
Differentiate: y' = -C₁ sin x + C₂ cos x, so y'(0) = C₂ = 2.
Final answer:
2) Forced (nonhomogeneous) case
Now consider:
The standard structure is:
where yₕ solves the homogeneous equation and yₚ is any one particular solution.
Undetermined coefficients (common physics forcing)
If f(x) is built from polynomials, exponentials, and sines/cosines (and products of these), you can often guess a suitable yₚ.
Common trial forms:
- f(x) = Pₙ(x) (polynomial of degree n) → try yₚ = polynomial of degree n
- f(x) = e^kx → try yₚ = Ae^kx
- f(x) = cos(ω x) or sin(ω x) → try yₚ = A cos(ω x) + B sin(ω x)
- Products like e^kx cos(ω x) → try yₚ = e^kx(A cos(ω x) + B sin(ω x))
If your guessed yₚ overlaps with a term already present in yₕ, multiply the guess by x (or by x², etc.) until it becomes linearly independent of yₕ.
- If you forget to check for overlap with yₕ, you can waste time because your substituted coefficients will all come out zero.
- After finding yₚ, always write the final answer as y = yₕ + yₚ (then apply initial conditions if given).
Worked example (non-resonant)
Solve
Homogeneous solution: yₕ = C₁ cos x + C₂ sin x.
Try a particular solution yₚ = A cos(2x) + B sin(2x). Then yₚ'' = -4A cos(2x)-4B sin(2x), so:
Match coefficients:
So a particular solution is yₚ = -1/3 cos(2x), and the general solution is:
Worked example (resonant forcing)
Solve
The homogeneous solution is yₕ = C₁ cos x + C₂ sin x, which already contains sin x.
Start with the usual sinusoid guess and apply the resonance rule:
Substitute into y'' + y = sin x (the x terms cancel), giving:
So A = -1/2 and B = 0, and a particular solution is:
3) How this maps to damping in physics
Many “damped oscillator” models look like:
Divide by m:
where
- Underdamped: β < ω₀ (oscillatory decay)
- Critically damped: β = ω₀
- Overdamped: β > ω₀ (no oscillation)
Physics link: this is the same classification used in the free transient of a series RLC circuit:
Practice (with hints + answers)
1) Solve: y'' - 2y' - 3y = 0
Hint: Characteristic equation r²-2r-3 = 0.
Answer: (r-3)(r + 1) = 0 so r = 3,-1:
2) Find a particular solution form: y'' + 4y = cos(3x)
Hint: Try yₚ = A cos(3x) + B sin(3x) (non-resonant because ω = 3 vs natural ω₀ = 2).
Answer: The trial form is correct:
(Substitute to solve for A,B if required.)
3) Resonance check: y'' + y = sin x. What must you multiply your sinusoid guess by?
Hint: sin x already appears in yₕ for y'' + y = 0.
Answer: Multiply by x:
4) Damping classification: m x'' + b x' + kx = 0. What are β and ω₀?
Hint: Divide by m and compare with x'' + 2β x' + ω₀² x = 0.
Answer:
Common mistakes
- Forgetting that second-order ODEs need two conditions (e.g. y(0) and y'(0)).
- Dropping the “+ C” idea when integrating or simplifying (constants matter).
- Guessing a yₚ that duplicates yₕ (fix with the resonance rule).
This is the end of the basic walkthrough for second-order differential equations.
Back to Second Order Differential Equations Back to Mathematics for Undergraduate Physics