Nonhomogeneous Equations
Undetermined coefficients and variation of parameters
Until now, we have studied homogeneous second-order equations, where the right side is zero. These describe systems at rest, left to their own devices. But real systems are rarely isolated. Vibrating strings are plucked. Electrical circuits receive input signals. Bridges are buffeted by wind.
When we add a forcing function to the right side, the equation becomes nonhomogeneous:
The function represents an external influence driving the system. Solving this equation means finding how the system responds to that forcing.
The Structure of Solutions
The key insight is that nonhomogeneous equations have a beautiful additive structure. Their solutions decompose into two parts:
Here is the homogeneous solution, solving . We already know how to find this: use the characteristic equation, identify roots, and write out the appropriate exponential or oscillatory combinations.
The new piece is , the particular solution. This is any single function that satisfies the full nonhomogeneous equation. It does not need to satisfy any initial conditions. It just needs to make the equation true.
Why does this decomposition work? Because the equation is linear. If solves the homogeneous equation and solves the nonhomogeneous equation, then:
The sum works because differentiation distributes across sums, and the homogeneous terms vanish.
Interactive: Homogeneous Plus Particular
Equation:
Watch how the total solution combines the oscillating homogeneous part with the constant particular part. The constants and in are adjusted to satisfy initial conditions. The particular solution is fixed by the forcing function.
Undetermined Coefficients: The Fast Method
Given a specific forcing function , how do we find a particular solution? The method of undetermined coefficients is remarkably efficient for certain common forcing functions.
The idea is to guess the form of based on what looks like, then substitute into the equation to determine the unknown constants.
This works because differentiation does not radically change certain function families. Polynomials differentiate to polynomials of lower degree. Exponentials differentiate to exponentials with the same base. Sines and cosines differentiate to each other. So if the forcing function belongs to one of these families, the particular solution likely does too.
Interactive: Undetermined Coefficients Guide
Forcing function
Guess this form
Example
Guessing Rules
Here are the standard guesses:
Polynomial forcing: If , guess . Always include all powers down to the constant term, even if some coefficients in are zero.
Exponential forcing: If , guess .
Sinusoidal forcing: If , guess . Always include both sine and cosine, even if only one appears in . Differentiation mixes them.
Products: For products like or , multiply the appropriate guesses together. For , guess .
Worked Example
Solve .
Step 1: Find the homogeneous solution. The characteristic equation gives roots and . So:
Step 2: Guess a particular solution. Since , guess .
Step 3: Substitute into the equation. We have and . Substituting:
Step 4: Write the general solution:
The Resonance Case
What happens if your guess overlaps with the homogeneous solution? This is the resonance case, and it requires a modification.
Consider . The homogeneous solution is . If we guess , substituting gives:
This is a contradiction. The guess cannot work because is already a homogeneous solution.
The fix is to multiply by . Instead of , guess . Now:
Substituting:
So .
If the multiplied form is still a homogeneous solution (as with repeated roots), multiply by instead.
Interactive: Resonance Demonstration
Equation:
: bounded oscillation with amplitude
When the forcing frequency matches the natural frequency, the amplitude grows without bound. This is resonance. Notice how the solution remains bounded when , but grows linearly when . This phenomenon explains why soldiers break step crossing bridges and why opera singers can shatter glasses.
Variation of Parameters: The General Method
Undetermined coefficients only works for specific forcing functions: polynomials, exponentials, sines and cosines, and their products. What if or or ?
The method of variation of parameters handles any continuous forcing function. It always works, though the integrals may be difficult.
The idea is elegant: take the homogeneous solution and vary the constants, letting them become functions of :
Deriving the formulas: Differentiating using the product rule:
This has four terms, which would make messy. To simplify, we impose the constraint . Now , and differentiating again:
Substituting into and using the fact that and satisfy the homogeneous equation, most terms cancel, leaving:
Combined with our constraint , we have two equations for two unknowns and . Solving this system (using Cramer's rule) yields the formulas below.
Interactive: Variation of Parameters Method
We have a general second-order linear equation with any forcing function g(t).
Why this works: Variation of parameters succeeds for any continuous g(t). The integrals may be difficult, but they always exist.
The Formulas
For the equation , the particular solution is:
where is the Wronskian of and . Since and are linearly independent, .
Worked Example
Solve .
Step 1: Homogeneous solution. The characteristic equation gives . So and .
Step 2: Compute the Wronskian:
Step 3: Apply the formula with and :
Step 4: Integrate:
Step 5: Write the particular solution:
Notice that could not be handled by undetermined coefficients. There is no finite family of functions closed under differentiation that contains . Variation of parameters was necessary.
Transient and Steady State
When the homogeneous solution involves damping (negative real parts in characteristic roots), something interesting happens over time.
Interactive: Transient vs Steady State
The transient part decays exponentially, leaving only the steady-state response. Higher damping causes faster decay.
The homogeneous part is called the transient response. It depends on initial conditions and decays exponentially when the system is damped. Eventually it becomes negligible.
The particular solution is called the steady-state response. It persists indefinitely, determined entirely by the forcing function.
After enough time, every solution approaches the same steady state, regardless of initial conditions. The transient dies out; only the particular solution remains.
This has practical implications. When designing a system to respond to periodic input, we often care only about the steady state. Initial transients are temporary disturbances that disappear.
Which Method to Use?
Interactive: Method Comparison
Forcing function
Undetermined Coefficients
Easy: guess At² + Bt + C
Recommended
Variation of Parameters
Works but tedious integrals
Rule of thumb: Use undetermined coefficients for polynomials, exponentials, sines, and cosines (and their products). Use variation of parameters for everything else.
Use undetermined coefficients when:
- The forcing function is a polynomial, exponential, sine, cosine, or a product of these
- You want the fastest solution
- You are willing to handle the resonance case if it arises
Use variation of parameters when:
- The forcing function is anything else (tan, sec, ln, 1/t, etc.)
- Undetermined coefficients fails
- You want a method that always works
In practice, undetermined coefficients handles most textbook problems. Variation of parameters is the fallback for unusual forcing functions and is essential for understanding the structure of solutions.
Summary of the Method
To solve :
-
Find the homogeneous solution by solving the characteristic equation
-
Find a particular solution using either:
- Undetermined coefficients (for polynomial, exponential, trig forcing)
- Variation of parameters (for everything else)
-
Combine: The general solution is
-
Apply initial conditions to find and
The particular solution accounts for the forcing; the homogeneous solution accounts for initial conditions.
Looking Ahead
In the next chapter on Mechanical Vibrations, we will apply these techniques to physical systems: masses on springs, damped oscillators, and driven systems. The concepts of resonance and steady state become concrete when you see a mass oscillating in response to a periodic force. The mathematics of this chapter provides the tools; the physics provides the intuition.
Key Takeaways
- Nonhomogeneous equations have solutions of the form
- The homogeneous solution solves the equation with and contains arbitrary constants
- The particular solution is any function satisfying the full equation
- Undetermined coefficients provides fast solutions for polynomial, exponential, and sinusoidal forcing
- When the guess overlaps with the homogeneous solution, multiply by (the resonance case)
- Variation of parameters works for any continuous forcing function but requires integrating
- The homogeneous part is transient (decays with damping); the particular part is steady state (persists)
- Resonance occurs when the forcing frequency matches the natural frequency, causing unbounded growth