Undetermined Coefficients: How to Choose the Correct Particular Solution

Differential Equations • Woody Calculus Flagship Lesson

The method of undetermined coefficients finds a particular solution by matching the trial function to the forcing term, then modifying that trial if it overlaps with the homogeneous solution. The central skill is not taking derivatives—it is choosing the correct form of \(y_p\) before the algebra begins.

Direct Answer • The 4-Move Version

  1. Find the homogeneous solution first.
    Solve the associated equation with right side zero and write \(y_h\), also called the complementary solution \(y_c\).
  2. Match the family of the forcing term.
    Polynomial forcing suggests a complete polynomial trial; exponential forcing suggests an exponential trial; sine or cosine forcing suggests both sine and cosine.
  3. Check for overlap with \(y_h\).
    If any trial component already appears in the homogeneous solution, multiply that entire component by the smallest power \(t^s\) that removes the duplication.
  4. Substitute and match coefficients.
    Differentiate the corrected trial, substitute it into the differential equation, solve for the unknown constants, and then write \(y=y_h+y_p\).

In plain English:
these four moves compress the full 10-step algorithm: choose the complete function family, check every component for overlap with the homogeneous solution, multiply only the overlapping components by the required power of \(t\), and then substitute and match coefficients.

\[
a_n y^{(n)}+\cdots+a_1y^{\prime}+a_0y=g(t),
\qquad
y=y_h+y_p.
\]

What Is the Method of Undetermined Coefficients?

The method of undetermined coefficients is a structured trial-and-substitution method for finding one particular solution of a nonhomogeneous linear differential equation.
The coefficients in the trial are initially unknown—undetermined—and are found by substitution.

Start with a nonhomogeneous equation such as

\[
ay^{\prime\prime}+by^{\prime}+cy=g(t),
\qquad a\ne0.
\]

The associated homogeneous equation is

\[
ay^{\prime\prime}+by^{\prime}+cy=0.
\]

If \(y_h\) is the general homogeneous solution and \(y_p\) is any one particular solution of the nonhomogeneous equation, then

\[
\boxed{y=y_h+y_p}.
\]
Vocabulary

Homogeneous solution \(y_h\): the general solution of the equation obtained by replacing \(g(t)\) with zero. Many textbooks call this the complementary solution or complementary function and write \(y_c\).

Particular solution \(y_p\): one specific solution of the nonhomogeneous equation that contains no arbitrary constants.

Forcing term \(g(t)\): the nonzero input on the right side of the differential equation.

Notice the wording: we seek a particular solution, not the particular solution. If \(y_p\) works, then adding any homogeneous solution produces another actual particular solution. The general solution is organized cleanly as \(y=y_h+y_p\).

Notation Note

This lesson uses \(t\) as the independent variable because many Differential Equations courses model time. Other textbooks use \(x\). Nothing in the method changes: \(y_p(t)\) and \(y_p(x)\) follow the same trial-family and overlap rules.

When Can You Use Undetermined Coefficients?

The standard method works best for linear differential equations with constant coefficients when the forcing term is built from polynomials, exponentials, sines, cosines, and finite sums or products of those functions.

Method-recognition table
Equation or forcing term Use undetermined coefficients? Reason
\(y^{\prime\prime}-3y^{\prime}+2y=t^2e^t\) Yes Linear, constant coefficients, and the forcing is polynomial times exponential.
\(y^{\prime\prime}+4y=\sin 3t\) Yes Linear, constant coefficients, and the forcing is trigonometric.
\(y^{\prime\prime}+y=\ln t\) No, not directly \(\ln t\) is not in the standard closed family used by the method.
\(y^{\prime\prime}+y=\dfrac1t\) No, not directly The forcing is not a finite polynomial-exponential-trigonometric combination.
\(t^2y^{\prime\prime}+ty^{\prime}-y=t^3\) Not by the standard version The coefficients depend on \(t\); this is a variable-coefficient equation.
Piecewise or impulse forcing in an IVP Usually choose another method Laplace transforms are often more efficient for discontinuous inputs and initial conditions.
Structural Test

The method works because repeated differentiation keeps polynomials, exponentials, sines, and cosines inside a finite-dimensional family. Coefficient matching is valid because the functions \(t^k e^{\alpha t}\cos(\beta t)\) and \(t^k e^{\alpha t}\sin(\beta t)\), with the relevant degrees and frequencies, are linearly independent.

When the forcing term falls outside this family, compare with
the Second-Order Differential Equations Help hub, including its variation-of-parameters guidance,
Laplace transforms,
or
power-series methods.

Why Should You Solve the Homogeneous Equation First?

You solve the homogeneous equation first because the trial suggested by \(g(t)\) may already be contained in \(y_h\).
If that happens, the initial trial is annihilated by the left-side differential operator and cannot produce the nonzero forcing term.

For example, consider

\[
y^{\prime\prime}-3y^{\prime}+2y=g(t).
\]

The characteristic equation is

\[
r^2-3r+2=(r-1)(r-2)=0,
\]

so

\[
y_h=C_1e^t+C_2e^{2t}.
\]

If the forcing later turns out to be \(e^t\), the ordinary exponential guess \(Ae^t\) is already part of \(y_h\). Knowing \(y_h\) in advance prevents a failed substitution and tells us to multiply the trial by \(t\).

Exam warning:
do not apply initial conditions to \(y_h\) before finding \(y_p\). Initial conditions belong to the complete nonhomogeneous solution \(y=y_h+y_p\).

How Does the Forcing Term Determine the Trial Solution?

Choose a trial family that is closed under the derivatives appearing in the differential equation.
Include every term that differentiation can generate.

Polynomial forcing

If

\[
g(t)=3t^2-2,
\]

use the complete quadratic trial

\[
\boxed{y_p=At^2+Bt+C}.
\]

The missing linear term in \(g(t)\) does not justify omitting \(Bt\). Differentiation and substitution can create lower-degree terms, so the complete polynomial is required.

Exponential forcing

If \(g(t)=e^{at}\), use

\[
\boxed{y_p=Ae^{at}}.
\]

Every derivative remains a constant multiple of \(e^{at}\).

Sine or cosine forcing

If the forcing contains \(\sin bt\) or \(\cos bt\), the safe standard trial is

\[
\boxed{y_p=A\cos bt+B\sin bt}.
\]

Differentiation mixes sine and cosine. In a special equation containing only even derivatives, a smaller trial may sometimes work, but the complete sine-cosine pair is the reliable general rule; an unnecessary coefficient will simply become zero.

Product forcing

If \(g(t)\) is a product, multiply the corresponding trial families. For example,

\[
g(t)=te^{3t}\cos4t
\quad\Longrightarrow\quad
y_p=e^{3t}\Big[(At+B)\cos4t+(Ct+D)\sin4t\Big].
\]

Woody Calculus Master \(y_p\) Guess Table

Use this table to build the initial trial \(Y(t)\), then perform the overlap check against \(y_h\).
The final trial is \(y_p=t^sY(t)\) only when multiplication by \(t^s\) is required.

Master trial particular-solution table
Forcing term \(g(t)\) Initial trial \(Y(t)\) What must be included?
Constant \(K\) \(A\) One unknown constant.
Linear polynomial, such as \(4t+3\) \(At+B\) Both the linear and constant terms.
Quadratic polynomial, such as \(2t^2-5\) \(At^2+Bt+C\) Every power from the highest degree down to the constant term.
Degree-\(n\) polynomial \(P_n(t)\) \(Q_n(t)=A_nt^n+\cdots+A_1t+A_0\) A complete polynomial of the same degree.
\(\sin bt\) or \(\cos bt\) \(A\cos bt+B\sin bt\) Both trigonometric partners.
\(e^{at}\) \(Ae^{at}\) The same exponential factor.
\(P_n(t)e^{at}\) \(e^{at}Q_n(t)\) A complete degree-\(n\) polynomial multiplying the exponential.
\(e^{at}\sin bt\) or \(e^{at}\cos bt\) \(e^{at}(A\cos bt+B\sin bt)\) The exponential and both trigonometric partners.
\(P_n(t)\sin bt\) or \(P_n(t)\cos bt\) \(Q_n(t)\cos bt+R_n(t)\sin bt\) Two complete degree-\(n\) polynomials.
\(P_n(t)e^{at}\sin bt\) or \(P_n(t)e^{at}\cos bt\) \(e^{at}[Q_n(t)\cos bt+R_n(t)\sin bt]\) The complete polynomial-exponential-trigonometric family.
A finite sum \(g_1(t)+\cdots+g_m(t)\) \(Y_1(t)+\cdots+Y_m(t)\) Build a separate trial component for each forcing component.
Any trial component that overlaps with \(y_h\) \(t^sY(t)\) Multiply only the affected component by the smallest power that removes duplication.
General Compact Formula

For a forcing component of the form

\[
P_n(t)e^{\alpha t}\cos(\beta t)
\quad\text{or}\quad
P_n(t)e^{\alpha t}\sin(\beta t),
\]

start with

\[
Y(t)=e^{\alpha t}
\Big[Q_n(t)\cos(\beta t)+R_n(t)\sin(\beta t)\Big].
\]

If \(\alpha+i\beta\) is a characteristic root of multiplicity \(s\), use

\[
\boxed{
y_p=t^s e^{\alpha t}
\Big[Q_n(t)\cos(\beta t)+R_n(t)\sin(\beta t)\Big].
}
\]

The cases \(\beta=0\) and \(\alpha=0\) automatically include exponential-polynomial, pure polynomial, and pure trigonometric forcing.

Concrete Trial Builder Examples

Woody Calculus original trial-builder examples
Given \(g(t)\) Initial trial \(Y(t)\)
\(1\) \(A\)
\(4t+3\) \(At+B\)
\(2t^2-5\) \(At^2+Bt+C\)
\(t^3+2t-7\) \(At^3+Bt^2+Ct+D\)
\(\sin6t\) or \(\cos6t\) \(A\cos6t+B\sin6t\)
\(e^{2t}\) \(Ae^{2t}\)
\((7t-1)e^{2t}\) \((At+B)e^{2t}\)
\(t^2e^{2t}\) \((At^2+Bt+C)e^{2t}\)
\(e^{4t}\sin6t\) \(e^{4t}(A\cos6t+B\sin6t)\)
\(3t^2\sin6t\) \((At^2+Bt+C)\cos6t+(Dt^2+Et+F)\sin6t\)
\(te^{4t}\cos6t\) \(e^{4t}[(At+B)\cos6t+(Ct+D)\sin6t]\)
The table gives the initial trial—not always the final trial.
You must still compare the entire trial component with \(y_h\). The overlap check is what determines whether an extra factor of \(t^s\) is required.

Wrong Trial vs. Correct Product Trial

A correct product trial includes every function that differentiation can produce. These side-by-side comparisons show the omissions that most often cost points.

Polynomial × exponential

Incomplete: \(Ate^{2t}\)

\[
\boxed{Y(t)=(At+B)e^{2t}}
\]

The missing constant term is generated when the polynomial factor is differentiated.

Exponential × trigonometric

Incomplete: \(Ae^{4t}\sin6t\)

\[
\boxed{Y(t)=e^{4t}(A\cos6t+B\sin6t)}
\]

Differentiation mixes sine and cosine, so both partners are required.

Polynomial × trigonometric

Incomplete: \((At^2+Bt+C)\sin6t\)

\[
\boxed{Y(t)=(At^2+Bt+C)\cos6t+(Dt^2+Et+F)\sin6t}
\]

Each trigonometric partner needs its own complete polynomial.

Polynomial × exponential × trigonometric

Incomplete: \(Ate^{4t}\cos6t\)

\[
\boxed{Y(t)=e^{4t}[(At+B)\cos6t+(Ct+D)\sin6t]}
\]

Multiply all three complete families together before checking overlap.

The letters \(A,B,C,\ldots\) are merely unknown constants. Their names do not matter; the function family and polynomial degrees are what matter.

Worked Example 1: Polynomial Forcing

For polynomial forcing, use a complete polynomial of the same degree and solve for its coefficients.

Solve

\[
y^{\prime\prime}-y=t^2.
\]
Step 1: Find the homogeneous solution.
\[
r^2-1=0
\quad\Longrightarrow\quad
r=\pm1,
\]

so

\[
y_h=C_1e^t+C_2e^{-t}.
\]
Step 2: Choose the trial.

Because \(g(t)=t^2\), use

\[
y_p=At^2+Bt+C.
\]

Then

\[
y_p^{\prime}=2At+B,
\qquad
y_p^{\prime\prime}=2A.
\]
Step 3: Substitute and match coefficients.
\[
2A-(At^2+Bt+C)=t^2.
\]

Matching coefficients gives

\[
-A=1,
\qquad
-B=0,
\qquad
2A-C=0.
\]

Therefore

\[
A=-1,
\qquad B=0,
\qquad C=-2,
\]

and

\[
y_p=-t^2-2.
\]

The general solution is

\[
\boxed{
y=C_1e^t+C_2e^{-t}-t^2-2.
}
\]
Verification:

For \(y_p=-t^2-2\), we have \(y_p^{\prime\prime}=-2\), so

\[
y_p^{\prime\prime}-y_p=-2-(-t^2-2)=t^2.
\]

Worked Example 2: Exponential Forcing

For exponential forcing, use the same exponential unless it already belongs to the homogeneous solution.

Solve

\[
y^{\prime\prime}-3y^{\prime}+2y=e^{3t}.
\]

The characteristic equation gives roots \(1\) and \(2\), so

\[
y_h=C_1e^t+C_2e^{2t}.
\]

The forcing suggests

\[
y_p=Ae^{3t}.
\]

Because \(e^{3t}\) does not appear in \(y_h\), no multiplication by \(t\) is needed. Differentiate and substitute:

\[
9Ae^{3t}-9Ae^{3t}+2Ae^{3t}=e^{3t}.
\]

Thus \(2A=1\), so \(A=\frac12\). Therefore

\[
\boxed{
y=C_1e^t+C_2e^{2t}+\frac12e^{3t}.
}
\]

Worked Example 3: Trigonometric Forcing

For sine or cosine forcing, use both sine and cosine in the trial so differentiation has room to mix the pair.

Solve

\[
y^{\prime\prime}+2y^{\prime}+5y=\cos t.
\]

The characteristic roots are \(-1\pm2i\), so

\[
y_h=e^{-t}(C_1\cos2t+C_2\sin2t).
\]

Use the trial

\[
y_p=A\cos t+B\sin t.
\]

Then

\[
y_p^{\prime}=-A\sin t+B\cos t,
\qquad
y_p^{\prime\prime}=-A\cos t-B\sin t.
\]

Substitution yields

\[
(4A+2B)\cos t+(-2A+4B)\sin t=\cos t.
\]

Match coefficients:

\[
4A+2B=1,
\qquad
-2A+4B=0.
\]

Solving gives \(A=\frac15\) and \(B=\frac1{10}\). Hence

\[
\boxed{
y=e^{-t}(C_1\cos2t+C_2\sin2t)
+\frac15\cos t+\frac1{10}\sin t.
}
\]
Why both terms mattered:
even though the forcing contained only \(\cos t\), the \(2y^{\prime}\) term produced both sine and cosine during substitution.

Advanced Shortcut: Use Complex Exponentials for Cosine and Sine Forcing

For exponential–trigonometric forcing, complex notation can replace a two-equation sine–cosine coefficient system with one complex calculation.
This shortcut is optional, but it is elegant and especially useful in advanced Differential Equations courses.

Let \(D=\dfrac{d}{dt}\). If the constant-coefficient operator is \(L=p(D)\), then \(p(r)\) is its characteristic polynomial. Write

\[
\lambda=\alpha+i\beta
\]

and solve the complex equation

\[
L[z]=e^{\lambda t}.
\]

If \(p(\lambda)\ne0\), then

\[
z_p=\frac{e^{\lambda t}}{p(\lambda)}.
\]
Recover the Real Forcing

For forcing \(e^{\alpha t}\cos(\beta t)\), use \(y_p=\operatorname{Re}(z_p)\). For forcing \(e^{\alpha t}\sin(\beta t)\), use \(y_p=\operatorname{Im}(z_p)\).

Recover Worked Example 3 in One Calculation

For \(L=D^2+2D+5\) and forcing \(\cos t\), use \(\lambda=i\):

\[
p(i)=i^2+2i+5=4+2i,
\qquad
\frac1{4+2i}=\frac15-\frac1{10}i.
\]
\[
z_p=\left(\frac15-\frac1{10}i\right)e^{it}.
\]

Taking the real part gives

\[
\boxed{y_p=\frac15\cos t+\frac1{10}\sin t},
\]

exactly matching the coefficient-comparison solution.

Resonant Complex Formula

If \(p(\lambda)=0\) and \(\lambda\) has multiplicity \(s\), the operator identity proved below gives

\[
\boxed{
z_p=\frac{t^s e^{\lambda t}}{p^{(s)}(\lambda)}
}.
\]

Take the real part for cosine forcing and the imaginary part for sine forcing. Here \(s\) is the multiplicity of the individual root \(\lambda\), not the number of roots in the conjugate pair.

What Happens When the Trial Overlaps With \(y_h\)?

If the normal trial is already contained in the homogeneous solution, it cannot produce the nonzero forcing term.
Multiply the entire overlapping trial component by \(t\), then check again.

Consider

\[
y^{\prime\prime}-3y^{\prime}+2y=e^t.
\]

The homogeneous solution is

\[
y_h=C_1e^t+C_2e^{2t}.
\]

The table suggests \(Ae^t\), but \(e^t\) already appears in \(y_h\). Therefore the corrected trial is

\[
\boxed{y_p=Ate^t}.
\]

Differentiate:

\[
y_p^{\prime}=A(t+1)e^t,
\qquad
y_p^{\prime\prime}=A(t+2)e^t.
\]

Substitute:

\[
A\big[(t+2)-3(t+1)+2t\big]e^t=e^t.
\]

The bracket simplifies to \(-1\), so \(-A=1\) and \(A=-1\). Thus

\[
y_p=-te^t.
\]

The general solution is

\[
\boxed{
y=C_1e^t+C_2e^{2t}-te^t.
}
\]

Why Does Multiplying by \(t\) Work?

The power of \(t\) is controlled exactly by characteristic-root multiplicity.
The cleanest proof comes from differentiating the exponential identity for the differential operator.

Let \(D=\dfrac{d}{dt}\), and let \(L=p(D)\) be a constant-coefficient differential operator with characteristic polynomial \(p(r)\). For every complex number \(r\),

\[
L[e^{rt}]=p(r)e^{rt}.
\]

Differentiating once with respect to the parameter \(r\) gives

\[
L[te^{rt}]=p^{\prime}(r)e^{rt}+p(r)te^{rt}.
\]

If \(r=r_0\) is a characteristic root, then \(p(r_0)=0\), so

\[
\boxed{L[te^{r_0t}]=p^{\prime}(r_0)e^{r_0t}}.
\]

To obtain the full multiplicity rule, differentiate the identity \(s\) times:

\[
L[t^s e^{rt}]
=
\frac{d^s}{dr^s}\!\left(p(r)e^{rt}\right)
=
e^{rt}\sum_{k=0}^{s}\binom{s}{k}p^{(k)}(r)t^{s-k}.
\]

If \(r_0\) has multiplicity \(s\), then
\(p(r_0)=p^{\prime}(r_0)=\cdots=p^{(s-1)}(r_0)=0\), while \(p^{(s)}(r_0)\ne0\). Therefore every term in the sum vanishes except the one with \(k=s\):

\[
\boxed{
L[t^s e^{r_0t}]=p^{(s)}(r_0)e^{r_0t}
}.
\]
What the Identity Proves

Simple root: if \(p(r_0)=0\) but \(p^{\prime}(r_0)\ne0\), then one power of \(t\) produces a nonzero multiple of \(e^{r_0t}\).

Double root: if \(p(r_0)=p^{\prime}(r_0)=0\) but \(p^{\prime\prime}(r_0)\ne0\), then multiplying by \(t\) is still annihilated, while multiplying by \(t^2\) works.

Multiplicity \(s\): the first nonvanishing derivative of \(p\) at \(r_0\) is the \(s\)-th derivative, so the required multiplier is exactly \(t^s\).

The same identity holds for a complex root \(\lambda=\alpha+i\beta\). For the pure complex forcing \(e^{\lambda t}\), a resonant particular solution is

\[
\boxed{
z_p=\frac{t^s e^{\lambda t}}{p^{(s)}(\lambda)}
}.
\]

Taking real and imaginary parts produces the corresponding cosine and sine trials. This proves the general \(t^s\) overlap rule rather than treating it as a memorized trick.

What Is the General \(t^s\) Overlap Rule?

If a forcing component corresponds to a characteristic root of multiplicity \(s\), multiply that component’s complete normal trial by \(t^s\).

General Overlap Rule

Let \(Y(t)\) be the initial trial chosen from the forcing family. Let \(\lambda=\alpha+i\beta\) be the corresponding characteristic number. If \(\lambda\) is a root of the characteristic polynomial with multiplicity \(s\), use

\[
\boxed{y_p=t^sY(t)}.
\]

If there is no matching characteristic root, set \(s=0\), so \(t^0=1\) and the trial remains unchanged.

A conjugate pair is not automatically a double root.
The numbers \(\alpha+i\beta\) and \(\alpha-i\beta\) are two distinct roots. If the quadratic factor \((r-\alpha)^2+\beta^2\) appears once, each root is simple and \(s=1\). If that quadratic factor is squared, each root has multiplicity \(2\) and \(s=2\).
Characteristic-root multiplicity and the required power of \(t\)
Characteristic-root relationship Required multiplier Example final trial
No matching root \(t^0=1\) \(Ae^{3t}\)
Matching simple real root \(t\) \(Ate^{3t}\)
Matching double real root \(t^2\) \(At^2e^{3t}\)
Simple complex pair: \(((r-\alpha)^2+\beta^2)\) appears once \(t\) \(te^{\alpha t}(A\cos\beta t+B\sin\beta t)\)
Repeated complex pair: \(((r-\alpha)^2+\beta^2)^2\) \(t^2\) \(t^2e^{\alpha t}(A\cos\beta t+B\sin\beta t)\)
Multiply the entire affected component.
For example, if \(e^{3t}(A\cos2t+B\sin2t)\) overlaps, multiply both trigonometric terms by the same power \(t^s\). Do not multiply only one term.

How Does the Annihilator Method Explain the Guess Table?

An annihilator is a differential operator that sends a function family to zero.
Let \(D=\dfrac{d}{dt}\). The annihilator method and undetermined coefficients are two views of the same structure: the annihilator identifies the family of functions that must appear in the trial, while coefficient matching determines the unknown constants.

Common forcing families and their annihilators
Forcing family An annihilator
Degree-\(n\) polynomial \(P_n(t)\) \(D^{n+1}\)
\(e^{at}\) \(D-a\)
\(\cos bt\) or \(\sin bt\) \(D^2+b^2\)
\(P_n(t)e^{at}\) \((D-a)^{n+1}\)
\(e^{at}\cos bt\) or \(e^{at}\sin bt\) \((D-a)^2+b^2\)
\(P_n(t)\cos bt\) or \(P_n(t)\sin bt\) \((D^2+b^2)^{n+1}\)
\(P_n(t)e^{at}\cos bt\) or \(P_n(t)e^{at}\sin bt\) \(\big((D-a)^2+b^2\big)^{n+1}\)

The exponent \(n+1\) appears because each application of the shifted operator lowers the polynomial degree by one. That is why a polynomial multiplier in the forcing requires a complete polynomial of the same degree in the trial.

If \(L(D)y=g(t)\) and \(A(D)g=0\), applying \(A(D)\) gives the higher-order homogeneous equation

\[
A(D)L(D)y=0.
\]

The new characteristic roots reveal the forcing-generated modes. Any modes already present in \(y_h\) are duplicates; the remaining generalized modes determine the corrected trial. In routine calculations, the master guess table is faster, but the annihilator viewpoint explains every row of that table.

Worked Example 4: Repeated Overlap

A double characteristic root requires multiplication by \(t^2\), not merely \(t\).

Solve

\[
y^{\prime\prime}-4y^{\prime}+4y=e^{2t}.
\]

The characteristic equation is

\[
r^2-4r+4=(r-2)^2=0.
\]

Thus \(r=2\) has multiplicity \(2\), and

\[
y_h=(C_1+C_2t)e^{2t}.
\]

The normal guess \(Ae^{2t}\) overlaps. Multiplying once gives \(Ate^{2t}\), which still overlaps. Therefore use

\[
y_p=At^2e^{2t}.
\]

Substitution gives

\[
2Ae^{2t}=e^{2t},
\]

so \(A=\frac12\). Hence

\[
\boxed{
y=(C_1+C_2t)e^{2t}+\frac12t^2e^{2t}.
}
\]
Fast verification:
the operator is \((D-2)^2\). Applying \(D-2\) twice to \(t^2e^{2t}\) produces \(2e^{2t}\), so the coefficient must be \(A=\frac12\).

Worked Example 5: Exponential–Trigonometric Resonance

When the forcing has the same exponential rate and frequency as the homogeneous oscillation, multiply the entire exponential–trigonometric trial by \(t\).

Solve

\[
y^{\prime\prime}-6y^{\prime}+13y=e^{3t}\cos2t.
\]

The characteristic polynomial and roots are

\[
p(r)=r^2-6r+13,
\qquad
r=3\pm2i,
\]

so

\[
y_h=e^{3t}(C_1\cos2t+C_2\sin2t).
\]

The normal trial is exactly the homogeneous family, so the real-form corrected trial is

\[
y_p=te^{3t}(A\cos2t+B\sin2t).
\]
Derive the Coefficients Without a Long Expansion

Use the complex forcing with \(\lambda=3+2i\). This is a simple characteristic root, and

\[
p^{\prime}(r)=2r-6,
\qquad
p^{\prime}(\lambda)=2(3+2i)-6=4i.
\]

The resonant complex formula gives

\[
z_p=\frac{te^{\lambda t}}{p^{\prime}(\lambda)}
=\frac{te^{(3+2i)t}}{4i}
=-\frac{i}{4}te^{(3+2i)t}.
\]

Because the original forcing is the real part of \(e^{(3+2i)t}\), take the real part:

\[
\operatorname{Re}(z_p)
=\frac14te^{3t}\sin2t.
\]

Thus the real-form coefficients are \(A=0\) and \(B=\frac14\).

Therefore

\[
y_p=\frac14te^{3t}\sin2t.
\]

The general solution is

\[
\boxed{
y=e^{3t}(C_1\cos2t+C_2\sin2t)
+\frac14te^{3t}\sin2t.
}
\]

This algebraic overlap is the same structure that appears in
resonance and forced oscillations.

How Do Zero Characteristic Roots Affect Polynomial Forcing?

Polynomial forcing corresponds to the exponential rate \(\alpha=0\), so a zero characteristic root creates overlap.
This is the polynomial version of the same \(t^s\) rule.

Consider

\[
y^{\prime\prime}=1.
\]

The characteristic equation is \(r^2=0\), so \(r=0\) has multiplicity \(2\) and

\[
y_h=C_1+C_2t.
\]

Constant forcing normally suggests \(Y(t)=A\), but \(1=e^{0t}\) is already a homogeneous mode, and the double zero root requires multiplication by \(t^2\):

\[
y_p=At^2.
\]

Since \(y_p^{\prime\prime}=2A\), we need \(2A=1\), so

\[
\boxed{
y=C_1+C_2t+\frac12t^2.
}
\]
Common hidden overlap:
students often check exponential and trigonometric trials against \(y_h\) but forget that polynomial trials can overlap through the characteristic root \(r=0\).

What If the Forcing Term Is a Sum?

Use superposition: build one trial component for each forcing component, modify only the components that overlap, and add the corrected components together.

Consider

\[
y^{\prime\prime}-3y^{\prime}+2y=t+e^t.
\]

The homogeneous solution is

\[
y_h=C_1e^t+C_2e^{2t}.
\]

The polynomial component \(t\) suggests \(At+B\). The exponential component \(e^t\) suggests \(Ce^t\), but that overlaps with \(y_h\), so correct only that component to \(Cte^t\). Use

\[
y_p=At+B+Cte^t.
\]

Substitution gives

\[
A=\frac12,
\qquad
B=\frac34,
\qquad
C=-1.
\]

Therefore

\[
y_p=\frac12t+\frac34-te^t,
\]

and the general solution is

\[
\boxed{
y=C_1e^t+C_2e^{2t}
+\frac12t+\frac34-te^t.
}
\]
Do not multiply an unrelated component by \(t\).
In this example, the exponential component overlaps but the polynomial component does not. Each forcing component gets its own overlap test.

Higher-Order Worked Example: The Same Multiplicity Rule Still Works

Undetermined coefficients is not limited to second-order equations.
The forcing-family and overlap rules apply to any linear constant-coefficient equation.

Solve

\[
y^{\prime\prime\prime}-y^{\prime\prime}-y^{\prime}+y=e^t.
\]

The characteristic polynomial factors as

\[
p(r)=r^3-r^2-r+1=(r-1)^2(r+1),
\]

so

\[
y_h=(C_1+C_2t)e^t+C_3e^{-t}.
\]

The forcing \(e^t\) corresponds to the double characteristic root \(r=1\). Therefore the usual trial \(Ae^t\) must be multiplied by \(t^2\):

\[
y_p=At^2e^t.
\]

Let \(D=\dfrac{d}{dt}\). Because constant-coefficient factors commute, write

\[
L=(D-1)^2(D+1)=(D+1)(D-1)^2.
\]

Now evaluate the factors in the convenient order:

\[
(D-1)[At^2e^t]=2Ate^t,
\]
\[
(D-1)^2[At^2e^t]=2Ae^t,
\]
\[
(D+1)[2Ae^t]=4Ae^t.
\]

Therefore

\[
L[At^2e^t]=4Ae^t.
\]

This also follows immediately from the general identity because \(p^{\prime\prime}(1)=4\). Matching the forcing gives \(4A=1\), so \(A=\frac14\). The general solution is

\[
\boxed{y=(C_1+C_2t)e^t+C_3e^{-t}+\frac14t^2e^t}.
\]

How Do Initial Conditions Fit Into Undetermined Coefficients?

Apply initial conditions only after combining the homogeneous and particular solutions.
The constants \(C_1,C_2,\ldots\) belong to the full solution, not to \(y_h\) by itself.

For the IVP

\[
y^{\prime\prime}-3y^{\prime}+2y=e^{3t},
\qquad
y(0)=0,
\qquad
y^{\prime}(0)=1,
\]

we already found

\[
y=C_1e^t+C_2e^{2t}+\frac12e^{3t}.
\]

The initial conditions give

\[
C_1+C_2=-\frac12,
\qquad
C_1+2C_2=-\frac12.
\]

Thus \(C_2=0\) and \(C_1=-\frac12\). The value \(C_2=0\) is a legitimate outcome—not a sign that a solution mode was omitted. Therefore

\[
\boxed{
y=-\frac12e^t+\frac12e^{3t}.
}
\]

The Canonical 10-Step Undetermined-Coefficients Algorithm

This is the canonical full procedure used by the lesson and by the HowTo schema. The Direct Answer and final cheat sheet are explicitly labeled compressed versions of these 10 steps.

Confirm the equation type.
Verify that the equation is linear and that the standard constant-coefficient method applies.
Solve the associated homogeneous equation.
Find the characteristic roots and write \(y_h\).
Split the forcing term into components.
Separate polynomial, exponential, trigonometric, and sum components.
Use the master table to build the initial trial.
Include complete polynomials and both sine and cosine when required.
Check each component against \(y_h\).
Identify the corresponding characteristic root and its multiplicity.
Multiply overlapping components by \(t^s\).
Use the smallest power that makes the trial linearly independent of the homogeneous family.
Differentiate and substitute.
Keep terms organized by function family and power of \(t\).
Match coefficients.
Solve the resulting algebraic system for the undetermined constants.
Write the complete solution.
Combine the pieces as \(y=y_h+y_p\).
Apply initial conditions and verify.
Use the complete solution for the IVP, then substitute back when practical.
Woody Calculus exam phrase:
choose the family, complete the family, check the overlap, multiply by \(t^s\), then match coefficients.

Undetermined Coefficients vs. Variation of Parameters

Use undetermined coefficients when the forcing has a standard polynomial-exponential-trigonometric form; use variation of parameters when the forcing is more general.

Before applying variation of parameters, divide through by the leading coefficient so the equation is in standard form \(y^{\prime\prime}+P(t)y^{\prime}+Q(t)y=G(t)\). Forgetting this normalization is one of the most common variation-of-parameters errors.

Method comparison
Feature Undetermined coefficients Variation of parameters
Forcing terms Restricted to standard finite polynomial-exponential-trigonometric families. Works for a much broader class of forcing functions.
Coefficient structure Primarily constant-coefficient linear equations. Can be used for more general linear equations once a fundamental homogeneous pair is known.
Main computation Differentiate, substitute, and solve an algebraic system. Compute functions through Wronskians and integrals.
Speed Usually faster when applicable. Usually more labor-intensive but more general.
Best first choice Polynomial, exponential, sine, cosine, and their finite sums/products. \(\ln t\), \(\tan t\), rational forcing, and other nonstandard inputs.

MIT OpenCourseWare describes undetermined coefficients for constant-coefficient equations with special forcing forms, while OpenStax treats it alongside variation of parameters for nonhomogeneous linear equations.

What Mistakes Do Students Make With Undetermined Coefficients?

Most errors happen before substitution: the trial family is incomplete, the overlap check is skipped, or the wrong part of the trial is multiplied by \(t\).

Mistake 1: Incomplete polynomial trial

Symptom: for \(g(t)=t^2+1\), writing \(y_p=At^2+C\).

Cause: copying only the powers visible in the forcing term.

Fix: use the complete quadratic \(At^2+Bt+C\).

Mistake 2: Using only sine or only cosine

Symptom: for \(g(t)=\sin3t\), writing only \(A\sin3t\).

Cause: forgetting that derivatives can mix sine and cosine.

Fix: use \(A\cos3t+B\sin3t\) unless a deliberately reduced trial has been justified.

Mistake 3: Forgetting \(y_h\)

Symptom: the substitution produces zero or an inconsistent coefficient equation.

Cause: the trial overlaps with the homogeneous solution.

Fix: solve the characteristic equation first and apply the \(t^s\) rule.

Mistake 4: Multiplying only one term by \(t\)

Symptom: using \(At\cos bt+B\sin bt\) when the whole trig family overlaps.

Cause: treating the trial as unrelated terms rather than one closed family.

Fix: multiply the entire affected component: \(t(A\cos bt+B\sin bt)\).

Mistake 5: Multiplying every component in a sum

Symptom: one overlapping forcing component causes unrelated polynomial or exponential components to receive an unnecessary factor of \(t\).

Cause: checking overlap only after combining all trial components.

Fix: test and modify each forcing component separately.

Mistake 6: Forgetting zero-root overlap

Symptom: a polynomial trial fails even though no visible exponential seems to overlap.

Cause: forgetting that polynomials correspond to the exponential rate \(e^{0t}\).

Fix: check whether \(r=0\) is a characteristic root and use its multiplicity.

Mistake 7: Applying initial conditions to \(y_h\)

Symptom: the final answer satisfies the homogeneous equation but not the original IVP.

Cause: solving for \(C_1,C_2\) before adding \(y_p\).

Fix: apply initial conditions only to \(y=y_h+y_p\).

Practice: Choose the Correct Trial Solution

For Problems 1–8, choose the initial trial from the forcing term. For Problems 9–14, use the given characteristic roots to include the correct overlap multiplier.

Problem 1 — \(g(t)=7\)
\[
Y(t)=A.
\]
Problem 2 — \(g(t)=4t^3-t\)
\[
Y(t)=At^3+Bt^2+Ct+D.
\]

Include every lower power, even though the \(t^2\) and constant terms are absent from \(g(t)\).

Problem 3 — \(g(t)=e^{-2t}\)
\[
Y(t)=Ae^{-2t}.
\]
Problem 4 — \(g(t)=\cos5t\)
\[
Y(t)=A\cos5t+B\sin5t.
\]
Problem 5 — \(g(t)=te^{4t}\)
\[
Y(t)=(At+B)e^{4t}.
\]
Problem 6 — \(g(t)=t^2\sin3t\)
\[
Y(t)=(At^2+Bt+C)\cos3t+(Dt^2+Et+F)\sin3t.
\]
Problem 7 — \(g(t)=e^t\cos4t\)
\[
Y(t)=e^t(A\cos4t+B\sin4t).
\]
Problem 8 — \(g(t)=t^2e^{-t}\sin2t\)
\[
Y(t)=e^{-t}
\Big[
(At^2+Bt+C)\cos2t
+(Dt^2+Et+F)\sin2t
\Big].
\]
Problem 9 — Roots \(1,2\); forcing \(g(t)=e^t\)

The root \(1\) is simple, so multiply by \(t\):

\[
y_p=Ate^t.
\]
Problem 10 — Double root \(-3\); forcing \(g(t)=e^{-3t}\)

The matching root has multiplicity \(2\):

\[
y_p=At^2e^{-3t}.
\]
Problem 11 — Roots \(\pm4i\); forcing \(g(t)=\sin4t\)

The trigonometric family overlaps with a simple complex pair:

\[
y_p=t(A\cos4t+B\sin4t).
\]
Problem 12 — Roots \(2\pm3i\); forcing \(g(t)=e^{2t}\cos3t\)

The exponential rate and frequency match the homogeneous family:

\[
y_p=te^{2t}(A\cos3t+B\sin3t).
\]
Problem 13 — Roots \(0,-1\); forcing \(g(t)=t^2\)

The zero root is simple, so multiply the complete quadratic by \(t\):

\[
y_p=t(At^2+Bt+C).
\]
Problem 14 — Double root \(0\); forcing \(g(t)=5\)

Constant forcing corresponds to \(e^{0t}\), and the zero root has multiplicity \(2\):

\[
y_p=At^2.
\]

Undetermined Coefficients FAQ

What is the method of undetermined coefficients?

It is a method for finding a particular solution of a nonhomogeneous linear differential equation by choosing a trial function with unknown coefficients, substituting it into the equation, and solving for those coefficients.

How do you choose \(y_p\) in undetermined coefficients?

Match the functional family of the forcing term \(g(t)\), include every term generated by differentiation, and then compare the trial with \(y_h\). If it overlaps, multiply the affected component by \(t^s\).

When can you use undetermined coefficients?

Use the standard method for linear constant-coefficient equations when the forcing is a finite sum or product of polynomials, exponentials, sines, and cosines.

When can you not use undetermined coefficients?

The standard method does not directly handle forcing terms such as \(\ln t\), \(\tan t\), or \(1/t\), and it is generally not the default method for variable-coefficient equations. Variation of parameters may be appropriate instead.

Why must a polynomial trial include missing lower-degree terms?

Differentiation and substitution produce lower-degree powers. A degree-\(n\) polynomial forcing therefore requires a complete degree-\(n\) polynomial trial, including every power down to the constant term.

Why do you include both sine and cosine?

Derivatives of sine produce cosine and derivatives of cosine produce sine. The complete pair ensures the trial family remains closed under differentiation.

When do you multiply a trial solution by \(t\)?

Multiply by \(t\) when the corresponding characteristic root is a simple root and the normal trial overlaps with the homogeneous solution.

When do you multiply by \(t^2\)?

Multiply by \(t^2\) when the corresponding characteristic root has multiplicity \(2\). More generally, use \(t^s\) for multiplicity \(s\).

Does a complex conjugate pair automatically have multiplicity \(2\)?

No. The numbers \(\alpha+i\beta\) and \(\alpha-i\beta\) are two distinct roots. If the quadratic factor \((r-\alpha)^2+\beta^2\) appears once, each root is simple and the overlap multiplier is \(t\). If that quadratic factor is squared, each root has multiplicity \(2\) and the multiplier is \(t^2\).

Do you multiply the whole trial by \(t\)?

Multiply the entire overlapping component by \(t^s\). If the forcing is a sum and only one component overlaps, modify only that component.

Why do you solve the homogeneous equation first?

The homogeneous solution reveals whether the trial selected from \(g(t)\) is already present. Without \(y_h\), you cannot reliably perform the overlap check.

What is the difference between \(y_h\), \(y_c\), and \(y_p\)?

\(y_h\) and \(y_c\) are two common notations for the general homogeneous or complementary solution. \(y_p\) is one particular solution of the nonhomogeneous equation. The full solution is \(y=y_h+y_p\).

How does resonance appear in undetermined coefficients?

Resonance appears as overlap between the forcing family and the homogeneous solution. The usual trial fails, and multiplication by \(t^s\) produces the correct resonant trial.

What if \(g(t)\) is a sum of several terms?

Build and correct a trial for each component separately, then add the components. This is a direct use of linearity and superposition.

What is the difference between undetermined coefficients and variation of parameters?

Undetermined coefficients is faster but restricted to special forcing families. Variation of parameters is more general but usually requires Wronskians and integration.

Can undetermined coefficients be used for higher-order equations?

Yes. The same forcing-family and overlap principles apply to higher-order linear constant-coefficient equations; characteristic-root multiplicity still determines the power of \(t\).

What is the annihilator method, and how is it related to undetermined coefficients?

An annihilator is a differential operator that sends a forcing family to zero. Applying an annihilator converts the nonhomogeneous equation into a higher-order homogeneous equation whose new modes reveal the trial family. Undetermined coefficients then solves for the unknown constants by substitution and coefficient matching.

Can complex exponentials simplify sine and cosine forcing?

Yes. Solve the complex equation with forcing \(e^{(\alpha+i\beta)t}\). Take the real part of the complex particular solution for cosine forcing and the imaginary part for sine forcing. If \(\alpha+i\beta\) is a characteristic root of multiplicity \(s\), use \(z_p=t^s e^{(\alpha+i\beta)t}/p^{(s)}(\alpha+i\beta)\).

Final Compressed Undetermined Coefficients Cheat Sheet

The canonical method has 10 steps; this is the 7-line exam compression. Use the full algorithm while learning, then use this checklist after the method is automatic.

7-Line Exam Compression

\[
L[y]=g(t),
\qquad
y=y_h+y_p.
\]

1. Solve \(L[y]=0\) and write \(y_h\).

2. Split \(g(t)\) into forcing components.

3. Match each component to its complete polynomial, exponential, or trigonometric trial family.

4. Check each trial component against \(y_h\).

5. If the matching characteristic root has multiplicity \(s\), multiply that component by \(t^s\).

6. Differentiate, substitute, and match coefficients.

7. Write \(y=y_h+y_p\), then apply initial conditions.

\[
\boxed{
y_p=t^s(\text{usual complete trial family}).
}
\]
Final Woody rule:
choose the family, complete the family, check the overlap, multiply by \(t^s\), and only then calculate.

University-Level References

MIT OpenCourseWare — Undetermined Coefficients

MIT 18.03 presents the method for constant-coefficient differential equations with polynomial and other standard inputs.


MIT OpenCourseWare →

OpenStax Calculus Volume 3 — Nonhomogeneous Linear Equations

OpenStax develops the complementary solution, particular solution, undetermined coefficients, overlap correction, and variation of parameters.


OpenStax →

Paul’s Online Math Notes — Undetermined Coefficients

This reference provides a wide range of worked examples and emphasizes finding the complementary solution before finalizing the trial.


Paul’s Online Math Notes →

About Woody Calculus

Woody is a Private Professor, former university mathematics lecturer, and mathematical researcher with more than 25 years of university-level teaching experience. His lessons emphasize classification, exact notation, independent verification, and perfect practice: reconstructing complete solutions until the correct method becomes automatic.


Read 5-star Google reviews.

Turn the Guess Table Into a Reliable Exam Method

The goal is not to improvise \(y_p\) during an exam. Memorize the core trial families, rewrite complete solutions, say the overlap test aloud, and repeat the method until every setup becomes automatic.


Differential Equations Help


Join the Woody Calculus Mastery Lab


Explore the Math Library

Leave a Reply

Your email address will not be published. Required fields are marked *