- Find general solutions of nonhomogeneous equations
- Apply the method of undetermined coefficients
- Apply the method of variation of parameters
General Solution to a Nonhomogeneous Linear Equation
The Main Idea
A nonhomogeneous differential equation has the form [latex]a_2(x)y'' + a_1(x)y' + a_0(x)y = r(x)[/latex], where [latex]r(x) \neq 0[/latex]. Unlike homogeneous equations, the right side is not zero, which changes how we find solutions.
Two Key Components
To solve a nonhomogeneous equation, you need two parts:
- The complementary solution [latex]c_1y_1(x) + c_2y_2(x)[/latex]: This is the general solution to the associated homogeneous equation (called the complementary equation), which you get by setting the right side equal to zero: [latex]a_2(x)y'' + a_1(x)y' + a_0(x)y = 0[/latex].
- A particular solution [latex]y_p(x)[/latex]: This is any single solution to the nonhomogeneous equation itself. It contains no arbitrary constants.
Building the General Solution
Once you have both components, combine them to form the general solution:
[latex]y(x) = c_1y_1(x) + c_2y_2(x) + y_p(x)[/latex]
The complementary solution handles the homogeneous part, while the particular solution accounts for the nonzero right side. Together, they capture all possible solutions to the nonhomogeneous equation.
Problem-Solving Strategy
- Identify the complementary equation by setting [latex]r(x) = 0[/latex]
- Solve the complementary equation to find [latex]c_1y_1(x) + c_2y_2(x)[/latex]
- Find one particular solution [latex]y_p(x)[/latex] to the nonhomogeneous equation
- Combine them: [latex]y(x) = c_1y_1(x) + c_2y_2(x) + y_p(x)[/latex]
The challenge lies in step 3—finding [latex]y_p(x)[/latex]. Different methods exist for this, depending on the form of [latex]r(x)[/latex].
Undetermined Coefficients
The Main Idea
The method of undetermined coefficients finds a particular solution [latex]y_p(x)[/latex] by making an educated guess based on the form of [latex]r(x)[/latex]. The key insight is that derivatives of polynomials, exponentials, sines, and cosines produce the same types of functions. Your guess should match the form of [latex]r(x)[/latex], with undetermined coefficients that you solve for by substitution.
Making Your Initial Guess
For polynomials, guess a polynomial of the same degree with all lower-order terms included (even if absent in [latex]r(x)[/latex]). For [latex]r(x) = 3x[/latex], guess [latex]y_p = Ax + B[/latex], not just [latex]Ax[/latex].
For exponentials like [latex]r(x) = ae^{\lambda x}[/latex], guess [latex]y_p = Ae^{\lambda x}[/latex].
For trigonometric functions, always include both sine and cosine terms in your guess, even if [latex]r(x)[/latex] contains only one. For [latex]r(x) = a\cos\beta x + b\sin\beta x[/latex], guess [latex]y_p = A\cos\beta x + B\sin\beta x[/latex].
For products (like polynomials times exponentials or exponentials times trig functions), your guess should be a product with the same structure.
The Critical Conflict Check
Before finalizing your guess, check whether any term in [latex]y_p(x)[/latex] solves the complementary equation. If there’s a conflict, multiply your entire guess by [latex]x[/latex]. If the conflict persists, multiply by [latex]x[/latex] again. Repeat until no term in your guess solves the complementary equation.
Problem-Solving Strategy
- Solve the complementary equation and write its general solution
- Make an initial guess for [latex]y_p(x)[/latex] based on the form of [latex]r(x)[/latex]
- Check for conflicts with the complementary solution; multiply by [latex]x[/latex] if needed
- Substitute [latex]y_p(x)[/latex] into the differential equation and equate coefficients of like terms to solve for the unknown coefficients
- Write the general solution: complementary solution plus particular solution
Find the general solution to the following differential equations.
- [latex]y^{\prime\prime}-5y^\prime+4y=3e^x[/latex]
- [latex]y^{\prime\prime}+y^\prime-6y=52\cos2t[/latex]
Variation of Parameters
The Main Idea
When [latex]r(x)[/latex] is not a combination of polynomials, exponentials, sines, or cosines, the method of undetermined coefficients fails. The method of variation of parameters works for any continuous [latex]r(x)[/latex], making it more versatile.
The Core Idea
Start with the general solution to the complementary equation: [latex]c_1y_1(x) + c_2y_2(x)[/latex]. Instead of using constants [latex]c_1[/latex] and [latex]c_2[/latex], replace them with functions [latex]u(x)[/latex] and [latex]v(x)[/latex] to form the particular solution: [latex]y_p(x) = u(x)y_1(x) + v(x)y_2(x)[/latex]. The goal is to find [latex]u(x)[/latex] and [latex]v(x)[/latex] such that [latex]y_p[/latex] satisfies the nonhomogeneous equation.
Finding u and v
First, ensure your differential equation has a leading coefficient of 1 (divide through by [latex]a[/latex] if needed). The functions [latex]u(x)[/latex] and [latex]v(x)[/latex] come from solving this system:
[latex]\begin{aligned} u'y_1 + v'y_2 &= 0 \ u'y_1' + v'y_2' &= r(x) \end{aligned}[/latex]
Use Cramer’s rule to solve for [latex]u'[/latex] and [latex]v'[/latex], then integrate to find [latex]u[/latex] and [latex]v[/latex]. The particular solution is [latex]y_p(x) = u(x)y_1(x) + v(x)y_2(x)[/latex].
Cramer’s Rule Reminder
For the system [latex]\begin{aligned} a_1z_1 + b_1z_2 &= r_1 \ a_2z_1 + b_2z_2 &= r_2 \end{aligned}[/latex], the solutions are:
[latex]z_1 = \frac{\begin{vmatrix}r_1 & b_1 \\ r_2 & b_2\end{vmatrix}}{\begin{vmatrix}a_1 & b_1 \\ a_2 & b_2\end{vmatrix}}[/latex] and [latex]z_2 = \frac{\begin{vmatrix}a_1 & r_1 \\ a_2 & r_2\end{vmatrix}}{\begin{vmatrix}a_1 & b_1 \\ a_2 & b_2\end{vmatrix}}[/latex]
Problem-Solving Strategy
- Solve the complementary equation to find [latex]y_1(x)[/latex] and [latex]y_2(x)[/latex]
- Set up and solve the system for [latex]u'[/latex] and [latex]v'[/latex] using Cramer’s rule
- Integrate to find [latex]u(x)[/latex] and [latex]v(x)[/latex]
- Form the particular solution: [latex]y_p(x) = u(x)y_1(x) + v(x)y_2(x)[/latex]
- Write the general solution: [latex]y(x) = c_1y_1(x) + c_2y_2(x) + y_p(x)[/latex]
Use Cramer’s rule to solve the following system of equations.
[latex]\begin{aligned} 2xz_1-3z_2&=0 \\ x^2z_1+4xz_2&=x+1 \end{aligned}[/latex].
Find the general solution to the following differential equations.
- [latex]y^{\prime\prime}+y=\sec x[/latex]
- [latex]x^{\prime\prime}-2x^\prime+x=\frac{e^t}t[/latex]