ODE: Method of Undetermined Coefficients
AI-Generated Content
ODE: Method of Undetermined Coefficients
Solving a nonhomogeneous ordinary differential equation (ODE) often feels like a two-part job: first, solving the complementary homogeneous equation, and second, finding a single particular solution to the nonhomogeneous one. The Method of Undetermined Coefficients is a powerful, systematic technique for finding that particular solution when the nonhomogeneous term, or forcing function, has a specific, predictable form common in engineering systems: polynomials, exponentials, sines, cosines, and sums/products thereof. Mastering this method is essential for modeling forced mechanical vibrations, electrical circuits with applied voltage, and other dynamic systems where an external drive dictates a specific response.
The Core Principle: Educated Guessing
The method is fundamentally an exercise in "educated guessing." Its power lies in a simple observation: the derivative of an exponential is an exponential, the derivative of a polynomial is another polynomial, and the derivatives of sines and cosines cycle among themselves. Therefore, if the forcing function $f(x)$ is one of these types or a combination, a particular solution $y_p(x)$ will likely be of the same general family, but with undetermined coefficients that we can solve for.
The process follows a clear sequence:
- Solve the associated homogeneous equation to find the complementary solution
$y_c(x)$. - Based on the form of
$f(x)$, propose a trial particular solution$y_p(x)$with undetermined coefficients (e.g.,$A$,$B$,$C$). - Substitute
$y_p(x)$and its necessary derivatives into the original nonhomogeneous ODE. - Collect like terms and equate coefficients to create a system of algebraic equations.
- Solve the system for the undetermined coefficients.
- The general solution is then
$y(x) = y_c(x) + y_p(x)$.
The true art—and where errors are often made—lies in correctly proposing the initial form of $y_p(x)$.
Crafting Trial Solutions for Standard Forcing Functions
The choice of trial solution is not arbitrary; it is dictated by the form of $f(x)$. Here are the standard rules for common forcing functions, assuming no conflict with the complementary solution (a critical exception covered next).
- For Polynomials: If
$f(x)$is a polynomial of degree$n$, the trial solution is a general polynomial of the same degree. - Example: For
$f(x) = 3x^2 - 1$, propose$y_p = Ax^2 + Bx + C$.
- For Exponentials: If
$f(x)$is an exponential$Ce^{rx}$, the trial solution is a constant multiple of the same exponential. - Example: For
$f(x) = 5e^{-2x}$, propose$y_p = Ae^{-2x}$.
- For Sine/Cosine: If
$f(x)$is a combination like$C_1 \cos(\omega x) + C_2 \sin(\omega x)$, the trial solution must include both sine and cosine terms of the same frequency, even if one coefficient is zero in$f(x)$. - Example: For
$f(x) = 4 \sin(3x)$, propose$y_p = A \cos(3x) + B \sin(3x)$. The presence of the cosine term is necessary because its derivative will produce a sine term.
- For Products: If
$f(x)$is a product of the above forms, the trial solution is the product of the corresponding trial forms. - Example: For
$f(x) = x e^{x}$, propose$y_p = (Ax + B)e^{x}$. - Example: For
$f(x) = x^2 \cos(5x)$, propose$y_p = (Ax^2 + Bx + C)\cos(5x) + (Dx^2 + Ex + F)\sin(5x)$.
The Modification Rule: Handling Resonance Cases
The standard rules fail when the proposed trial solution is already part of the complementary solution $y_c(x)$. This situation, called resonance in engineering contexts, occurs because the homogeneous equation already produces a function of that form, making the trial solution linearly dependent and therefore invalid when substituted into the ODE. The Modification Rule resolves this: if any term in the proposed $y_p$ is a solution to the homogeneous equation, multiply the entire trial solution by $x$ (or $x^s$, where $s$ is the smallest positive integer that removes all duplication).
Worked Example (Resonance): Solve $y'' - 4y' + 4y = 2e^{2x}$.
- Solve homogeneous:
$r^2 - 4r + 4 = 0$gives$r = 2$(double root). So$y_c = C_1 e^{2x} + C_2 x e^{2x}$. - Standard rule: For
$f(x)=2e^{2x}$, we'd propose$y_p = A e^{2x}$. - Conflict:
$A e^{2x}$is already present in$y_c$. Multiplying by$x$gives$A x e^{2x}$, but this is also present in$y_c$. - Apply modification: Multiply by
$x^2$(the smallest power that eliminates duplication). The correct trial is$y_p = A x^2 e^{2x}$. - Substitute, solve, and find
$A = 1$. Thus,$y_p = x^2 e^{2x}$.
Superposition for Combined Forcing Functions
The principle of superposition for linear ODEs simplifies problems with combined forcing terms. If the nonhomogeneous term is a sum, $f(x) = f_1(x) + f_2(x)$, you can find particular solutions $y_{p1}$ for $f_1$ and $y_{p2}$ for $f_2$ independently. The particular solution for the full equation is then the sum: $y_p = y_{p1} + y_{p2}$. This allows you to break down complex forcing functions into manageable pieces.
Worked Example (Superposition): Find a trial solution for $y'' + y = x + \sin(x)$.
- Break
$f(x)$into$f_1(x) = x$and$f_2(x) = \sin(x)$. - For
$f_1(x)=x$: Propose$y_{p1} = Ax + B$. - For
$f_2(x)=\sin(x)$: Solve$y_c$for homogeneous$y''+y=0$gives$y_c = C_1 \cos(x) + C_2 \sin(x)$. A standard proposal of$D\cos(x) + E\sin(x)$conflicts with$y_c$. - Apply modification: Multiply by
$x$. Propose$y_{p2} = x(D\cos(x) + E\sin(x))$. - By superposition, the full trial is
$y_p = y_{p1} + y_{p2} = Ax + B + Dx\cos(x) + Ex\sin(x)$.
A Systematic Decision Framework
To consistently choose the correct trial solution, follow this decision tree:
- Identify
$f(x)$. Write it as a sum of terms from distinct families (polynomial, exponential, trig). - Solve for
$y_c(x)$. This is non-negotiable; you must know the homogeneous solution. - Propose initial
$y_p$. For each distinct family term in$f(x)$, write its standard trial solution (using product rules if needed). Sum them per superposition. - Check for conflicts. Compare each term in your proposed
$y_p$against each term in$y_c$.
- If no term in
$y_p$matches any term in$y_c$, your proposal is final. - If any term matches, apply the Modification Rule to the entire family group in
$y_p$that contains the conflicting term. Multiply that group's trial form by$x^s$to eliminate all conflicts.
- Write the final
$y_p$form with undetermined coefficients and proceed with substitution.
Common Pitfalls
- Insufficient Trial for Trig Functions: Proposing only
$A\sin(\omega x)$for$f(x)=\sin(\omega x)$is a classic error. You must include the cosine term:$A\cos(\omega x) + B\sin(\omega x)$. Their derivatives are linked, so both are needed to match coefficients upon substitution. - Misapplying the Modification Rule: The rule applies to the entire family/group of terms from a single component of
$f(x)$, not just the offending term. In the example$y'' - 4y' + 4y = x e^{2x}$, the trial starts as$(Ax+B)e^{2x}$. Since$e^{2x}$and$xe^{2x}$are in$y_c$, you multiply the entire polynomial-exponential product by$x^2$:$y_p = x^2(Ax+B)e^{2x}$. - Ignoring Superposition: Trying to create a single, convoluted trial for a sum like
$x + \sin(x)$is inefficient and error-prone. Always break it into parts, find the trial for each, and add them at the end, applying modification checks to each part independently. - Forgetting to Solve for
$y_c$First: Attempting to guess$y_p$without knowing$y_c$is like navigating without a map. You cannot identify resonance conflicts, which guarantees an unsolvable system of equations when you attempt to equate coefficients.
Summary
- The Method of Undetermined Coefficients is a systematic algebraic method for finding particular solutions to linear nonhomogeneous ODEs with constant coefficients when the forcing function is a polynomial, exponential, sine, cosine, or a sum/product of these.
- The initial trial solution
$y_p$is chosen based on the form of the forcing function$f(x)$, using standard rules for each functional family. - The critical Modification Rule (multiplying by
$x^s$) must be applied when any part of the proposed trial solution is already present in the complementary solution$y_c$, a condition known as resonance. - The principle of superposition allows you to handle sums of forcing functions by finding trial solutions for each component separately and adding them to form the complete
$y_p$. - A successful application requires a strict sequence: 1) Find
$y_c$, 2) Propose initial$y_p$based on$f(x)$, 3) Modify for resonance, 4) Substitute and solve for coefficients. Skipping or misordering these steps is the most common source of error.