Nonhomogeneous Linear Equations: Learn It 2

Undetermined Coefficients

The method of undetermined coefficients involves making educated guesses about the form of the particular solution based on the form of [latex]r(x)[/latex]. When we take derivatives of polynomials, exponential functions, sines, and cosines, we get polynomials, exponential functions, sines, and cosines. So when [latex]r(x)[/latex] has one of these forms, it is possible that the solution to the nonhomogeneous differential equation might take that same form.

Find the general solution to [latex]y^{\prime\prime}+4y^\prime+3y=3x[/latex].

In the example above, notice that even though [latex]r(x)[/latex] did not include a constant term, it was necessary to include the constant term in our guess. If we had assumed a solution of the form [latex]y_p=Ax[/latex] (with no constant term), we would not have been able to find a solution.

If the function [latex]r(x)[/latex] is a polynomial, our guess for the particular solution should be a polynomial of the same degree, and it must include all lower-order terms, regardless of whether they are present in [latex]r(x)[/latex].

Find the general solution to [latex]y^{\prime\prime}-y^\prime-2y=2e^{3x}[/latex].

When [latex]r(x)[/latex] includes both sine and cosine terms, both terms must be present in the guess—even if [latex]r(x)[/latex] included only a sine term or only a cosine term.

The method of undetermined coefficients also works with products of polynomials, exponentials, sines, and cosines. Some of the key forms of [latex]r(x)[/latex] and the associated guesses for [latex]y_p(x)[/latex] are summarized below.

key forms for the method of undetermined coefficients

 

[latex]r(x)[/latex] Initial guess for [latex]y_p(x)[/latex]
[latex]k[/latex] (a constant) [latex]A[/latex] (a constant)
[latex]ax+b[/latex] [latex]Ax+B[/latex]
[latex]ax^{2}+bx+c[/latex] [latex]Ax^{2}+Bx+C[/latex]
Higher-order polynomials Polynomial of the same order as [latex]r(x)[/latex]
[latex]ae^{\lambda x}[/latex] [latex]Ae^{\lambda x}[/latex]
[latex]a\cos\beta x+b\sin\beta x[/latex] [latex]A\cos\beta x+B\sin\beta x[/latex]
[latex]ae^{\alpha x}\cos\beta x+be^{\alpha x}\sin\beta x[/latex] [latex]Ae^{\alpha x}\cos\beta x+Be^{\alpha x}\sin\beta x[/latex]
[latex](ax^2+bx+c)e^{\lambda x}[/latex] [latex](Ax^2+Bx+C)e^{\lambda x}[/latex]
[latex](a_2x^2+a_1x+a_0)\cos\beta x+(b_2x^2+b_1x+b_0)\sin\beta x[/latex] [latex](A_2x^2+A_1x+A_0)\cos\beta x+(B_2x^2+B_1x+B_0)\sin\beta x[/latex]
[latex](a_2x^2+a_1x+a_0)e^{\alpha x}\cos\beta x+(b_2x^2+b_1x+b_0)e^{\alpha x}\sin\beta x[/latex] [latex](A_2x^2+A_1x+A_0)e^{\alpha x}\cos\beta x+(B_2x^2+B_1x+B_0)e^{\alpha x}\sin\beta x[/latex]

Table 7.2 Key Forms for the Method of Undetermined Coefficients

Note: For polynomial guesses, the guess must include all lower-order terms, even if they have zero coefficients in [latex]r(x)[/latex]. For trigonometric guesses, both sine and cosine terms must be included, even if only one appears in [latex]r(x)[/latex].

A Key Pitfall

There is an important issue to watch for with this method. Consider the differential equation [latex]y^{\prime\prime}+5y^\prime+6y=3e^{-2x}[/latex]. Based on the form of [latex]r(x)[/latex], we guess a particular solution of the form [latex]y_p(x)=Ae^{-2x}[/latex]. But when we substitute this expression into the differential equation to find a value for [latex]A[/latex], we run into a problem.

We have [latex]y_p^\prime(x)=-2Ae^{-2x}[/latex] and [latex]y_p^{\prime\prime}(x)=4Ae^{-2x}[/latex], so we want:

[latex]\begin{aligned} y^{\prime\prime}+5y^\prime+6y&=3e^{-2x} \\ 4Ae^{-2x}+\left(-2Ae^{-2x}\right)+6Ae^{-2x}&=3e^{-2x} \\ 4Ae^{-2x}-10Ae^{-2x}+6Ae^{-2x}&=3e^{-2x} \\ 0&=3e^{-2x} \end{aligned}[/latex],

which is not possible.

Looking closely, we see that the general solution to the complementary equation is [latex]c_1e^{-2x}+c_2e^{-3x}[/latex]. The exponential function in [latex]r(x)[/latex] is actually a solution to the complementary equation, so all the terms on the left side of the equation cancel out.

We can still use the method of undetermined coefficients in this case, but we have to alter our guess by multiplying it by [latex]x[/latex]. Using the new guess, [latex]y_p(x)=Axe^{-2x}[/latex], we have:

[latex]y_p^\prime(x)=A\left(e^{-2x}-2xe^{-2x}\right)[/latex]

and

[latex]y_p^{\prime\prime}(x)=-4Ae^{-2x}+4Axe^{-2x}[/latex].

Substitution gives

[latex]\begin{aligned} y^{\prime\prime}+5y^\prime+6y&=3e^{-2x} \\ \left(-4Ae^{-2x}+4Axe^{-2x}\right)+5\left(Ae^{-2x}-2Axe^{-2x}\right)+6Axe^{-2x}&=3e^{-2x} \\ -4Ae^{-2x}+4Axe^{-2x}-10Axe^{-2x}+6Axe^{-2x}&=3e^{-2x} \\ Ae^{-2x}&=3e^{-2x} \end{aligned}[/latex],

So, [latex]A=3[/latex] and [latex]y_p(x)=3xe^{-2x}[/latex]. This gives us the following general solution:

[latex]\large{y(x)=c_1e^{-2x}+c_2e^{-2x}+3xe^{-2x}}[/latex].

If [latex]xe^{-2x}[/latex] were also a solution to the complementary equation, we would have to multiply by [latex]x[/latex] again, and we would try [latex]y_p(x)=Ax^2e^{-2x}[/latex].
How to: Use the Method of Undetermined Coefficients

  1. Solve the complementary equation: Write down the general solution.
  2. Make an initial guess for [latex]y_p(x)[/latex]: Base your guess on the form of [latex]r(x)[/latex].
  3. Check for conflicts with the complementary solution: If any term in the guess for [latex]y_p(x)[/latex] is a solution to the complementary equation, multiply the guess by [latex]x[/latex]. Repeat this step until there are no terms in [latex]y_p(x)[/latex] that solve the complementary equation.
  4. Substitute and solve for coefficients: Substitute [latex]y_p(x)[/latex] into the differential equation and equate like terms to find values for the unknown coefficients in [latex]y_p(x)[/latex].
  5. Write the general solution: Add the general solution to the complementary equation and the particular solution you just found.

Find the general solutions to the following differential equations.

  1. [latex]y^{\prime\prime}-9y=-6\cos 3x[/latex]
  2. [latex]x^{\prime\prime}+2x'+x=4e^{-t}[/latex]
  3. [latex]y^{\prime\prime}-2y^\prime+5y=10^{2}-3x-3[/latex]
  4. [latex]y^{\prime\prime}-3y^\prime=-12t[/latex]