Ordinary Differential Equations Dr. Marco A Roque Sol 12/01/2015

advertisement
Systems of First Order Linear Equations
Ordinary Differential Equations
Dr. Marco A Roque Sol
12/01/2015
Dr. Marco A Roque Sol
Ordinary Differential Equations
Systems of First Order Linear Equations
Review of Matrices
Systems of Linear Algebraic Equations; Linear Independence, Eig
Review of Matrices
Matrix Multiplication
Let A and B, m × p and p × n matrices respectively
AB = (cij )m×n
where
cij =
p
X
aik bkj
k=1


...
...
. . .

...


(AB)ij = cij = a

a
.
.
.
a
i1
i2
in


..
...
.
Dr. Marco A Roque Sol
. . . b1j
. . . b2j
.
. . . ..
. . . bnj
Ordinary Differential Equations

...
. . .


. . .
...
Systems of First Order Linear Equations
Review of Matrices
Systems of Linear Algebraic Equations; Linear Independence, Eig
Review of Matrices
OBS
In general, when AB is defined, not necessarily BA is also defined,
but even in that case, we have in general
AB 6= BA
Example 7.1
Let A and B the matrices

1 −2

A= 0 2
2 1
Find A + B,
A − B,
defined by



1
2 1 −1
−1 B = 1 −1 0 
1
2 −1 1
3A
AB,
Dr. Marco A Roque Sol
BA
Ordinary Differential Equations
Systems of First Order Linear Equations
Review of Matrices
Systems of Linear Algebraic Equations; Linear Independence, Eig
Review of Matrices
Solution

 

1 −2 1
2 1 −1
A + B = 0 2 −1 + 1 −1 0  =
2 1
1
2 −1 1



 

1 −2 1
2 1 −1
A − B = 0 2 −1 − 1 −1 0  =
2 1
1
2 −1 1

3 −1 0
1 1 −1
4 0
2

−1 −3 2
−1 3 −1
0
2
0

 

1 −2 1
3 −6 3
3A = 3 0 2 −1 = 0 6 −3
2 1
1
6 3
3
Dr. Marco A Roque Sol
Ordinary Differential Equations
Systems of First Order Linear Equations
Review of Matrices
Systems of Linear Algebraic Equations; Linear Independence, Eig
Review of Matrices
AB =
BA =



1 −2 1
2 1 −1
0 2 −1 1 −1 0  =
2 1
1
2 −1 1



2 1 −1
1 −2 1
1 −1 0  0 2 −1 =
2 −1 1
2 1
1
Dr. Marco A Roque Sol


2 2
0
0 −1 −1
7 0 −1


0 −3 0
1 0 2 6= AB
4 −5 4
Ordinary Differential Equations
Systems of First Order Linear Equations
Review of Matrices
Systems of Linear Algebraic Equations; Linear Independence, Eig
Review of Matrices
Example 7.2
Let C and D the matrices defined by


2 1
1 −2 1


C = 1 −1
D=
0 2 −1
2 −1
Find CD and DC.
Solution
Since C and D are 3 × 2 and 2 × 3 matrices respectively, then CD
is a well defined 3 × 3 matrix and DC is a well defined 2 × 2 matrix




2 1
2 −2 1
1 −2 1
CD = 1 −1
= 1 −4 2
0 2 −1
2 −1
2 −6 3
Dr. Marco A Roque Sol
Ordinary Differential Equations
Systems of First Order Linear Equations
Review of Matrices
Systems of Linear Algebraic Equations; Linear Independence, Eig
Review of Matrices
DC =
1 −2 1
0 2 −1


2 1
1 −1 =
2 −1
2 2
6= CD
0 −1
Example 7.3
Using matrix operations rewrite the linear system
a11 x1 + a12 x2 + . . . + a1n xn =
a21 x1 + a22 x2 + . . . + a2n xn =
..
.
b1
b2
..
.
am1 x1 + am2 x2 + . . . + amn xn = bm
in terms of matrices.
Dr. Marco A Roque Sol
Ordinary Differential Equations
Systems of First Order Linear Equations
Review of Matrices
Systems of Linear Algebraic Equations; Linear Independence, Eig
Review of Matrices
Solution
Starting with the system
a11 x1 + a12 x2 + . . . + a1n xn =
a21 x1 + a22 x2 + . . . + a2n xn =
..
.
b1
b2
..
.
am1 x1 + am2 x2 + . . . + amn xn = bm
and choosing


a11 a12 . . . a1n
 a21 a22 . . . a2n 


A=

..


.
am1 am2 . . . amn
Dr. Marco A Roque Sol


x1
 x2 
 
X= . 
 .. 

b1
 b2 
 
B= . 
 .. 
xm
Ordinary Differential Equations

bm
Systems of First Order Linear Equations
Review of Matrices
Systems of Linear Algebraic Equations; Linear Independence, Eig
Review of Matrices
we get

a11 x1 + a12 x2 + . . . + a1n xn
a21 x1 + a22 x2 + . . . + a2n xn
..
.


AX = 

am1 x1 + am2 x2 + . . . + amn xn

b1
  b2 
  
 =  ..  = B =⇒ AX = B
  . 


bm
Types of Matrices
An m × n matrix A = (aij )m×n is a
1) Zero matrix if aij = 0;
i = 1, 2, ..., m,
j = 1, 2, ..., n
2) Square Matrix if m = n.
Dr. Marco A Roque Sol
Ordinary Differential Equations
Review of Matrices
Systems of Linear Algebraic Equations; Linear Independence, Eig
Systems of First Order Linear Equations
Review of Matrices


2 −2 1
A = 1 −4 2 ;
2 −6 3
3 7
B
5 −4
3) Identity
matrix (I) (n × n) if aij = δij where
1 i =j
δij =
, (Kronecker Delta
0 i 6= j
https://en.wikipedia.org/wiki/Kronecker_delta )

1


A=I=


Dr. Marco A Roque Sol
0

..





1
0
.
1
Ordinary Differential Equations
Review of Matrices
Systems of Linear Algebraic Equations; Linear Independence, Eig
Systems of First Order Linear Equations
Review of Matrices
4) Symetric Matrix( n × n) if AT = A or aij = aji ;
i = 1, 2, ..., m, j = 1, 2, ..., n
5) Triangular Matrix (n × n)
5a) Upper Triangular Matrix (U) if uij = aij = 0,
a11 · · · · · ·

a22

U=
..
.


0
Dr. Marco A Roque Sol
a1n
i >j


.. 

. 
ann
Ordinary Differential Equations
Review of Matrices
Systems of Linear Algebraic Equations; Linear Independence, Eig
Systems of First Order Linear Equations
Review of Matrices
5b) Lower Triangular Matrix (L) if lij = uij = 0,



L=



a11
a22
0
..
..
.
i <j
···





.
···
ann
6) Diagonal Matrix(n × n) (D) if aij = dij where dij = Di δij

.. 
D ··· ···
.
 1



D


2
D=

..


.


..
. · · · · · · Dn
0
0
Dr. Marco A Roque Sol
Ordinary Differential Equations
Systems of First Order Linear Equations
Review of Matrices
Systems of Linear Algebraic Equations; Linear Independence, Eig
Review of Matrices
7) Invertible Matrix (n × n) If A is a square matrix (n × n) and
there exists an n × n matrix B such that
AB = BA = I
The matrix B is denoted by A−1 and is called the Inverse Matrix
and A is called invertible or nonsingular matrix. Matrices that do
not have an inverse are called it singular or noninvertible.
OBS
A−1 is the notation for the inverse of A, but keep in mynd that
A−1 6=
Dr. Marco A Roque Sol
1
A
Ordinary Differential Equations
Systems of First Order Linear Equations
Review of Matrices
Systems of Linear Algebraic Equations; Linear Independence, Eig
Review of Matrices
There are various ways to compute A−1 from A, assuming that it
exists.
One way is the cofactor expansion. Associated with each
element aij of a given matrix is the minor Mij from, which is the
determinant ( not defined yet !!!) of the matrix
Mij is obtained by deleting the ith row and jth column of the
original matrix that is, the row and column containing aij .
Dr. Marco A Roque Sol
Ordinary Differential Equations
Systems of First Order Linear Equations
Review of Matrices
Systems of Linear Algebraic Equations; Linear Independence, Eig
Review of Matrices
Also associated with each element aij , is the cofactor Cij defined
by the equation
Cij = (−1)n Mij
If B = A−1 , then it can be shown that the general element bij is
given by
bij =
Cij
detA
However, one way to do it is using elementary row operations.
There are three such operations:
Dr. Marco A Roque Sol
Ordinary Differential Equations
Systems of First Order Linear Equations
Review of Matrices
Systems of Linear Algebraic Equations; Linear Independence, Eig
Review of Matrices
1. Interchange of two rows.
2. Multiplication of a row by a nonzero scalar.
3. Addition of any multiple of one row to another row.
The transformation of a matrix by a sequence of elementary row
operations is referred to as row reduction or Gaussian
elimination. Starting with the matrix A we build the m × 2n
Augmented Matrix
[A|I]
and using elementary row operations we tranforme it into
I|A−1
Dr. Marco A Roque Sol
Ordinary Differential Equations
Systems of First Order Linear Equations
Review of Matrices
Systems of Linear Algebraic Equations; Linear Independence, Eig
Review of Matrices
Example 7.4
Find the inverse of


1 −1 −1
A = 3 −1 2 
2 2
3
Solution
First of all, let’s build the augmented matrix


1 −1 −1 1 0 0




A = 3 −1 2 0 1 0


2 2
3 0 0 1
Dr. Marco A Roque Sol
Ordinary Differential Equations
Systems of First Order Linear Equations
Review of Matrices
Systems of Linear Algebraic Equations; Linear Independence, Eig
Review of Matrices
(a) Obtain zeros in the off-diagonal positions in the first column by
adding (3) times the first row to the second row and adding (2)
times the first row to the third row.


1 −1 −1 1 0 0




5 −3 1 0
A = 0 2


0 4
5 −2 0 1
(b) Obtain a 1 in the diagonal position in the second column by
multiplying the second row by 1/2 .


1 −1 −1 1
0 0




A = 0 1 5/2 −3/2 1/2 0


0 4
5 −2
0 1
Dr. Marco A Roque Sol
Ordinary Differential Equations
Systems of First Order Linear Equations
Review of Matrices
Systems of Linear Algebraic Equations; Linear Independence, Eig
Review of Matrices
(c) Obtain zeros in the off-diagonal positions in the second column
by adding the second row to the first row and adding (4) times the
second row to the third row


1 0 3/2 −1/2 1/2 0




A = 0 1 5/2 −3/2 1/2 0


0 0 −5 4
−2 1
(d) Obtain a 1 in the diagonal position in the third column by
multiplying the third row by (15).


1 0 3/2 −1/2 1/2
0




A = 0 1 5/2 −3/2 1/2
0 


0 0 1 −4/5 2/5 −1/5
Dr. Marco A Roque Sol
Ordinary Differential Equations
Systems of First Order Linear Equations
Review of Matrices
Systems of Linear Algebraic Equations; Linear Independence, Eig
Review of Matrices
(e) Obtain zeros in the off-diagonal positions in the third column
by adding (3/2) times the third row to the first row and adding
(5/2) times the third row to the second row.


1 0 0 7/10 −1/10 3/10




−1/2
1/2 
A = 0 1 0 1/2


0 0 1 −4/5
2/5
−1/5
so, the inverse matrix A−1 is given by

A−1



7/10 −1/10 3/10
7 −1 3
1 
−1/2
1/2  =
5 −5 5 
=  1/2
10
−4/5
2/5
−1/5
−8 4 −2
Dr. Marco A Roque Sol
Ordinary Differential Equations
Systems of First Order Linear Equations
Review of Matrices
Systems of Linear Algebraic Equations; Linear Independence, Eig
Review of Matrices
Matrix Functions .
We sometimes need to consider vectors or matrices whose
elements are functions of a real variable t. In that case, we write




x1 (t)
a11 (t) · · · a1n (t)
x2 (t)



.. 
X(t) =  .  = A(t) =  ...
. 
 .. 
am1 (t)
amn (t)
xn (t)
respectively.
Continuity
The matrix A(t) is said to be continuous at t = t0 or on an
interval α < t < β if each element of A(t) is a continuous function
at the given point or on the given interval.
Dr. Marco A Roque Sol
Ordinary Differential Equations
Review of Matrices
Systems of Linear Algebraic Equations; Linear Independence, Eig
Systems of First Order Linear Equations
Review of Matrices
Diffrentiability
Similarly, A(t) is said to be differentiable if each of its elements is
differentiable, and its derivative dA(t)/dt is defined by
daij (t)
dA(t)
=
dt
dt
m×n
that is, each element of dA(t)/dt is the derivative of the
corresponding element of A(t).
Integrability
In the same way, the integral of a matrix function is defined as
Z
b
Z
A(t)dt =
a
Dr. Marco A Roque Sol
b
aij (t)dt
a
m×n
Ordinary Differential Equations
Systems of First Order Linear Equations
Review of Matrices
Systems of Linear Algebraic Equations; Linear Independence, Eig
Review of Matrices
Example 7.5
Consider the matrix
A(t) =
Find A0 (t) and
Rπ
0
sin(t)
1
0
cos(t)
A(t)dt.
Solution
(sin(t))0
(1)0
cos(t)
0
=
A (t) =
(0)0
(cos(t))0
0
−sin(t)
0
Z
0
π
Rπ
R π
sin(t)dt R 0 1dt
2 π 2 /2
0
R
A(t)dt =
=
π
π
π
0
0 0dt
0 cos(t)dt
Dr. Marco A Roque Sol
Ordinary Differential Equations
Systems of First Order Linear Equations
Review of Matrices
Systems of Linear Algebraic Equations; Linear Independence, Eig
Review of Matrices
Elementary calculus extend easily to matrix functions; in particular,
d (CA)
dA
=C
;
dt
dt
C = constant
d (A + B)
dA dB
=
+
dt
dt
dt
d (AB)
dB dA
=A
+
B
dt
dt
dt
Dr. Marco A Roque Sol
Ordinary Differential Equations
Systems of First Order Linear Equations
Review of Matrices
Systems of Linear Algebraic Equations; Linear Independence, Eig
Systems of Linear Algebraic Equations; Linear
Independence, Eigenvalues, Eigenvectors
Systems of Linear Algebraic Equations .
A set of n simultaneous linear algebraic equations in n variables
a11 x1 + a12 x2 + . . . + a1n xn = b1
a21 x1 + a22 x2 + . . . + a2n xn = b2
..
..
.
.
an1 x1 + an2 x2 + . . . + ann xn = bnn
can be written as
AX = b
Dr. Marco A Roque Sol
Ordinary Differential Equations
Systems of First Order Linear Equations
Review of Matrices
Systems of Linear Algebraic Equations; Linear Independence, Eig
Systems of Linear Algebraic Equations; Linear
Independence, Eigenvalues, Eigenvectors
If b = 0, the system is said to be homogeneous; otherwise, it is
nonhomogeneous.
If the matrix A is invertible, hence A−1 exists, and therefore we
have
X = A−1 b
In particular, the homogeneous problem AX = b, corresponding to
b = 0, has only the trivial solution 0.
Dr. Marco A Roque Sol
Ordinary Differential Equations
Systems of First Order Linear Equations
Review of Matrices
Systems of Linear Algebraic Equations; Linear Independence, Eig
Systems of Linear Algebraic Equations; Linear
Independence, Eigenvalues, Eigenvectors
On the other hand, if A is singular, A−1 does not exist, so the
homogeneous system
AX = 0
has (infinitely many) nonzero solutions in addition to the trivial
solution.
Solving a Linear System
For solving particular systems, we can form the augmented matrix
Dr. Marco A Roque Sol
Ordinary Differential Equations
Systems of First Order Linear Equations
Review of Matrices
Systems of Linear Algebraic Equations; Linear Independence, Eig
Systems of Linear Algebraic Equations; Linear
Independence, Eigenvalues, Eigenvectors

a11 a12 . . . a1n b1


a

 21 a22 . . . a2n b2 
.
[A|b] = 
..

.

.
.


an1 an2 . . . ann bn

We now perform row operations on the augmented matrix so as to
transform A into an upper triangular matrix.
[U|b̄]
Once this is done, it is easy to see whether the system has
solutions, and to find them if it does.
Dr. Marco A Roque Sol
Ordinary Differential Equations
Systems of First Order Linear Equations
Review of Matrices
Systems of Linear Algebraic Equations; Linear Independence, Eig
Systems of Linear Algebraic Equations; Linear
Independence, Eigenvalues, Eigenvectors
Example 7.6
Solve the system of equations
x1 − 2x2 + 3x3 = 7
−x1 + x2 − 2x3 = −5
2x1 − x2 − x3 =
4
Solution
The augmented matrix for the system is


1 −2 3 7




−1 1 −2 −5


2 −1 −1 4
Dr. Marco A Roque Sol
Ordinary Differential Equations
Systems of First Order Linear Equations
Review of Matrices
Systems of Linear Algebraic Equations; Linear Independence, Eig
Systems of Linear Algebraic Equations; Linear
Independence, Eigenvalues, Eigenvectors
We now perform row operations on the augmented matrix with a
view to introducing zeros in the lower left part of the matrix.
(a) Add the first row to the second row, and add (−2) times the
first row to the third row.

1 −2 3


0 −1 1

0 −3 −7
Dr. Marco A Roque Sol

7


2 

−10
Ordinary Differential Equations
Systems of First Order Linear Equations
Review of Matrices
Systems of Linear Algebraic Equations; Linear Independence, Eig
Systems of Linear Algebraic Equations; Linear
Independence, Eigenvalues, Eigenvectors
(b) Multiply the second row by −1.

1 −2 3


0 1 −1

0 3 −7
(c) Add (−3) times the second

1 −2


0 1

0 0
Dr. Marco A Roque Sol

7


−2 

−10
row to the third row.

3 7


−1 −2

−4 −4
Ordinary Differential Equations
Systems of First Order Linear Equations
Review of Matrices
Systems of Linear Algebraic Equations; Linear Independence, Eig
Systems of Linear Algebraic Equations; Linear
Independence, Eigenvalues, Eigenvectors
(d) Divide the third row by −4.

1 −2 3


0 1 −1

0 0
1

7


−2

1
The matrix obtained in this manner corresponds to the system of
equations
x1 − 2x2 + 3x3 = 7
x2 − x3 = −2
x3 =
1
Dr. Marco A Roque Sol
Ordinary Differential Equations
Systems of First Order Linear Equations
Review of Matrices
Systems of Linear Algebraic Equations; Linear Independence, Eig
Systems of Linear Algebraic Equations; Linear
Independence, Eigenvalues, Eigenvectors
From the last of equations we have
x3 = 2,
x2 = −2 + x3 = −1,
x3 = 7 + 2x2 − 2x3 = 2
Thus, we obtain


2
X = − 1
1
Now, since the solution is unique, we conclude that the coefficient
matrix is nonsingular.
Dr. Marco A Roque Sol
Ordinary Differential Equations
Download