Variation of the Parameters

Variation of the Parameters
This is another method we can apply to find a particular solution of a non-homogeneous
L.D.E..
We will develop the method in connection with a second order linear O.D.E. with
variables coefficients,
a0(x)y’’ + a1(x) y’ + a2(x)y = b(x) (1)
Suppose that y1(x) and y2(x) are linearly independent solutions of the corresponding
homogeneous equation,
a0(x)y’’ + a1(x) y’ + a2(x)y = 0
then the complementary solution of equation (1) is:
yc(x) = c1y1(x) + c2y2(x)
where c1 and c2 are arbitrary constants.
Replace the arbitrary constants c1 and c2 in the complementary solution by two functions
v1(x) and v2(x) to be determined such that
yp(x) = v1(x)y1(x) + v2(x)y2(x)
is a particular solution of equation (1).
This is the first condition new impose in order to determine v1(x) and v2(x). Since there
are two functions, we still have a second condition to impose, provided that this second
condition does not violate the first condition.
Let’s differentiate the function yp:
yp’ = v1(x) y1’(x) + v1’(x)y1(x) + v2(x) y2’(x) + v2’(x)y2(x).
At this point we impose the second condition. We simplify yp’ by demanding
v1’(x)y1(x) + v2’(x)y2(x) = 0
So, yp’ becomes
yp’ = v1(x) y1’(x) + v2(x) y2’(x)
And the second derivative is
yp’’ = v1(x) y1’’(x) + v1’(x)y1’(x) + v2(x) y2’’(x) + v2’(x)y2’(x).
Substituting in equation(1)
a0(x) [v1(x) y1’’(x) + v1’(x)y1’(x) + v2(x) y2’’(x) + v2’(x)y2’(x)] + a1(x)[ v1(x) y1’(x) +
v2(x) y2’(x)] + a2(x) [v1(x)y1(x) + v2(x)y2(x)] = b(x)
or
v1(x)[ a0(x)y1’’(x) + a1(x) y1’(x) + a2(x)y1(x)] + v2(x)[ a0(x)y2’’(x) + a1(x) y2’(x) +
a2(x)y2(x)] + a0(x)[ v1’(x)y1’(x) + v2’(x)y2’(x)] = b(x)
Since y1 and y2 are solutions of the corresponding homogeneous equation, the first two
terms on the left side of the equation are zero.
Then,
a0(x)[ v1’(x)y1’(x) + v2’(x)y2’(x)] = b(x)
or
v1’(x)y1’(x) + v2’(x)y2’(x) = b(x)/ a0(x)
So, the two imposed conditions have created a system of two equations that the
derivatives of the two unknown functions v1 and v2 are satisfying.
!v1’(x)y1 (x) + v2 ’(x)y 2 (x) = 0
#
b(x)
"
#v1’(x)y1’(x) + v2 ’(x)y 2 ’(x) = a (x)
0
$
The determinant of the system is the Wronskian of y1 and y2
y1 y 2
W(y1, y 2 ) =
"0
y1! y 2!
since y1 and y2 are linearly independent. Then the system has a unique solution.
0
y1 (x)
b(x)
y ! (x)
a 0 (x) 1
b(x)y 2 (x)
v1! (x) =
="
W[y1, y 2 ]
a 0 (x)W[y1, y 2 ]
and
y1 (x)
0
b(x)
y1! (x)
a 0 (x)
b(x)y1 (x)
v2! (x) =
=
W[y1, y 2 ]
a 0 (x)W[y1, y 2 ]
Then
v1 (x) = # v1! (x)dx = " #
b(x)y 2 (x)
dx
a 0 (x)W[y1, y 2 ]
and
v2 (x) = " v2! (x)dx =
b(x)y (x)
" a 0 (x)W[y1 1, y2 ] dx
Examples:
Solve the non-homogeneous L.O.D.E.,
1) y’’ + y = sec x tan x
Corresponding homogeneous equation: y’’ + y = 0
Characteristic equation: r2 + 1 = 0
Zeros are: r1 = i, and r2 = -i
Complementary solution: yc(x) = c1 cos x + c2 sin x.
Non-homogeneous term is: b(x) = sec x tan x.
Assume yp(x) = v1(x) cos x + v2(x) sin x is a particular solution of the equation, where the
functions v1 and v2 will be determined at the end of the process.
Condition 1 is yp(x) is a particular solution of the equation.
Let’s compute the first derivative of yp(x):
yp’(x) = -v1(x) sin x + v2(x) cos x + v1’(x) cos x + v2’(x) sin x.
Let’s impose condition 2:
v1’(x) cos x + v2’(x) sin x = 0
so yp’ becomes
yp’(x) = -v1(x) sin x + v2(x) cos x
Compute the second derivative of yp(x):
yp’’(x) = -v1(x) cos x - v2(x) sin x - v1’(x) sin x + v2’(x) cos x.
Substitute into the equation:
-v1(x) cos x - v2(x) sin x - v1’(x) sin x + v2’(x) cos x + v1(x) cos x + v2(x) sin x =
- v1’(x) sin x + v2’(x) cos x = sec x tan x.
Thus, we obtain a system of two equations in the unknowns v1’ and v2’:
v1’(x) cos x + v2’(x) sin x = 0
- v1’(x) sin x + v2’(x) cos x = sec x tan x
Solving the system:
0
sin x
sec x tan x cos x ! sin x sec x tan x
v1 '(x) =
=
= ! tan 2 x
cos x sin x
1
! sin x cos x
cos x
0
! sin x sec x tan x cos x sec x tan x
v2 '(x) =
=
= tan x
cos x sin x
1
! sin x cos x
then,
v1 (x) = ! v1 '(x)dx = ! " tan 2 x!dx = " ! sec 2 x " 1 dx = " tan x + x = x " tan x
(
v2 (x) = ! v2 '(x)dx = ! tan x!dx =
)
sin x
! cos x dx = " ln cos x = ln sec x
Then, yp(x) = (x – tan x) cos x + ln|sec x| sin x
and the general solution is:
y(x) = yc(x) + yp(x) = c1 cos x + c2 sin x + (x – tan x) cos x + ln|sec x| sin x.
2) Consider the equation with variable coefficients
d2y
dy
2
x +1
! 2x + 2y = 6 x 2 + 1
2
dx
dx
(
)
(
)
2
The corresponding homogeneous equation has a solution,
yc(x) = c1 x + c2(x2 – 1)
Assume yp(x) = v1(x) x + v2(x) (x2 – 1) is a particular solution of the equation, where the
functions v1 and v2 will be determined at the end of the process.
Condition 1 is yp(x) is a particular solution of the equation.
Let’s compute the first derivative of yp(x):
yp’(x) = v1(x) + v2(x) 2x + v1’(x) x + v2’(x) (x2 – 1).
Let’s impose condition 2:
v1’(x) x + v2’(x) (x2 – 1) = 0
so yp’ becomes
yp’(x) = v1(x) + v2(x) 2x
Compute the second derivative of yp(x):
yp’’(x) = v1’(x) + v2’(x) 2x + 2v2(x)
Substitute into the equation:
(x2 + 1) (v1’(x) + v2’(x) 2x + 2v2(x)) – 2x(v1(x) + v2(x) 2x) + 2(v1(x) x + v2(x) (x2 – 1)) =
(x2 + 1) (v1’(x) + v2’(x) 2x) + 2v2(x)x2 + 2v2(x) – 2xv1(x) – 4x2v2(x) + 2xv1(x) + 2x2v2(x)
– 2v2(x) = 6(x2 + 1)2.
or
(x2 + 1) (v1’(x) + v2’(x) 2x) = 6(x2 + 1)2
and dividing by (x2 + 1)
v1’(x) + 2x v2’(x) = 6(x2 + 1)
Thus, we obtain a system of two equations in the unknowns v1’ and v2’:
v1’(x) x + v2’(x) (x2 – 1) = 0
v1’(x) + 2x v2’(x) = 6(x2 + 1)
Solving the system:
0
x2 ! 1
v1 '(x) =
(
2x
x x2 ! 1
1
2x
x
v2 '(x) =
)
6 x2 + 1
(
0
)=
1 6 x2 + 1
x x2 ! 1
1
2x
=
!6(x 2 + 1)(x 2 ! 1) !6(x 2 + 1)(x 2 ! 1)
=
= !6(x 2 ! 1)
2
2
2
2x ! x + 1
x +1
6x(x 2 + 1)
6x(x 2 + 1)
=
= 6x
2x 2 ! x 2 + 1
x2 + 1
then
v1(x) = -2x3 + 6x and v2(x) = 3x2
Then, yp(x) = (-2x3 + 6x) x+ 3x2(x2 - 1) = x4 + 3x2
and the general solution is:
y(x) = yc(x) + yp(x) = c1 x + c2(x2 – 1) + x4 + 3x2.
3) y’’ – 3y’ + 2y = (1 + e-x)-1
Corresponding homogeneous equation: y’’ – 3y’ + 2y = 0
Characteristic equation: r2 – 3r + 2 = (r – 1)(r – 2)
Zeros are: r1 = 1, and r2 = 2
Complementary solution: yc(x) = c1 ex + c2 e2x.
Non-homogeneous term is: b(x) = (1 + e-x)-1.
Assume yp(x) = v1(x) ex + v2(x) e2x is a particular solution of the equation, where the
functions v1 and v2 will be determined at the end of the process.
Condition 1 is yp(x) is a particular solution of the equation.
Let’s compute the first derivative of yp(x):
yp’(x) = v1(x) ex + 2v2(x) e2x + v1’(x) ex + v2’(x) e2x.
Let’s impose condition 2:
v1’(x) ex + v2’(x) e2x = 0
so yp’ becomes
yp’(x) = v1(x) ex + v2(x) e2x
Compute the second derivative of yp(x):
yp’’(x) = v1(x) ex + 4v2(x) e2x + v1’(x) ex + v2’(x) e2x.
Substitute into the equation:
v1(x) ex + 4v2(x) e2x + v1’(x) ex + v2’(x) e2x +3v1(x) ex + 3v2(x) e2x + 2v1(x) ex + 2v2(x) e2x
= v1’(x) ex + 2v2’(x) e2x = (1 + e-x)-1.
Thus, we obtain a system of two equations in the unknowns v1’ and v2’:
v1’(x) ex + v2’(x) e2x = 0
v1’(x) ex + 2v2’(x) e2x = (1 + e-x)-1
Solving the system:
e 2x
0
(1 + e )
v '(x) =
!x !1
1
ex
e 2x
ex
2e 2x
ex
v2 '(x) =
e 2x
=
(
!e 2x 1 + e !x
)
!1
=
e 3x
e !x
1 + e !x
0
(1 + e )
!x !1
e 2x
ex
ex
e 2x
2e 2x
=
(
e x 1 + e !x
e 3x
)
!1
=
e !2x
1 + e !x
then,
"e "x !
v1 (x) = ! v1 '(x)dx = !
dx = ln 1 + e "x
"x
1+ e
e "2x !
e "x "x
u
1 &
#u +1
v2 (x) = ! v2 '(x)dx = !
!dx = !
e dx = " !
du = " ! %
"
du =
"x
"x
u +1
1+ e
1+ e
$ u + 1 u + 1 ('
ln 1 + e "x " e "x ,!!!!!!if!u = 1 + e "x ,!du = "e "x
Then, yp(x) = ex ln|1 + e-x| - ex + e2x ln|1 + e-x|
and the general solution is:
y(x) = yc(x) + yp(x) = c1 ex + c2 e2x + ex ln|1 + e-x| - ex + e2x ln|1 + e-x|
Remark: This method can be extended to higher-order linear equations. New conditions
must be imposed.
4) y’’’ + y’ = csc x
Corresponding homogeneous equation: y’’’ + y’ = 0
Characteristic equation: r3 + r = r(r2 + 1) = 0
Zeros are: r1 = 0, r2 = i, r3 = -i.
Complementary solution: yc(x) = c1 + c2 cos x + c3 sin x.
Non-homogeneous term is: b(x) = csc x.
Assume yp(x) = v1(x) + v2(x) cos x + v3(x) sin x is a particular solution of the equation,
where the functions v1, v2, and v3 will be determined at the end of the process.
Condition 1 is yp(x) is a particular solution of the equation.
Let’s compute the first derivative of yp(x):
yp’(x) = -v2(x) sin x + v3(x) cos x + v1’(x) + v2’(x) cos x + v3’(x) sin x.
Let’s impose condition 2:
v1’(x) + v2’(x) cos x + v3’(x) sin x = 0
so yp’ becomes
yp’(x) = -v2(x) sin x + v3(x) cos x
Compute the second derivative of yp(x):
yp’’(x) = -v2(x) cos x – v3(x) sin x – v2’(x) sin x + v3’(x) cos x.
Let’s impose condition 3:
– v2’(x) sin x + v3’(x) cos x = 0
so yp’’ becomes
yp’’(x) = -v2(x) cos x – v3(x) sin x
Compute the third derivative of yp(x)
yp’’’(x) = -v2’(x) cos x – v3’(x) sin x + v2(x) sin x – v3(x) sin x
Substitute into the equation:
-v2’(x) cos x – v3’(x) sin x + v2(x) sin x – v3(x) sin x - v2(x) sin x + v3(x) cos x =
-v2’(x) cos x – v3’(x) sin x = csc x
Thus, we obtain a system of three equations in the unknowns v1’,v2’and v3’:
v1’(x) + v2’(x) cos x + v3’(x) sin x = 0
– v2’(x) sin x + v3’(x) cos x = 0
-v2’(x) cos x – v3’(x) sin x = csc x
Solving the system:
0
cos x
sin x
0 ! sin x cos x
csx ! cos x ! sin x csc x
v1 '(x) =
=
1 cos x sin x
1
0 ! sin x cos x
0 ! cos x ! sin
1
0
sin x
0
0
cos x
0 csc x ! sin x
! cot x
v2 '(x) =
=
1 cos x sin x
1
0 ! sin x cos x
0 ! cos x ! sin
1 cos x
0
0 ! sin x
0
0 ! cos x csc x !1
v3 '(x) =
=
= !1
1 cos x sin x
1
0 ! sin x cos x
0 ! cos x ! sin
then,
v1 (x) = " csc x!dx = ln ( csc x ! cot x )
v2 (x) = " ! cot x!dx =!! ln sin x = ln csc x
v3 (x) = " !dx = !x
So,
yp(x) = ln(csc x – cot x) + ln|csc x| cos x - x sin x.
The general solution is:
y(x) = yc(x) = yp(x) = c1 + c2 cos x + c3 sin x + ln(csc x – cot x) + ln|csc x| cos x - x sin x