1 / 15
Chapter 2 · Second-Order ODEs

Method of Undetermined Coefficients

Finding Particular Solutions by Intelligent Guessing
Dr. Mohamed Mabrok · Qatar University

The Big Picture: Non-Homogeneous Equations

y_c (Complementary)
Solved in Ch2.1
(Homogeneous)
ay'' + by' + cy = g(t)
y_p (Particular)
THIS LECTURE
(For specific g(t))
Key Principle
y = y_c + y_p
General solution = Complementary (homogeneous) + Particular (non-homogeneous)

The Strategy: Guess Smartly!

1
STEP 1: Solve Homogeneous
Find $y_c$ by solving $ay'' + by' + cy = 0$ (Ch2.1 method)
y_c = C_1e^{r_1 t} + C_2e^{r_2 t} \text{ (or appropriate form)}
2
STEP 2: Guess the Form
Based on the form of g(t), write down a trial solution $y_p$
The key: Choose the right TYPE of function (polynomial, exponential, sine/cosine, etc.)
3
STEP 3: Match Coefficients
Substitute $y_p$ into the ODE, match coefficients, solve for unknowns
This gives you the specific constants in your particular solution
When Does This Method Work?
Polynomials, exponentials, sines, cosines, and combinations thereof. NOT for functions like $\tan(t)$, $\ln(t)$, or $1/t$.

The Guessing Table: Your Reference Card

If g(t) looks like... Then guess y_p as... Note
Polynomial of degree n $A_n t^n + A_{n-1}t^{n-1} + \cdots + A_0$ Include ALL terms down to constant
$Ke^{\alpha t}$ $Ae^{\alpha t}$ $A$ is unknown constant to find
$K_1\cos(\omega t) + K_2\sin(\omega t)$ $A\cos(\omega t) + B\sin(\omega t)$ Use BOTH cos and sin, even if g(t) has only one
Combination (e.g., $e^t \cos(t)$) Use superposition: find $y_{p1}$ and $y_{p2}$ separately Add solutions: $y_p = y_{p1} + y_{p2}$
The Golden Rule
Your guess must have the right FORM. If g(t) is an exponential, your guess should be exponential. If g(t) is a polynomial, your guess should be polynomial.

When Your Guess Goes Wrong: Resonance

Critical Rule
If your initial guess is already in $y_c$, it will NOT work! You MUST multiply by $t$ (or $t^2$ if still overlapping).
Modification Rules:
?
NORMAL (No overlap with $y_c$)
y_p = Ae^{\alpha t}
SINGLE RESONANCE (Guess is in $y_c$)
y_p = Ate^{\alpha t} \quad \text{(multiply by } t \text{)}
⚠⚠
DOUBLE RESONANCE (Both $e^{\alpha t}$ and $te^{\alpha t}$ in $y_c$)
y_p = At^2e^{\alpha t} \quad \text{(multiply by } t^2 \text{)}
Key Insight
This is the SINGLE MOST IMPORTANT concept students miss! Always check whether your guess is in $y_c$ before substituting.

Example 1: Polynomial Forcing

Problem: Solve $y'' - 5y' + 6y = 2t$
STEP 1: Find $y_c$
r^2 - 5r + 6 = 0 \Rightarrow (r-2)(r-3) = 0 \Rightarrow r_1=2, r_2=3
y_c = C_1e^{2t} + C_2e^{3t}
STEP 2: Guess $y_p$ (g(t) is degree 1 polynomial)
y_p = At + B \quad \text{(include constant term!)}
Overlap check: $At + B$ is NOT in $y_c$ ✓
STEP 3: Substitute & solve
y_p' = A, \quad y_p'' = 0
0 - 5A + 6(At + B) = 2t
6At + (6B - 5A) = 2t
Matching: $6A = 2 \Rightarrow A = 1/3$, and $6B - 5A = 0 \Rightarrow B = 5/18$
y = C_1e^{2t} + C_2e^{3t} + \frac{1}{3}t + \frac{5}{18}

Example 2: Exponential (No Overlap)

Problem: Solve $y'' - 7y' + 12y = 4e^{2t}$
STEP 1: Find $y_c$
r^2 - 7r + 12 = 0 \Rightarrow r = 3, 4
y_c = C_1e^{3t} + C_2e^{4t}
STEP 2: Guess $y_p$ (g(t) is $e^{2t}$)
y_p = Ae^{2t}
Overlap check: $e^{2t}$ is NOT in $y_c$ (we have $e^{3t}$ and $e^{4t}$) ✓
STEP 3: Substitute & solve
y_p'' - 7y_p' + 12y_p = 4Ae^{2t} - 7(2A)e^{2t} + 12Ae^{2t} = 4e^{2t}
(4A - 14A + 12A)e^{2t} = 4e^{2t} \Rightarrow 2A = 4 \Rightarrow A = 2
y = C_1e^{3t} + C_2e^{4t} + 2e^{2t}

Example 3: Exponential with Resonance!

Problem: Solve $y'' - 7y' + 12y = 5e^{4t}$
STEP 1: Find $y_c$
y_c = C_1e^{3t} + C_2e^{4t}
STEP 2: Initial guess?
⚠ PROBLEM: If we try $y_p = Ae^{4t}$, this is already in $y_c$! RESONANCE!
y_p = Ate^{4t} \quad \text{(multiply by } t \text{)}
STEP 3: Substitute the modified guess
y_p = Ate^{4t} \Rightarrow y_p' = Ae^{4t} + 4Ate^{4t} \Rightarrow y_p'' = 8Ae^{4t} + 16Ate^{4t}
Substituting into ODE and simplifying (many terms cancel), we get: $2Ae^{4t} = 5e^{4t} \Rightarrow A = 5/2$
y = C_1e^{3t} + C_2e^{4t} + \frac{5}{2}te^{4t}
Physical Meaning
The $te^{4t}$ term grows linearly with time! This represents resonance — the forcing frequency matches a natural frequency of the system.

Example 4: Double Resonance

Problem: Solve $y'' - 8y' + 16y = 2e^{4t}$
STEP 1: Find $y_c$
r^2 - 8r + 16 = 0 \Rightarrow (r-4)^2 = 0 \Rightarrow r = 4 \text{ (double)}
y_c = (C_1 + C_2t)e^{4t}
STEP 2: Initial guess?
⚠ PROBLEM: $e^{4t}$ AND $te^{4t}$ are BOTH in $y_c$! NEED $t^2$!
y_p = At^2e^{4t} \quad \text{(multiply by } t^2 \text{)}
STEP 3: Substitute & solve
After computing derivatives and substituting:
2Ae^{4t} = 2e^{4t} \Rightarrow A = 1
y = (C_1 + C_2t + t^2)e^{4t}

Example 5: Trigonometric Forcing

Problem: Solve $y'' - 2y' + y = 5\cos(2t) + 10\sin(2t)$
STEP 1: Find $y_c$
r^2 - 2r + 1 = 0 \Rightarrow (r-1)^2 = 0
y_c = (C_1 + C_2t)e^t
STEP 2: Guess $y_p$ (g(t) has sin and cos at frequency $\omega=2$)
y_p = A\cos(2t) + B\sin(2t)
Overlap check: This is NOT in $y_c$ (which involves $e^t$, not trig functions) ✓
STEP 3: Substitute & solve
$y_p' = -2A\sin(2t) + 2B\cos(2t)$
$y_p'' = -4A\cos(2t) - 4B\sin(2t)$
Substituting and collecting cos/sin terms gives system:
-3A - 4B = 5 \quad \text{and} \quad 4A - 3B = 10
Solving: $A = 1, B = -2$
y = (C_1 + C_2t)e^t + \cos(2t) - 2\sin(2t)

Example 6: Trigonometric Resonance!

Problem: Solve $y'' + 4y = 8\cos(2t)$
STEP 1: Find $y_c$
r^2 + 4 = 0 \Rightarrow r = \pm 2i
y_c = C_1\cos(2t) + C_2\sin(2t)
STEP 2: Initial guess?
⚠ PROBLEM: $\cos(2t)$ and $\sin(2t)$ are already in $y_c$! RESONANCE!
y_p = t[A\cos(2t) + B\sin(2t)] \quad \text{(multiply by } t \text{)}
STEP 3: Substitute & solve
After derivatives and substitution, the $y_p$ and $y_p''$ terms cancel (resonance magic!), leaving:
-4A\sin(2t) + 4B\cos(2t) = 8\cos(2t)
Thus: $A = 0, B = 2$
y = C_1\cos(2t) + C_2\sin(2t) + 2t\sin(2t)
Physical Resonance
The amplitude of oscillation grows linearly with time ($2t$ multiplier)! This is true resonance — the driving force matches the natural oscillation frequency. Eventually the system will break or saturate!

Handling Multiple Terms: Superposition

Superposition Principle
If $g(t) = g_1(t) + g_2(t)$, find $y_{p1}$ and $y_{p2}$ separately, then add them:
y_p = y_{p1} + y_{p2}
Example: $y'' - 4y' = te^t + \cos(2t)$
STEP 1: Find $y_c$
r^2 - 4r = 0 \Rightarrow r(r-4) = 0 \Rightarrow r=0, 4
y_c = C_1 + C_2e^{4t}
STEP 2: Split into two problems
Problem 1: $y'' - 4y' = te^t$
Guess: $y_{p1} = (At + B)e^t$ (polynomial × exponential)
Problem 2: $y'' - 4y' = \cos(2t)$
Guess: $y_{p2} = A\cos(2t) + B\sin(2t)$ (trig functions)
STEP 3: Solve each separately, then combine
y_p = y_{p1} + y_{p2}

Decision Flowchart: What to Guess?

START: Look at g(t). What is its form?
Polynomial (degree n)

Guess: $A_n t^n + \cdots + A_0$
Exponential $e^{\alpha t}$

Guess: $Ae^{\alpha t}$
Trigonometric sin/cos

Guess: $A\cos + B\sin$
CHECK: Is your guess already in $y_c$?
NO

Use your guess as-is and substitute
YES

Multiply by $t$ (or $t^2$ if still overlapping)
SUBSTITUTE $y_p$ into ODE: $ay_p'' + by_p' + cy_p = g(t)$
MATCH COEFFICIENTS and solve for unknowns (A, B, etc.)
DONE! Your particular solution is $y_p$. General: $y = y_c + y_p$

Pitfalls to Avoid

Mistake 1: Incomplete Guesses for Polynomials

Mistake 2: Forgetting the Resonance Check

Mistake 3: Missing Both Sin and Cos

Mistake 4: Solving the ODE First Without $y_c$

Key Takeaways: Quick Reference

Polynomial

g(t) = polynomial of degree n

Guess: $A_n t^n + A_{n-1}t^{n-1} + \cdots + A_0$

Include ALL terms!

Exponential

g(t) = $K e^{\alpha t}$

Guess: $Ae^{\alpha t}$

If $e^{\alpha t} \in y_c$: multiply by $t$

Trigonometric

g(t) = sin/cos at $\omega$

Guess: $A\cos(\omega t) + B\sin(\omega t)$

Use BOTH functions!

Combination

g(t) = sum of above types

Use SUPERPOSITION: solve each part, add results

Works because ODE is linear
When This Method FAILS
This method only works for "nice" g(t): polynomials, exponentials, sines, cosines, and products. For g(t) like $\tan(t)$, $\ln(t)$, $1/t$, or other transcendental functions, use Variation of Parameters (next lecture!).
The Golden Rules
🔊 Voice