8.1: The Method of Variation of Parameters
( \newcommand{\kernel}{\mathrm{null}\,}\)
We are interested in solving nonhomogeneous second order linear differential equations of the form
a2(x)y′′(x)+a1(x)y′(x)+a0(x)y(x)=f(x)
The general solution of this nonhomogeneous second order linear differential equation is found as a sum of the general solution of the homogeneous equation,
a2(x)y′′(x)+a1(x)y′(x)+a0(x)y(x)=0,
and a particular solution of the nonhomogeneous equation. Recall from Chapter 1 that there are several approaches to finding particular solutions of nonhomogeneous equations. Any guess would be sufficient. An intelligent guess, based upon the Method of Undetermined Coefficients, was reviewed previously in Chapter 1. However, a more methodical method, which is first seen in a first course in differential equations, is the Method of Variation of Parameters. Also, we explored the matrix version of this method in Section 2.8. We will review this method in this section and extend it to the solution of boundary value problems.
While it is sufficient to derive the method for the general differential equation above, we will instead consider solving equations that are in SturmLiouville, or self-adjoint, form. Therefore, we will apply the Method of Variation of Parameters to the equation
ddx(p(x)dy(x)dx)+q(x)y(x)=f(x)
Note that f(x) in this equation is not the same function as in the general equation posed at the beginning of this section.
We begin by assuming that we have determined two linearly independent solutions of the homogeneous equation. The general solution is then given by
y(x)=c1y1(x)+c2y2(x).
In order to determine a particular solution of the nonhomogeneous equation, we vary the parameters c1 and c2 in the solution of the homogeneous problem by making them functions of the independent variable. Thus, we seek a particular solution of the nonhomogeneous equation in the form
yp(x)=c1(x)y1(x)+c2(x)y2(x)
In order for this to be a solution, we need to show that it satisfies the differential equation. We first compute the derivatives of yp(x). The first derivative is
y′p(x)=c1(x)y′1(x)+c2(x)y′2(x)+c′1(x)y1(x)+c′2(x)y2(x)
Without loss of generality, we will set the sum of the last two terms to zero. (One can show that the same results would be obtained if we did not. See Problem 8.2.) Then, we have
c′1(x)y1(x)+c′2(x)y2(x)=0.
Now, we take the second derivative of the remaining terms to obtain
y′′p(x)=c1(x)y′′1(x)+c2(x)y′′2(x)+c′1(x)y′1(x)+c′2(x)y′2(x).
Expanding the derivative term in Equation (8.3),
p(x)y′′p(x)+p′(x)y′p(x)+q(x)yp(x)=f(x),
and inserting the expressions for yp,y′p(x), and y′′p(x), we have
f(x)=p(x)[c1(x)y′′1(x)+c2(x)y′′2(x)+c′1(x)y′1(x)+c′2(x)y′2(x)]+p′(x)[c1(x)y′1(x)+c2(x)y′2(x)]+q(x)[c1(x)y1(x)+c2(x)y2(x)].
Rearranging terms, we find
f(x)=c1(x)[p(x)y′′1(x)+p′(x)y′1(x)+q(x)y1(x)]+c2(x)[p(x)y′′2(x)+p′(x)y′2(x)+q(x)y2(x)]+p(x)[c′1(x)y′1(x)+c′2(x)y′2(x)]
Since y1(x) and y2(x) are both solutions of the homogeneous equation. The first two bracketed expressions vanish. Dividing by p(x), we have that
c′1(x)y′1(x)+c′2(x)y′2(x)=f(x)p(x)
Our goal is to determine c1(x) and c2(x). In this analysis, we have found that the derivatives of these functions satisfy a linear system of equations (in the ci's):
c′1(x)y1(x)+c′2(x)y2(x)=0c′1(x)y′1(x)+c′2(x)y′2(x)=f(x)p(x)
This system is easily solved to give
c′1(x)=−f(x)y2(x)p(x)[y1(x)y′2(x)−y′1(x)y2(x)]c′2(x)=f(x)y1(x)p(x)[y1(x)y′2(x)−y′1(x)y2(x)].
We note that the denominator in these expressions involves the Wronskian of the solutions to the homogeneous problem. Recall that
W(y1,y2)(x)=|y1(x)y2(x)y′1(x)y′2(x)|
Furthermore, we can show that the denominator, p(x)W(x), is constant. Differentiating this expression and using the homogeneous form of the differential equation proves this assertion.
ddx(p(x)W(x))=ddx[p(x)(y1(x)y′2(x)−y′1(x)y2(x))]=y1(x)ddx(p(x)y′2(x)))+p(x)y′2(x)y′1(x)−y2(x)ddx(p(x)y′1(x)))−p(x)y′1(x)y′2(x)=−y1(x)q(x)y2(x)+y2(x)q(x)y1(x)=0
Therefore,
p(x)W(x)= constant.
So, after an integration, we find the parameters as
c1(x)=−∫xx0f(ξ)y2(ξ)p(ξ)W(ξ)dξc2(x)=∫xx1f(ξ)y1(ξ)p(ξ)W(ξ)dξ
where x0 and x1 are arbitrary constants to be determined later.
Therefore, the particular solution of (8.3) can be written as
yp(x)=y2(x)∫xx1f(ξ)y1(ξ)p(ξ)W(ξ)dξ−y1(x)∫xx0f(ξ)y2(ξ)p(ξ)W(ξ)dξ
As a further note, we usually do not rewrite our initial value problems in self-adjoint form. Recall that for an equation of the form
a2(x)y′′(x)+a1(x)y′(x)+a0(x)y(x)=g(x).
we obtained the self-adjoint form by multiplying the equation by
1a2(x)e∫a1(x)a2(x)dx=1a2(x)p(x)
This gives the standard form
(p(x)y′(x))′+q(x)y(x)=f(x)
where
f(x)=1a2(x)p(x)g(x)
With this in mind, Equation (8.13) becomes
yp(x)=y2(x)∫xx1g(ξ)y1(ξ)a2(ξ)W(ξ)dξ−y1(x)∫xx0g(ξ)y2(ξ)a(ξ)W(ξ)dξ
y′′−y′−6y=20e−2x.
We seek a particular solution to this equation. First, we note two linearly independent solutions of this equation are
y1(x)=e3x,y2(x)=e−2x.
So, the particular solution takes the form
yp(x)=c1(x)e3x+c2(x)e−2x.
We just need to determine the ci's. Since this problem is not in self-adjoint form, we will use
f(x)p(x)=g(x)a2(x)=20e−2x
as seen above. Then the linear system we have to solve is
c′1(x)e3x+c′2(x)e−2x=03c′1(x)e3x−2c′2(x)e−2x=20e−2x
Multiplying the first equation by 2 and adding the equations yields
5c′1(x)e3x=20e−2x
or
c′1(x)=4e−5x.
Inserting this back into the first equation in the system, we have
4e−2x+c′2(x)e−2x=0
leading to
c′2(x)=−4.
These equations are easily integrated to give
c1(x)=−45e−5x,c2(x)=−4x
Therefore, the particular solution has been found as
yp(x)=c1(x)e3x+c2(x)e−2x=−45e−5xe3x−4xe−2x=−45e−2x−4xe−2x
Noting that the first term can be absorbed into the solution of the homogeneous problem. So, the particular solution can simply be written as
yp(x)=−4xe−2x
This is the answer you would have found had you used the Modified Method of Undetermined Coefficients.
The formal solution in Equation (8.13) was not used in the last example. Instead, we proceeded from the Linear System for Variation of Parameters earlier in this section. This is the more natural approach towards finding the particular solution of the nonhomogeneous equation. Since we will be using Equation (8.13) to obtain solutions to initial value and boundary value problems, it might be useful to use it to solve this problem.
From the last example we have
y1(x)=e3x,y2(x)=e−2x
We need to compute the Wronskian:
W(x)=W(y1,y2)(x)=|e3xe−2x3e3x−2e−2x|=−5ex
Also, we need p(x), which is given by
p(x)=exp(−∫dx)=e−x
So, we see that p(x)W(x)=−5. It is indeed constant, just as we had proven earlier.
Finally, we need f(x). Here is where one needs to be careful as the original problem was not in self-adjoint form. We have from the original equation that g(x)=20e−2x and a2(x)=1. So
f(x)=p(x)a2(x)g(x)=20e−3x
Now we are ready to construct the solution.
yp(x)=y2(x)∫xx1f(ξ)y1(ξ)p(ξ)W(ξ)dξ−y1(x)∫xx0f(ξ)y2(ξ)p(ξ)W(ξ)dξ=e−2x∫xx120e−3ξe3ξ−5dξ−e3x∫xx020e−3ξe−2ξ−5dξ=−4e−2x∫xx1dξ+4e3x∫xx0e−5xdξ=−4ξe−2x|xx1−45e3xe−5ξ|xx0=−4xe−2x−45e−2x+4x1e−2x+45e−5x0e3x
Note that the first two terms we had found in the last example. The remaining two terms are simply linear combinations of y1 and y2. Thus, we really have the solution to the homogeneous problem contained within the solution when we use the arbitrary constant limits in the integrals. In the next section we will make use of these constants when solving initial value and boundary value problems.
In the next section we will determine the unknown constants subject to either initial conditions or boundary conditions. This will allow us to combine the two integrals and then determine the appropriate Green's functions.