16.3.2 Equations With Variable Coefficients – Variation Of Parameters
| 16.3.2 |
Return To Contents
Go To Problems & Solutions
| 1. Second-Order Linear Non-Homogeneous Differential Equations With |
In this section, we’ll use the abbreviations:
| “DE” | for | “differential equation”, |
| “GS” | for | “general solution”, |
| “HDE” | for | “homogeneous differential equation”, |
| “HE” | for | “homogeneous equation”, |
| “NHDE” | for | “non-homogeneous differential equation”, |
| “NHE” | for | “non-homogeneous equation”, and |
| “PS” | for | “particular solution”. |
Recall that a second-order linear homogeneous differential equation with variable coefficients is one of the form:
y” + b(x) y‘ + c(x) y = 0,
where b(x) or c(x) or both are non-constant functions of x. So of course when the right-hand side is a function f (x) instead of 0, the equation becomes non-homogeneous.
Definition 1.1 – Second-Order Linear Non-Homogeneous Differential Equations With
Variable Coefficients
| A differential equation of the form: where b(x) or c(x) or both are non-constant continuous functions and where f (x) is a non-0 continuous function, is |
Recall that while the equation is linear (in y, y‘, and y”), each function y, y‘, and y” doesn’t have to be linear. For example, y =
2x + 3 is linear while y = x2 + 3 and y = e2x + 3 aren’t. Neither do the functions b(x), c(x), and f (x).
Return To Top Of Page Go To Problems & Solutions
Similar to the case of constant-coefficients equations as presented in Section 16.3.1 Theorem 2.1, the GS of a NHDE equals the
GS of the corresponding HDE plus a PS of the NHDE.
Theorem 2.1 – General Solutions Of The Non-Homogeneous Equations
| Let: ((GS Of NHE) = (GS Of HE) + (A PS Of NHE)). |
Return To Top Of Page Go To Problems & Solutions
| 3. The Method Of Variation Of Parameters |
The solving of a HE with variable coefficients is discussed in Section 16.2.2. So now we develop a procedure to find a PS of a
NHE with variable coefficients, called the method of variation of parameters.
Observation On Solutions Of First-Order Equations
In Section 16.1.3, we present a method to solve the first-order DE y‘ + p(x) y = q(x). Let’s use this method to solve y‘ + p(x) y
= 0:
We’ve just shown that the GS of the HE:
y‘ + p(x) y = 0
is:
where u is a function. We observe that the GS of the NHE is obtained from the GS of the corresponding HE by replacing the
constant C by a function u.
The Method Of Variation Of Parameters
Let y1 and y2 be two linearly independents PSs of the second-order HE:
{3.1} Problem & Solution 7
Of course yp is a solution of the NHE [3.3] if Eq. [3.6] is satisfied and if:
We need only one yp, hence only one u1 and one u2; we choose the simplest ones by setting the constants of integration for u1
and u2 to 0. Anyway, lets’ see what happens if the constants of integration are some k1 and k2 respectively. Suppose:
u1 = h1(x) + k1 and u2 = h2(x) + k2.
Then:
yp = u1 y1 + u2 y2 = (h1(x) + k1) y1 + (h2(x) + k2) y2 = h1(x) y1 + h2(x) y2 + (k1y1 + k2y2).
But k1y1 + k2y2 is a PS of the HE [3.1]. It follows that when we substitute the expression for yp into the NHE [3.3], all the terms
containing k1 or k2 sum up to 0 ((k1 y1 + k2 y2)” + b(x)(k1 y1 + k2 y2)’ + c(x)(k1 y1 + k2 y2) = 0). It follows that choosing the
constants of integration to be any k1 and k2 yields the same PS yp of the NHE as choosing them both to be 0.
The above procedure replaces constants or parameters c1 and c2 in the GS of a HE by variables u1 and u2 respectively to obtain
a PS of the corresponding NHE. Hence it’s called the method of variation of parameters or the method of variation of
constants. It’s also called the Lagrange method, as it’s due to the French mathematician Joseph Louis Lagrange (1736 –
1813).
We’ve essentially proved the following theorem.
Theorem 3.1 – Solutions Of Non-Homogeneous Equations By The Method Of Variation Of
Parameters
| Consider the non-homogeneous equation: Then: where c1 and c2 are arbitrary constants. |
Remarks 3.1
a. Note that yh = c1 y1 + c2 y2 is the GS of the HE [3.12] and remember that yp = u1 y1 + u2 y2 is a PS of the corresponding NHE
[3.11]. A PS of the NHE is built on 2 linearly independent PSs of the corresponding HE.
b. A PS yp of the NHE is yp = u1y1 + u2y2, where y1 and y2 are linearly independent PSs of the HE. The unknowns in the system
of equations obtained are the derivatives of u1 and u2, not u1 and u2.
c. The method of variation of parameters first finds a PS of a NHE, then adds it to the GS of the associated HE to obtain the GS
of the NHE.
Example 3.1
Consider the NHE:
a. Verify that y1 = x and y2 = 1/x are linearly independent solutions of the homogeneous counterpart of the given equation.
b. Solve the given equation.
Solution
which of course isn’t a constant. Thus y1 = x and y2 = 1/x are linearly independent.
b. Let yp = u1y1 + u2y2 = u1x + u2/x be a PS of the given NHE. We have:
using partial fractions:
where c1 and c2 are arbitrary constants.
EOS
Remark 3.2
In integrating to get u1 and u2, we choose u1 and u2 with the constants of integration equal to 0. Remember we need only one
PS yp = u1y1 + u2 y2, and so we need only one u1 and one u2. We choose the simplest u1 and u2, the ones with the constants of
integration equal to 0.
Return To Top Of Page Go To Problems & Solutions
| 4. For Non-Homogeneous Equations With Constant Coefficients |
The procedure of the method of variation of parameters doesn’t require that the coefficients be variable functions. So the
method also applies to NHEs with constant coefficients.
Example 4.1
Consider the constant-coefficients NHE:
y” – y = e2x.
a. Solve the corresponding HE y” – y = 0.
b. Solve the NHE by the method of undetermined coefficients.
c. Solve the NHE by the method of variation of parameters.
d. Are the answers in parts b and c the same?
Note
For part a, we use the method of characteristic equation; see Section 16.2.1 Theorem 3.1.
Solution
d. Yes.
EOS
When The Right-Hand Side Isn’t In The Right Form
For constant-coefficients NHE, the method of undetermined coefficients applies efficiently only when the right-hand side of the
constant-coefficients NHE:
y” + by‘ + cy = f (x),
namely the function f (x), is in the right form. See the table in Section 16.3.1 Part 6. When f (x) isn’t in the right form, another
method, for example the method of variation of parameters, is necessary.
Example 4.2
Solve the DE y” + y = tan x.
Solution
The GS of the NHE is y = c1 cos x + c2 sin x + (sin x – ln |sec x + tan x|) cos x – cos x sin x, or:
y = c1 cos x + c2 sin x – cos x ln |sec x + tan x|).
EOS
Remarks 4.1
Return To Top Of Page Go To Problems & Solutions
| 5. Various Types Of Equations And Various Methods |
We now summarize the types of second-order linear DEs and the methods used to solve them that have been discussed in this
chapter. In the two tables below, we use the following abbreviations:
| “coeff” | for | “coefficients”, |
| “const” | for | “constant”, and |
| “var” | for | “variable”. |
{5.1} Section 16.2.1 Theorem 3.1
{5.2} Section 16.2.2 Part 4
{5.3} Section 16.3.1 Theorem 3.1
{5.4} Section 16.3.1 Part 6
{5.5} Part 4
{5.6} Theorem 3.1
We now summarize the methods and their uses.
{5.7} Section 16.2.1 Theorem 3.1
{5.8} Section 16.2.2 Part 4 and Theorem 3.1 Of Same Section
{5.9} Section 16.3.1 Part 6
{5.10} Part 4 and Theorem 3.1
Return To Top Of Page
1. Consider the NHE:
a. Verify that y1 = x and y2 = x2 are linearly independent solutions of the homogeneous counterpart of the above equation.
b. Solve the above equation.
Solution
using integration by parts we have:
Return To Top Of Page
2. Consider the constant-coefficients NHE:
y” – 3y‘ + 2y = 6e3x.
a. Solve the corresponding HE y” – 3y‘ + 2y = 0.
b. Solve the NHE by the method of undetermined coefficients.
c. Solve the NHE by the method of variation of parameters.
d. Are the answers in parts b and c the same?
Solution
The GS of the NHE is y = c1ex + c2e2x – 3e2xex + 6exe2x = c1ex + c2e2x + 3e3x.
d. Yes
Return To Top Of Page
3. Consider the constant-coefficients NHE:
y” + 4y = 3 sin x.
a. Solve the corresponding HE y” + 4y = 0.
b. Solve the NHE by the method of undetermined coefficients.
c. Solve the NHE by the method of variation of parameters.
Solution
So the GS of the NHE is y = A cos 2x + B sin 2x + sin x.
Return To Top Of Page
4. Find the GS of the constant-coefficients NHE:
y” + 4y = 16x sin 2x.
See also Problem & Solution 5.
Note
When finding a PS of a constant-coefficients NHE, if f (x) is in the right form for the method of undetermined coefficients and if we’re not asked to use the method of variation of parameters, we should try the method of undetermined coefficients, since it
doesn’t involve integration. However for this method, we have to remember the correct form of the working trial PS.
Solution
b1 = 0, a1 = 16/(–8) = –2, a0 = –2(0)/(–4) = 0, b0 = –2(–2)/4 = 1,
yp = ((–2)x2 + 0x) cos 2x + (0x2 + 1x) sin 2x = – 2x2 cos 2x + x sin 2x.
Consequently the GS of the NHE is y = A cos 2x + B sin 2x – 2x2 cos 2x + x sin 2x = (– 2x2 + A) cos 2x + (x + B) sin 2x.
Return To Top Of Page
5. Prove by using the method of variation of parameters that the GS of the constant-coefficients NHE:
y” + 4y = 16x sin 2x
is:
y = (– 2x2 + A) cos 2x + (x + B) sin 2x,
where A and B are arbitrary constants. See also Problem & Solution 4.
Solution
Then:
Because A + 1/4 is an arbitrary constant just like A, let’s re-use the letter A for A + 1/4. Therefore the GS of the NHE is:
y = (– 2x2 + A) cos 2x + (x + B) sin 2x.
Note
In Problem & Solution 4, a PS of the equation y” + 4y = 16x sin 2x is found to be yp = – 2x2 cos 2x + x sin 2x. In this Problem
& Solution 5, a PS of the same equation is found to be yp = (– 2x2 + 1/4) cos 2x + x sin 2x. It’s easy to verify that they both
indeed are solutions of the mentioned equation.
Return To Top Of Page
6. Determine the GS of the constant-coefficients NHE:
Note
Here f (x) isn’t in the right form for the method of undetermined coefficients. So we won’t waste our time trying that method. We
have to employ the method of variation of parameters.
Solution
So the GS of the NHE is:
y = c1ex + c2xex – ex ln |1 – x| – ex = ex(c1 + c2x – ln |1 – x| – 1) = ex(c1 + c2x – ln |1 – x|),
where we re-use the letter c1 for the arbitray constant c1 – 1.
Return To Top Of Page
7. We now prove that the PS yp = u1 y1 + u2 y2 of the NHE y” + b(x) y‘ + c(x) y = f (x), where y1 and y2 are linearly
independent PSs of the homogeneous counterpart of this DE, doesn’t depend on the expression:
that’s in Eq. [3.5] and that we set equal to 0 as done in Eq. [3.6], for which the PS is:
c. Prove that:
Solution
Return To Top Of Page Return To Contents