MATH 219: Spring 2021-22
MATH 219: Spring 2021-22
MATH 219: Spring 2021-22
Spring 2021-22
Lecture 16
Lecture notes by Özgür Kişisel
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)
−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).
4y 00 + y = 2 sec(t/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:
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.
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.