01 / 21
\(A?\;B?\)

Undetermined
Coefficients

Master the method for finding particular solutions to nonhomogeneous linear ODEs by guessing the right form and solving for unknown constants.

Differential Equations

What Is a Nonhomogeneous ODE?

A second-order linear ODE with constant coefficients has the general form:

When \( g(t) = 0 \), the equation is homogeneous. When \( g(t) \neq 0 \), it is nonhomogeneous: some external forcing function drives the system.

Homogeneous
\( y'' + 4y = 0 \)
No forcing: \( g(t) = 0 \)
Nonhomogeneous
\( y'' + 4y = 3e^{2t} \)
External drive: \( g(t) = 3e^{2t} \)

Structure of the General Solution

The general solution to a nonhomogeneous equation has two parts:

\( y_c \) : Complementary
General solution of the homogeneous equation \( ay'' + by' + cy = 0 \). Contains arbitrary constants \( C_1, C_2 \).
\( y_p \) : Particular
Any single solution of the full nonhomogeneous equation. No arbitrary constants: it captures the forcing.

The Big Idea: Guess and Solve

Certain forcing functions \( g(t) \) reproduce their own form under differentiation: polynomials, exponentials, and sines/cosines. We exploit this by guessing a particular solution of the same type, then determining the coefficients.

\( g(t) \) known
Guess \( y_p \)
same form
Solve for
\( A, B, \ldots \)
Forcing function Trial solution Coefficients

Which \( g(t) \) Works?

Undetermined coefficients applies only when \( g(t) \) is a finite linear combination of these families:

Polynomials
\( t^n \), e.g. \( 5t^2 - 3t + 7 \)
Exponentials
\( e^{\alpha t} \), e.g. \( 4e^{-2t} \)
Sines / Cosines
\( \sin(\beta t),\;\cos(\beta t) \)

The Guess Table

Match the form of \( g(t) \) to your trial particular solution \( Y_p \):

Forcing \( g(t) \) Trial \( Y_p \)
\( P_n(t) \) (degree \( n \) poly) \( A_n t^n + \cdots + A_1 t + A_0 \)
\( P_n(t)\,e^{\alpha t} \) \( (A_n t^n + \cdots + A_0)\,e^{\alpha t} \)
\( P_n(t)\,e^{\alpha t}\cos\beta t \) or \( \sin\beta t \) \( e^{\alpha t}[(A_n t^n + \cdots + A_0)\cos\beta t + (B_n t^n + \cdots + B_0)\sin\beta t] \)

The Modification Rule

If any term in your trial \( Y_p \) is already a solution of the homogeneous equation \( y_c \), the guess will fail (you will get \( 0 = \text{nonzero} \)).

Example
\( y'' - 3y' = 5e^{3t} \). The complementary solution contains \( e^{3t} \), so guess \( Y_p = A\,\color{#fbbf24}{t}\,e^{3t} \) instead of \( Ae^{3t} \).
Repeated root
If \( e^{3t} \) and \( te^{3t} \) are both in \( y_c \), multiply by \( t^2 \): guess \( Y_p = A\,t^2\,e^{3t} \).

Undetermined Coefficients vs Variation of Parameters

Undetermined Coeff. Variation of Params.
Applies to Polynomials, exponentials, sin/cos Any continuous \( g(t) \)
Coefficient type Constant coefficients only Variable coefficients OK
Difficulty Algebraic (easier) Integral-based (harder)
Strategy Guess form, solve for constants Replace constants in \( y_c \) with functions

How to Apply the Method

1
Solve the homogeneous equation \( ay'' + by' + cy = 0 \) to find the complementary solution \( y_c \).
2
Identify \( g(t) \) and look up the corresponding trial form from the guess table.
3
Check for overlap with \( y_c \). If any term in the trial duplicates \( y_c \), multiply by \( t^s \).
4
Substitute \( Y_p \) (and its derivatives) into the ODE. Equate like terms to get a system of equations for the unknown coefficients.
5
Solve the system and write the general solution \( y = y_c + y_p \).

Example 1: Exponential Forcing

1
Homogeneous: \( r^2 - 3r + 2 = 0 \Rightarrow r = 1, 2 \). So \( y_c = C_1 e^t + C_2 e^{2t} \).
2
Guess: \( g(t) = 4e^{5t} \). Trial: \( Y_p = Ae^{5t} \). No overlap with \( y_c \).
3
Substitute: \( Y_p' = 5Ae^{5t},\; Y_p'' = 25Ae^{5t} \). Plug in: \( 25A - 15A + 2A = 4 \Rightarrow 12A = 4 \).
4
Result: \( A = \frac{1}{3} \). So \( y_p = \frac{1}{3}e^{5t} \) and \( y = C_1 e^t + C_2 e^{2t} + \frac{1}{3}e^{5t} \).

Example 2: Polynomial Forcing

1
Homogeneous: \( r^2 + 1 = 0 \Rightarrow r = \pm i \). So \( y_c = C_1 \cos t + C_2 \sin t \).
2
Guess: \( g(t) = 3t^2 + 1 \) (degree 2 polynomial). Trial: \( Y_p = At^2 + Bt + C \). No overlap.
3
Substitute: \( Y_p'' = 2A \). So \( 2A + At^2 + Bt + C = 3t^2 + 1 \).
4
Equate: \( t^2: A = 3 \), \( t^1: B = 0 \), \( t^0: 2A + C = 1 \Rightarrow C = -5 \).

Example 3: Trigonometric Forcing

1
Homogeneous: \( r^2 + 4 = 0 \Rightarrow r = \pm 2i \). So \( y_c = C_1 \cos 2t + C_2 \sin 2t \).
2
Guess: \( g(t) = \sin 3t \). Trial: \( Y_p = A\cos 3t + B\sin 3t \). No overlap (\( \beta = 3 \neq 2 \)).
3
Substitute: \( Y_p'' = -9A\cos 3t - 9B\sin 3t \). Plug in: \( (-9A + 4A)\cos 3t + (-9B + 4B)\sin 3t = \sin 3t \).
4
Equate: \( -5A = 0 \Rightarrow A = 0 \), \( -5B = 1 \Rightarrow B = -\frac{1}{5} \). So \( y_p = -\frac{1}{5}\sin 3t \).

Example 4: Modification Rule in Action

1
Homogeneous: \( (r-1)^2 = 0 \Rightarrow r = 1 \) (repeated). So \( y_c = C_1 e^t + C_2 te^t \).
2
Overlap! Both \( e^t \) and \( te^t \) are in \( y_c \). Multiply by \( t^2 \): guess \( Y_p = At^2 e^t \).
3
Substitute and simplify. After computing \( Y_p', Y_p'' \) and plugging in, all lower-order terms cancel, leaving \( 2Ae^t = e^t \).
4
Result: \( A = \frac{1}{2} \). General solution: \( y = C_1 e^t + C_2 te^t + \frac{1}{2}t^2 e^t \).

Superposition: Combined \( g(t) \)

When \( g(t) \) is a sum of different types, find a particular solution for each piece separately and add them.

Piece 1
For \( 3e^{4t} \): guess \( Y_{p1} = Ae^{4t} \)
Piece 2
For \( 5t \): guess \( Y_{p2} = Bt + C \)

Common Mistakes to Avoid

✕ Missing sine or cosine
If \( g(t) = \sin 3t \), you must guess both \( A\cos 3t + B\sin 3t \). Omitting one leads to an inconsistent system.
✕ Forgetting the modification
If a term in your guess duplicates \( y_c \), you will get \( 0 = \text{nonzero} \). Always check overlap before substituting.
✕ Wrong polynomial degree
For \( g(t) = 5t^2 \), you need all terms \( At^2 + Bt + C \), not just \( At^2 \). Differentiation creates lower-degree terms.

Quick Reference Summary

\( g(t) \) Form Trial \( Y_p \) If Overlap?
\( ke^{\alpha t} \) \( Ae^{\alpha t} \) Multiply by \( t^s \)
\( k\sin\beta t \) or \( k\cos\beta t \) \( A\cos\beta t + B\sin\beta t \) Multiply by \( t^s \)
\( a_n t^n + \cdots + a_0 \) \( A_n t^n + \cdots + A_0 \) Multiply by \( t^s \)
\( t^n e^{\alpha t}\sin\beta t \) \( e^{\alpha t}[\text{poly}\cdot\cos\beta t + \text{poly}\cdot\sin\beta t] \) Multiply by \( t^s \)
\( \ln t,\; \tan t,\; 1/t \) Use Variation of Parameters

Question 1 of 5

What is the correct trial particular solution for
\( y'' + 9y = 5\cos(3t) \)
given that \( y_c = C_1\cos 3t + C_2\sin 3t \)?

Question 2 of 5

For the equation \( y'' - 4y = 8t^2 + 3 \), which trial form should you use for \( Y_p \)?

Question 3 of 5

Solve: \( y'' + y' - 2y = 6e^{t} \). Which value of the undetermined coefficient \( A \) satisfies the equation if \( Y_p = Ate^{t} \)?

Question 4 of 5

For which forcing function is the method of undetermined coefficients not applicable?

Question 5 of 5

For the equation \( y'' - y = e^{t} + e^{-t} \), the complementary solution is \( y_c = C_1 e^t + C_2 e^{-t} \). What is the correct trial for \( y_p \)?