5.3: Nonhomgeneous Linear Equations
- Page ID
- 30726
( \newcommand{\kernel}{\mathrm{null}\,}\)
We’ll now consider the nonhomogeneous linear second order equation
y″+p(x)y′+q(x)y=f(x),
where the forcing function f isn’t identically zero. The next theorem, an extension of Theorem 5.1.1, gives sufficient conditions for existence and uniqueness of solutions of initial value problems for Equation ???. We omit the proof, which is beyond the scope of this book.
Theorem 5.3.1 : Uniqueness
Suppose p, ,q and f are continuous on an open interval (a,b), let x0 be any point in (a,b), and let k0 and k1 be arbitrary real numbers. Then the initial value problem
y″+p(x)y′+q(x)y=f(x),y(x0)=k0,y′(x0)=k1
has a unique solution on (a,b).
To find the general solution of Equation ??? on an interval (a,b) where p, q, and f are continuous, it is necessary to find the general solution of the associated homogeneous equation
y″+p(x)y′+q(x)y=0
on (a,b). We call Equation ??? the complementary equation for Equation ???.
The next theorem shows how to find the general solution of Equation ??? if we know one solution yp of Equation ??? and a fundamental set of solutions of Equation ???. We call yp a particular solution of Equation ??? ; it can be any solution that we can find, one way or another.
Theorem 5.3.2
Suppose p, q, and f are continuous on (a,b). Let yp be a particular solution of
y″+p(x)y′+q(x)y=f(x)
on (a,b), and let {y1,y2} be a fundamental set of solutions of the complementary equation
y″+p(x)y′+q(x)y=0
on (a,b). Then y is a solution of (???) on (a,b) if and only if
y=yp+c1y1+c2y2,
where c1 and c2 are constants.
- Proof
-
We first show that y in Equation ??? is a solution of Equation ??? for any choice of the constants c1 and c2. Differentiating Equation ??? twice yields
y′=y′p+c1y′1+c2y′2andy″=y″p+c1y″1+c2y″2,
so
y″+p(x)y′+q(x)y=(y″p+c1y″1+c2y″2)+p(x)(y′p+c1y′1+c2y′2)+q(x)(yp+c1y1+c2y2)=(y″p+p(x)y′p+q(x)yp)+c1(y″1+p(x)y′1+q(x)y1)+c2(y″2+p(x)y′2+q(x)y2)=f+c1⋅0+c2⋅0=f,
since yp satisfies Equation ??? and y1 and y2 satisfy Equation ???.
Now we’ll show that every solution of Equation ??? has the form Equation ??? for some choice of the constants c1 and c2. Suppose y is a solution of Equation ???. We’ll show that y−yp is a solution of Equation ???, and therefore of the form y−yp=c1y1+c2y2, which implies Equation ???. To see this, we compute
(y−yp)″+p(x)(y−yp)′+q(x)(y−yp)=(y″−y″p)+p(x)(y′−y′p)+q(x)(y−yp)=(y″+p(x)y′+q(x)y)−(y″p+p(x)y′p+q(x)yp)=f(x)−f(x)=0,
since y and yp both satisfy Equation ???.
We say that Equation ??? is the general solution of (???) on (a,b).
If P0, P1, and F are continuous and P0 has no zeros on (a,b), then Theorem 5.3.2 implies that the general solution of
P0(x)y″+P1(x)y′+P2(x)y=F(x)
on (a,b) is y=yp+c1y1+c2y2, where yp is a particular solution of Equation ??? on (a,b) and {y1,y2} is a fundamental set of solutions of
P0(x)y″+P1(x)y′+P2(x)y=0
on (a,b). To see this, we rewrite Equation ??? as
y″+P1(x)P0(x)y′+P2(x)P0(x)y=F(x)P0(x)
and apply Theorem 5.3.2 with p=P1/P0, q=P2/P0, and f=F/P0.
To avoid awkward wording in examples and exercises, we will not specify the interval (a,b) when we ask for the general solution of a specific linear second order equation, or for a fundamental set of solutions of a homogeneous linear second order equation. Let’s agree that this always means that we want the general solution (or a fundamental set of solutions, as the case may be) on every open interval on which p, q, and f are continuous if the equation is of the form Equation ???, or on which P0, P1, P2, and F are continuous and P0 has no zeros, if the equation is of the form Equation ???. We leave it to you to identify these intervals in specific examples and exercises.
For completeness, we point out that if P0, P1, P2, and F are all continuous on an open interval (a,b), but P0 does have a zero in (a,b), then Equation ??? may fail to have a general solution on (a,b) in the sense just defined. Exercises 5.1.42-5.1.44 illustrate this point for a homogeneous equation.
In this section we to limit ourselves to applications of Theorem 5.3.2 where we can guess at the form of the particular solution.
Example 5.3.1
- Find the general solution of y″+y=1.
- Solve the initial value problem y″+y=1,y(0)=2,y′(0)=7.
Solution
a. We can apply Theorem 5.3.2 with (a,b)=(−∞,∞), since the functions p≡0, q≡1, and f≡1 in Equation ??? are continuous on (−∞,∞). By inspection we see that yp≡1 is a particular solution of Equation ???. Since y1=cosx and y2=sinx form a fundamental set of solutions of the complementary equation y″+y=0, the general solution of Equation ??? is
y=1+c1cosx+c2sinx.
b. Imposing the initial condition y(0)=2 in Equation ??? yields 2=1+c1, so c1=1. Differentiating Equation ??? yields
y′=−c1sinx+c2cosx.
Imposing the initial condition y′(0)=7 here yields c2=7, so the solution of Equation ??? is
y=1+cosx+7sinx.
Figure 5.3.1 is a graph of this function.
Example 5.3.2
- Find the general solution of y″−2y′+y=−3−x+x2.
- Solve the initial value problem y″−2y′+y=−3−x+x2,y(0)=−2,y′(0)=1.
Solution
a. The characteristic polynomial of the complementary equation
y″−2y′+y=0
is r2−2r+1=(r−1)2, so y1=ex and y2=xex form a fundamental set of solutions of the complementary equation. To guess a form for a particular solution of Equation ???, we note that substituting a second degree polynomial yp=A+Bx+Cx2 into the left side of Equation ??? will produce another second degree polynomial with coefficients that depend upon A, B, and C. The trick is to choose A, B, and C so the polynomials on the two sides of Equation ??? have the same coefficients; thus, if
yp=A+Bx+Cx2theny′p=B+2Cxandy″p=2C,
so
y″p−2y′p+yp=2C−2(B+2Cx)+(A+Bx+Cx2)=(2C−2B+A)+(−4C+B)x+Cx2=−3−x+x2.
Equating coefficients of like powers of x on the two sides of the last equality yields
C=−1.B−4C=−1.A−2B+2C=−3,
so C=1, B=−1+4C=3, and A=−3−2C+2B=1. Therefore yp=1+3x+x2 is a particular solution of Equation ??? and Theorem 5.3.2 implies that
y=1+3x+x2+ex(c1+c2x)
is the general solution of Equation ???.
b. Imposing the initial condition y(0)=−2 in Equation ??? yields −2=1+c1, so c1=−3. Differentiating Equation ??? yields
y′=3+2x+ex(c1+c2x)+c2ex,
and imposing the initial condition y′(0)=1 here yields 1=3+c1+c2, so c2=1. Therefore the solution of Equation ??? is
y=1+3x+x2−ex(3−x).
Figure 5.3.2 is a graph of this solution.
Example 5.3.3
Find the general solution of
x2y″+xy′−4y=2x4
on (−∞,0) and (0,∞).
Solution
In Example 5.1.3, we verified that y1=x2 and y2=1/x2 form a fundamental set of solutions of the complementary equation
x2y″+xy′−4y=0
on (−∞,0) and (0,∞). To find a particular solution of Equation ???, we note that if yp=Ax4, where A is a constant then both sides of Equation ??? will be constant multiples of x4 and we may be able to choose A so the two sides are equal. This is true in this example, since if yp=Ax4 then
x2y″p+xy′p−4yp=x2(12Ax2)+x(4Ax3)−4Ax4=12Ax4=2x4
if A=1/6; therefore, yp=x4/6 is a particular solution of Equation ??? on (−∞,∞). Theorem 5.3.2 implies that the general solution of Equation ??? on (−∞,0) and (0,∞) is
y=x46+c1x2+c2x2.
The Principle of Superposition
The next theorem enables us to break a nonhomogeous equation into simpler parts, find a particular solution for each part, and then combine their solutions to obtain a particular solution of the original problem.
Theorem 5.3.3 the principle of superposition
Suppose yp1 is a particular solution of
y″+p(x)y′+q(x)y=f1(x)
on (a,b) and yp2 is a particular solution of
y″+p(x)y′+q(x)y=f2(x)
on (a,b). Then
yp=yp1+yp2
is a particular solution of
y″+p(x)y′+q(x)y=f1(x)+f2(x)
on (a,b).
- Proof
-
If yp=yp1+yp2 then
y″p+p(x)y′p+q(x)yp=(yp1+yp2)″+p(x)(yp1+yp2)′+q(x)(yp1+yp2)=(y″p1+p(x)y′p1+q(x)yp1)+(y″p2+p(x)y′p2+q(x)yp2)=f1(x)+f2(x).
It’s easy to generalize Theorem 5.3.3 to the equation
\label{eq:5.3.14} y''+p(x)y'+q(x)y=f(x)
where
f=f_1+f_2+\cdots+f_k; \nonumber
thus, if y_{p_i} is a particular solution of
y''+p(x)y'+q(x)y=f_i(x) \nonumber
on (a,b) for i=1, 2, …, k, then y_{p_1}+y_{p_2}+\cdots+y_{p_k} is a particular solution of Equation \ref{eq:5.3.14} on (a,b). Moreover, by a proof similar to the proof of Theorem 5.3.3 we can formulate the principle of superposition in terms of a linear equation written in the form
P_0(x)y''+P_1(x)y'+P_2(x)y=F(x) \nonumber
that is, if y_{p_1} is a particular solution of
P_0(x)y''+P_1(x)y'+P_2(x)y=F_1(x) \nonumber
on (a,b) and y_{p_2} is a particular solution of
P_0(x)y''+P_1(x)y'+P_2(x)y=F_2(x) \nonumber
on (a,b), then y_{p_1}+y_{p_2} is a solution of
P_0(x)y''+P_1(x)y'+P_2(x)y=F_1(x)+F_2(x) \nonumber
on (a,b).
Example 5.3.4
The function y_{p_1}=x^4/15 is a particular solution of
\label{eq:5.3.15} x^2y''+4xy'+2y=2x^4
on (-\infty,\infty) and y_{p_2}=x^2/3 is a particular solution of
\label{eq:5.3.16} x^2y''+4xy'+2y=4x^2
on (-\infty,\infty). Use the principle of superposition to find a particular solution of
\label{eq:5.3.17} x^2y''+4xy'+2y=2x^4+4x^2
on (-\infty,\infty).
Solution
The right side F(x)=2x^4+4x^2 in Equation \ref{eq:5.3.17} is the sum of the right sides
F_1(x)=2x^4\quad \text{and} \quad F_2(x)=4x^2. \nonumber
in Equation \ref{eq:5.3.15} and Equation \ref{eq:5.3.16}. Therefore the principle of superposition implies that
y_p=y_{p_1}+y_{p_2}={x^4\over15}+{x^2\over3} \nonumber
is a particular solution of Equation \ref{eq:5.3.17}.