Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

MATH 219: Spring 2021-22

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

MATH 219

Spring 2021-22
Lecture 16
Lecture notes by Özgür Kişisel

Content: The method of variation of parameters.


Suggested Problems: (Boyce, Di Prima, 9th edition)
§4.4: 3, 4, 5, 8, 11, 16
Suppose that we have a non-homogenous linear ODE with constant coefficients:
y (n) + a1 y (n−1) + . . . + an y = b(t).
In the previous lecture, we saw that if b(t) has a polynomial annihilator, then we
can use the method of undetermined coefficients to solve the problem. However, √
this condition is rather demanding. For instance, familiar functions such as 1/t, t
or tan t do not have polynomial annihilators. We still have a method that we can
use for such cases: variation of parameters. We can convert the ODE into a first
order n × n system and use variation of parameters for this system. However, since
we will only need to find the first component of the resulting solution vector, some
shortcuts can be taken. We will discuss these issues now.

1 The 2 × 2 case
Suppose that y1 and y2 are two linearly independent solutions of the homogenous
equation
y 00 + a1 y 0 + a2 y = 0.
Recall that we can convert this ODE into a first order linear system by setting
x1 = y, x2 = y 0 . Then  
y1 y2
Ψ(t) = 0
y1 y20
is a fundamental matrix for the system x0 = Ax + b associated to the ODE. The
system itself, by the way, can be written explicitly as
 0     
x1 0 1 x1 0
= + .
x2 −a2 −a1 x2 b(t)

1
In order to find x, use the variation of parameters formula:
Z
x = Ψ Ψ−1 bdt
Z  0  
1 y2 −y2 0
=Ψ dt
W (y1 , y2 ) −y10 y1 b(t)
 Z  
y1 y2 1 −y2 b(t)
= 0 dt.
y1 y20 W (y1 , y2 ) y1 b(t)

Recall that y = x1 . Therefore,

−y2 b(t)
Z Z
y1 b(t)
y = x1 = y 1 dt + y2 dt.
W (y1 , y2 ) W (y1 , y2 )

We obtained a nice formula for the 2 × 2 case which is applicable for any (continuous
or piecewise continuous) function b(t).

Example 1.1 Solve the ODE

4y 00 + y = 2 sec(t/2)

where −π < t < π.


Solution: The characteristic equation is 4λ2 + 1 = 0 whose roots are ±i/2. There-
fore yh = c1 y1 + c2 y2 = c1 cos(t/2) + c2 sin(t/2).

cos(t/2) sin(t/2) 1
W (y1 , y2 ) = 1
= .
− 2 sin(t/2) 21 cos(t/2) 2

Let us now use the formula. But note that b(t) = sec(t/2)/2 (the initial coefficient
of the ODE needs to be 1 if we wish to use the formula).

− sin(t/2) sec(t/2)/2
Z Z
cos(t/2) sec(t/2)/2
y = cos(t/2) dt + sin(t/2) dt
1/2 1/2
= cos(t/2)(2 ln | cos(t/2)| + c1 ) + sin(t/2)(t + c2 )
= c1 cos(t/2) + c2 sin(t/2) + 2 cos(t/2) ln | cos(t/2)| + t sin(t/2).

2
2 The n × n case
More generally, let us consider an nth order linear ODE
y (n) + a1 y (n−1) + . . . + an y = b(t).
Suppose that y1 , y2 , . . . , yn are n linearly independent solutions of the associated
homogenous equation. Then the fundamental matrix takes the form
 
y1 y2 ... yn
 y10 y20 ... yn0 
Ψ(t) =   ...
.
... ... ... 
(n−1) (n−1) (n−1)
y1 y2 . . . yn
We again have x = Ψ Ψ−1 bdt. It would be a lengthy computation to find all
R

entries of the vector x. On the other hand, all we need is its first entry x1 . We need
to quote one result from linear algebra in order to find x1 without finding all of x:

Theorem 2.1  (Cramer’s


 rule) Suppose that Bz = l where B is an n × n invertible
z1
 
l1
matrix, z =  ...  is a vector of unknowns and l = . . . is a given vector. Let Bi
 
zn ln
be the matrix obtained by replacing the ith column of B by the vector l. Then
det(Bi )
zi = .
det(B)

The proof will be omitted. It can be found in texts on linear algebra. (Actually,
the reader can reconstruct the proof without much difficulty: Since B is invertible,
the system must have a unique solution. Plug the proposed solution into the system
and see if it works. You will need to make one observation about determinants).
Let us apply Cramer’s rule to our case. Recall that x = Ψv. Then
Ψv0 = b.
Therefore if Ψi is the matrix obtained by replacing the ith column of Ψ by b then
det(Ψi )
vi0 = . This gives us
det(Ψ)
n Z
X det(Ψi )
y = x1 = yi dt.
i=1
det(Ψ)

3
There is one more small simplification that we can make. Notice that

y1 y 2 . . . 0 . . . y n y1 y2 ... 0 ... yn
0 0 0
0
y20 yn0

y y2 ... 0 ... yn y1 ... 0 ...
det(Ψi ) = 1 = b(t) .
...
(n−1) . . . . . . . . . . . . . . . ... ...
(n−1) (n−1) ... ... . . . . . .
y (n−1) (n−1) (n−1)
1 y2 . . . b(t) . . . yn y1 y2 ... 1 . . . yn
Let us denote the last determinant above by Wi , namely Wi is the determinant of the
 T
matrix obtained by replacing the ith column of Ψ(t) by the vector 0 0 . . . 0 1 .
Also, let us write W = det(Ψ). Then the variation of parameters formula takes the
form: n Z
X Wi
y = x1 = yi b(t) dt.
i=1
W
Note that for n = 2 this agrees with the formula found before.

Example 2.1 Solve the ODE


y (4) + 2y 00 + y = sin t.
by using variation of parameters.
Solution: First, let us find the roots of the characteristic equation:
λ4 + 2λ2 + 1 = 0
(λ2 + 1)2 = 0
λ1 = λ2 = i, λ3 = λ4 = −i.
Therefore a basis for the set of solutions of the associated homogenous equation is
y1 = cos t, y2 = sin t, y3 = t cos t, y4 = t sin t.

cos t sin t t cos t t sin t

− sin t cos t −t sin t + cos t t cos t + sin t
W = det(Ψ) =
− cos t − sin t −t cos t − 2 sin t −t sin t + 2 cos t

sin t − cos t t sin t − 3 cos t −t cos t − 3 sin t

cos t sin t t cos t t sin t

R1 +R3 →R3 ,R2 +R4 →R4
− sin t cos t −t sin t + cos t t cos t + sin t
=
0 0 −2 sin t 2 cos t
0 0 −2 cos t −2 sin t
= 4.

4

0 sin t t cos t t sin t

0 cos t −t sin t + cos t t cos t + sin t
W1 =
0 − sin t −t cos t − 2 sin t −t sin t + 2 cos t
1 − cos t t sin t − 3 cos t −t cos t − 3 sin t

0 sin t t cos t t sin t

R1 +R3 →R3 ,R2 +R4 →R4
0 cos t −t sin t + cos t t cos t + sin t
=
0 0 −2 sin t 2 cos t
1 0 −2 cos t −2 sin t

sin t t cos t t sin t

= − cos t −t sin t + cos t t cos t + sin t

0 −2 sin t 2 cos t

−t sin t + cos t t cos t + sin t t cos t t sin t
= − sin t + cos t

−2 sin t 2 cos t −2 sin t 2 cos t
= −2 sin t + 2t cos t.


cos t 0 t cos t t sin t

− sin t 0 −t sin t + cos t t cos t + sin t
W2 =
− cos t 0 −t cos t − 2 sin t −t sin t + 2 cos t

sin t 1 t sin t − 3 cos t −t cos t − 3 sin t

cos t 0 t cos t t sin t

R1 +R3 →R3 ,R2 +R4 →R4
− sin t 0 −t sin t + cos t t cos t + sin t
=
0 0 −2 sin t 2 cos t
0 1 −2 cos t −2 sin t

cos t t cos t t sin t

= − sin t −t sin t + cos t t cos t + sin t

0 −2 sin t 2 cos t

−t sin t + cos t t cos t + sin t t cos t t sin t
= cos t
+ sin t
−2 sin t 2 cos t −2 sin t 2 cos t
= 2 cos t + 2t sin t.

5

cos t sin t 0 t sin t

− sin t cos t 0 t cos t + sin t
W3 =
− cos t − sin t 0 −t sin t + 2 cos t
sin t − cos t 1 −t cos t − 3 sin t

cos t sin t 0 t sin t

R1 +R3 →R3 ,R2 +R4 →R4
− sin t cos t 0 t cos t + sin t
=
0 0 0 2 cos t
0 0 1 −2 sin t
= −2 cos t.

cos t sin t t cos t 0

− sin t cos t −t sin t + cos t 0
W4 =
− cos t − sin t −t cos t − 2 sin t 0
sin t − cos t t sin t − 3 cos t 1

cos t sin t t cos t 0

R1 +R3 →R3 ,R2 +R4 →R4
− sin t cos t −t sin t + cos t 0
=
0 0 −2 sin t 0
0 0 −2 cos t 1
= −2 sin t.

n Z
X Wi
y= yi b(t) dt
i=1
W
Z Z
cos t 2 sin t
= sin t + t sin t cos tdt + sin t cos t + t sin2 tdt
2 2
Z Z
t cos t t sin t
+ − sin t cos tdt + − sin2 tdt
2 2
sin t t2 t sin 2t 3 cos 2t
   
cos t t t cos 2t sin 2t
= − − + c1 + − − + c2
2 2 4 8 2 4 4 8
   
t cos t cos 2t t sin t sin 2t t
+ + c3 + − + c4
2 4 2 4 2

where c1 , c2 , c3 , c4 ∈ R.
We note that this particular example can also be solved by the method of undeter-
mined coefficients, which is a much faster way of finding the solution. The power of

6
variation of parameters is that it can be applied for an arbitrary right hand side. In
real life applications, the integrals can often be numerically evaluated and this gives
an effective procedure to find y once b(t) is given.

You might also like