Particular Solution Forms
Polynomial and Exponential Forms
When you're solving a nonhomogeneous linear ODE, the first step is figuring out what form your particular solution should take. The nonhomogeneous term (the right-hand side) tells you what to guess.
- Polynomial right-hand side: guess a polynomial of the same degree, but include all lower-degree terms too.
- For , try . You need that constant even though the original has no constant term, because derivatives can shift degrees down.
- Exponential right-hand side : guess .
- For , try .
- Products of functions: guess the corresponding product form.
- For , try . You need both and because differentiating the product will generate lower-degree polynomial terms.
Trigonometric and Special Cases
- Sine or cosine right-hand side: always include both sine and cosine in your guess, even if only one appears on the right-hand side. Derivatives of sine produce cosine and vice versa.
- For , try .
- Combination of types: use the superposition principle. Build a guess that covers each piece.
- For , try .
- Overlap with the homogeneous solution (the modification rule): if any term in your guess already solves the homogeneous equation, multiply that term by , where is the multiplicity of the corresponding root in the characteristic equation.
- If is already a homogeneous solution (simple root), try instead of .
- If corresponds to a double root, you'd need .
Undetermined Coefficients Method
Procedure and Implementation
This method works for constant-coefficient linear ODEs where the right-hand side is a combination of polynomials, exponentials, sines, and cosines. Here's the process:
- Solve the homogeneous equation to get .
- Write a guess for based on the form of the right-hand side (using the rules above).
- Check for overlap between your guess and . If there's overlap, multiply the overlapping terms by .
- Substitute and its derivatives into the original ODE.
- Collect like terms and set coefficients equal on both sides.
- Solve the resulting algebraic system for the undetermined constants.
Worked example: Solve .
- Homogeneous solution: characteristic equation gives , so .
- Right-hand side is a degree-2 polynomial, so guess . No overlap with .
- Compute derivatives: , .
- Substitute: , which gives .
- Equate coefficients: , , .
- Solve: , , .
Particular solution: .

Verification and Special Considerations
Always verify by plugging back into the original equation. For the example above: . It checks out.
The overlap rule is the most common source of errors. Consider . The characteristic equation gives , so is already part of . Guessing would just give zero on the left side. Instead, multiply by : try , then solve for .
Limitations: This method does not work when:
- The equation has variable coefficients (e.g., )
- The right-hand side involves functions like , , , or
For those cases, you need Variation of Parameters.
General Solution of Nonhomogeneous Equations
Combining Solutions
The general solution to a nonhomogeneous equation has two parts:
where is the complementary solution (general solution of the associated homogeneous equation) and is any particular solution of the nonhomogeneous equation.
The complementary solution carries all the arbitrary constants. For a second-order equation, that's two constants ( and ); for an th-order equation, it's constants.
Continuing the earlier example: .
Verification and Applications
- Superposition for multiple terms: If the right-hand side has several pieces, like , you can find a particular solution for each piece separately, then add them. This often simplifies the algebra.
- Initial/boundary conditions: Apply these to the general solution (not just ). Plug in the conditions to determine and .
- For example, given and , substitute into and , then solve the resulting system for and .

Variation of Parameters Method
Method Overview and Setup
Variation of Parameters is a more general technique that works for any nonhomogeneous term, not just polynomials, exponentials, and trig functions. The tradeoff is that the integrals can get messy.
The idea: take the complementary solution and replace the constants with unknown functions:
where and are linearly independent solutions of the homogeneous equation.
For example, to solve : the homogeneous solutions are and .
Implementation and Calculations
For a second-order equation written in standard form (note: the coefficient of must be 1), follow these steps:
-
Find and from the homogeneous equation.
-
Compute the Wronskian:
-
Find and using the formulas:
-
Integrate to get and . (No constants of integration needed here; those are absorbed into .)
-
Write the particular solution: .
For higher-order equations, the pattern extends. A third-order equation uses , and you solve a system involving the Wronskian determinant.
Advantages and Limitations
Variation of Parameters handles right-hand sides that Undetermined Coefficients cannot touch:
- Equations with variable coefficients (as long as you can find the homogeneous solutions)
The main difficulty is that the integrals in step 4 can be hard or impossible to evaluate in closed form. For instance, leads to integrals with no elementary antiderivative.
When to use which method:
- If the equation has constant coefficients and the right-hand side is built from polynomials, exponentials, sines, and cosines, use Undetermined Coefficients. It's faster and cleaner.
- For anything else, use Variation of Parameters.