Particular Solutions for Sine and Cosine Functions
You'll learn how to find particular solutions to non-homogeneous ODEs when the forcing function is a sine or cosine term.
The Core Idea
When solving a non-homogeneous second-order linear ODE like:
y'' + ay' + by = C sin(ωx) or y'' + ay' + by = C cos(ωx)
you need to guess a particular solution that "matches" the oscillatory nature of the right-hand side. Since derivatives of sine and cosine produce combinations of both functions, your trial solution must include both sine and cosine terms, even if only one appears on the right.
The Standard Guess
For forcing functions C sin(ωx) or C cos(ωx), use:
y_p = A cos(ωx) + B sin(ωx)
where A and B are undetermined coefficients you'll solve for by substituting into the ODE.
Special Case — Resonance: If sin(ωx) or cos(ωx) is already part of your homogeneous solution (meaning ωi is a root of the characteristic equation), multiply your guess by x:
y_p = x[A cos(ωx) + B sin(ωx)]
This prevents redundancy with the complementary solution.
Example Strategy
- Identify ω from the forcing function
- Write y_p = A cos(ωx) + B sin(ωx)
- Compute y_p' and y_p''
- Substitute into the original ODE
- Match coefficients of cos(ωx) and sin(ωx) separately
- Solve the resulting system for A and B
Key Takeaway: For sine or cosine forcing functions, always guess a linear combination of both cos(ωx) and sin(ωx); multiply by x if resonance occurs (when the homogeneous solution already contains these terms).