Nonhomogeneous Linear Equations: Learn It 1

  • 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

Nonhomogeneous differential equations require different terminology and methods than those we used for homogeneous equations. Let’s start by defining some key terms.

Consider the nonhomogeneous linear differential equation:

[latex]a_2(x)y^{\prime\prime}+a_1(x)y^\prime+a_0(x)y=r(x)[/latex].

The associated homogeneous equation:

[latex]a_2(x)y^{\prime\prime}+a_1(x)y^\prime+a_0(x)y=0[/latex]

is called the complementary equation. Solving the complementary equation is an important step in solving a nonhomogeneous differential equation.

To find the general solution to a nonhomogeneous equation, we need to find one specific solution to the nonhomogeneous equation itself. This brings us to an important definition – the particular solution.

particular solution

A solution [latex]y_p(x)[/latex] of a differential equation that contains no arbitrary constants is called a particular solution to the equation.

Once we have both the general solution to the complementary equation and a particular solution to the nonhomogeneous equation, we can combine them to form the general solution.

general solution to a nonhomogeneous equation

Let [latex]y_p(x)[/latex] be any particular solution to the nonhomogeneous linear differential equation:

[latex]a_2(x)y^{\prime\prime}+a_1(x)y^\prime+a_0(x)y=r(x)[/latex].

Also, let [latex]c_1y_1(x)+c_2y_2(x)[/latex] denote the general solution to the complementary equation. Then, the general solution to the nonhomogeneous equation is given by:

[latex]\large{y(x)=c_1y_1(x)+c_2y_2(x)+y_p(x)}[/latex].

Proof


To prove [latex]y(x)[/latex] is the general solution, we must first show that it solves the differential equation and, second, that any solution to the differential equation can be written in that form. Substituting [latex]y(x)[/latex] into the differential equation, we have

[latex]\begin{aligned} a_2(x)y^{\prime\prime}+a_1(x)y^\prime+a_0(x)y&=a_2(x)(c_1y_1+c_2y_2+y_p)^{\prime\prime}+a_1(x)(c_1y_1+c_2y_2+y_p)^\prime+a_0(x)(c_1y_1+c_2y_2+y_p) \\ &=[a_2(x)(c_1y_1+c_2y_2)^{\prime\prime}+a_1(x)(c_1y_1+c_2y_2)^\prime+a_0(x)(c_1y_1+c_2y_2)]+a_2(x)y_p^{\prime\prime}+a_1(x)y_p^\prime+a_0(x)y_p \\ &=0+r(x) \\ &=r(x) \end{aligned}[/latex].

So [latex]y(x)[/latex] is a solution.

Now, let [latex]z(x)[/latex] be any solution to [latex]a_2(x)y^{\prime\prime}+a_1(x)y^\prime+a_0(x)y=r(x)[/latex]. Then

[latex]\begin{aligned} a_2(x)(z-y_p)^{\prime\prime}+a_1(x)(z-y_p)^\prime+a_0(x)(z-y_p)&=(a_2(x)z^{\prime\prime}+a_1(x)z^\prime+a_0(x)z)-(a_2(x)y_p^{\prime\prime}+a_1(x)y_p^\prime+a_0(x)y_p) \\ &=r(x)-r(x) \\ &=0 \end{aligned}[/latex],

so [latex]z(x)=y_p(x)[/latex] is a solution to the complementary equation. But, [latex]c_1y_1(x)+c_2y_2(x)[/latex] is the general solution to the complementary equation, so there are constants [latex]c_1[/latex] and [latex]c_2[/latex] such that

[latex]\large{z(x)=y_p(x)=c_1y_1(x)+c_2y_2(x)}[/latex].

Hence, we see that [latex]z(x)=c_1y_1(x)+c_2y_2(x)y_p(x)[/latex].

[latex]_\blacksquare[/latex]

Given that [latex]y_p(x)=x[/latex] is a particular solution to the differential equation [latex]y^{\prime\prime}+y=x[/latex], write the general solution and check by verifying that the solution satisfies the equation.

In the last section, we learned how to solve homogeneous equations with constant coefficients. Therefore, for nonhomogeneous equations of the form [latex]ay^{\prime\prime}+by^\prime+cy=r(x)[/latex], we already know how to solve the complementary equation, and the problem boils down to finding a particular solution for the nonhomogeneous equation. We now examine two techniques for this: the method of undetermined coefficients and the method of variation of parameters.