Professional Documents
Culture Documents
(eBook-PDF) - Mathematics - Applications of Linear Algebra To Differential Equation
(eBook-PDF) - Mathematics - Applications of Linear Algebra To Differential Equation
11
12
21
22
(1)
where the aij are known constants and primes denote derivatives with respect
to t.
The system (1) can be written in matrix form as
x0 = Ax;
where
0
B
B
x=B
B
@
x1 (t)
x2 (t)
...
xn (t)
1
C
C
C
;
C
A
(2)
0
1
0 0 1
a
a
::: a n
x (t)
B
C
a
a
::: a n C
B
B
x0 (t) C
B
C
B
C
0
B
C
B
C
A = B ................... C; x = B
:
.
C
.
B
C
@
A
.
@
A
0
11
12
21
22
1
2
an1
an2
: : : ann
(3)
xn (t)
The problem of nding a solution x(t) to (1) such that x(a) = x , where x
is a given vector, is called an initial value problem. In the case of a two point
boundary value problem, instead of initial condition x(a) = x , we have
0
xi (a)
=
xi (b) =
= 1; :::; k;
i = k + 1; :::; n:
xi0 ;
xi0 ;
(4)
Using the scalar equation as a quide, we assume that the vector equation (2)
has a solution of the form
x(t) = et u;
(5)
where u is a constant vector.
Substituting the solution (5) in left and right side of equation (2) yields
d
dt
(6)
A(et u)
= et Au:
Evidently, the vector equation (2) is satised only, if
Au
(7)
= u;
(8)
i.e.
(A I )u = 0:
(9)
Therefore, if is an eigenvalue of A and u is a corresponding eigenvector,
then x(t) = et u is a solution to x0 (t) = Ax(t) (u = 0 gives a trivial solution).
Obviously, the solutions
x (t) = e1 t u ; ; xn (t) = e t un ;
1
(10)
(11)
e1 t u1
(12)
The initial value problem consists in nding a solution to (2) that satises
an initial condition
x(0) = x
(13)
+ c u + + cnun = x :
2
(14)
Determining the integration constants from linear algebraic system (14) and
inserting in (12) one obtains the solution to initial value problem (2), (13).
General solution algorithm using linear algebra software (MATLAB,
MAPLE,...) is following:
1. nd the eigenvalues and eigenvectors
2. compose the general solution
3. determine the integration constants
4. compose the solution to the initial value problem.
Note: Steps 3-4 must be lled only for initial value problems.
Example 1: Solve the initial value problem
x01
= 6x + 8x ;
= x + 4x ;
x (0) = 1; x (0) = 0:
1
x0
(15)
(16)
x01
x02
x
= 61 84
:
(17)
x
The characteristic polynomial of the matrix A is
!
6
8
f () = det(A I ) = det
(18)
1 4 = ( 2)( 8):
Hence, the eigenvalues are = 2 and = 8. Substituting the eigenvalues
= 2 and = 8 in (9), we can determine corresponding eigenvectors
1
2
u =
1
2
1
and u = 41
(19)
x1
x2
=c e
2
4
t
1 +c e 1 =
8
2c e t + 4c e t
c e t+c e t
2
!
:
(20)
x1 (0)
x2 (0)
x(0) =
= 10
(21)
(22)
1
2
Example 2: Find the general solution to the linear system of dierential equations
x01
x0
x0
2
3
= x;
= 3x 2x ;
= 2x + 3x :
1
0
1 0
B
A=@ 0 3
0
2C
A
2 3
(24)
(25)
0
1
Computing the eigenvector u associated with the eigenvalue = 5
0
1
0
u =B
@ 1 C
A;
1
(27)
(28)
x1
x2
c1 et
c2 et
c2 et
0 1
1
B
t
=c e @ 0 C
A+c
1
+c e t
3
c3 e5t
0 1
0
B
C
t
e @ 1 A+c
1
C
A:
0
1
0
B
C
e t@ 1 A =
(29)
Exercises
1. Solve the initial value problem
x01
= x + 12x ;
= 3x + x ;
x (0) = 0; x (0) = 1:
1
x0
(30)
x0
x0
2
3
= 3x x x ;
= 12x + 5x ;
= 4x 2x x
1
(31)
Avi
= ivi;
= 1; :::; n:
(32)
= (v ; :::; vn)
(33)
we can write
AS
(34)
where is a nxn diagonal matrix with entries , ..., n. Multiplying (34)
on the right by S one obtains the matrix A in diagonally factorised form
1
= S S :
(35)
Substituting (35) in (2) and multiplying obtained result on the left by S
yields
S x0 = DS x;
(36)
or
y0 = D y:
(37)
Here a vector y(t) is dened as
A
y = S x:
(38)
= y;
y0 = y ;
::: . . . . . . . . . .
yn0 = n yn :
(39)
y i (t )
(40)
or in matrix form
y = E (t)c;
(41)
where
0 1 t
1
0 1
e
0 ::: 0
c
B
0 e2 t : : : 0 C
B
B
C
c C
B
C
B
C
C
B
c=B
;
E
(
t
)
=
:
(42)
.
B
C
B
C
. . . . . . . . . . . . . . . . . . . . .C
B
C
@ .. A
@
A
cn
t
0 0 ::: e
Substituting (38) in (41) and multiplying obtained result on the left by S
one obtains the general solution of system (2) in terms of original variables
1
2
x(t) = SE (t)c:
(43)
The vector of integration constants c can be determined satisfying the initial
conditions x(a) = x (or boundary conditions (4)).
Satisfaction conditions x(a) = x gives
0
c = [E (t = a)]
and
(44)
x(t) = SE (t)S x
1
(45)
(46)
= x x;
= 2x + 4x ;
1
(47)
(48)
(49)
(50)
and therefore
1 1 ; E (t) = e t 0 :
S=
(53)
1 2
0 et
Finally, we can compute the general solution of system (47) using formula (53)
!
!
!
!
!
x
1
1
e t 0
c
c e t+c e t
x= x =
=
:
1 2
0 et
c
c e t 2c e t
(54)
2
(55)
(56)
0
1
0 1 0
B
C
A=@ 0 0 1 A
(57)
4 7
0 1
0 1
0 1
1
1
1
B
C
B
C
B
v1 = @ 1 A ; v2 = @ 2 A ; v3 = @ 4 C
A;
respectively.
The general solution of system (55) is given by
0
x = B
@
0
= B
@
x1
x2
x3
1 0
10 t
10
1 1 1
e
0 0
C
A=B
@1 2 4 C
AB
@ 0 et 0 C
AB
@
2
1 4 16
+
+2
+4
c1 et
c1 et
c et
1
c2 e t
c2 e2t
c e 2t
2
+
+4
+ 16
c3 e t
c3 e4t
c3 e4t
4
(58)
16
0 0
e4t
1
C
A:
c1
c2
c3
1
C
A=
(59)
c1
c2
c3
0 4 1
1
B
B 3 C
C
C
3 C
A=B
B
@ 1 C
A
(60)
3
and the solution of the initial value problem (45)-(46) can be presented as
0
4 et + 3e t 1 e t 1
C
B 3
C
3
C
B
0 1 B
C
B
x
C
B
4
4
C
B
C
B
t
t
t
C
:
(61)
x=@ x A=B
e + 4e
e
C
B
3
3
C
B
x
C
B
C
B
A
@ 4 t
16
t
t
e + 12e
e
3
3
2
1
2
3
Exercises
1. Consider a linear system of dierential equations
0
1
1 0 0
x0 = B
@0 2 1C
Ax
0 0 3
(62)
x01
x0
x0
2
3
= x + 2x + 3x ;
= x;
= 2x + x + 2x :
1
(63)
(64)
(65)
Proof: Evidently
x(t) = eAt c = [I + At + A
x0 (t) =
and
d
dt
(eAtc) = A[I + At + A
t2
2!
+A
t2
+A
t3
2!
3!
t3
3!
x(0) = eA x0 = I x0 = x0 :
0
10
+ :::]c;
(66)
(68)
x1
x2
x3
1
2
3
1
C
A
(69)
t
+ A t3! + ::: =
+ At + A 2!
0
1 0
1
1 0 0
t 0 0
= B
@0 1 0C
A+B
@ 0 2t 0 C
A+
0 0 1
0 0 t
0 t2
1 0 t3
1
0
0
0
0
B
C B
C
2 t2
3 t3
+ B
02 C
03 C
@ 0
A+B
@ 0
A + ::: =
t
t
0 0
0 0
0
1
2
0
0
1
+
t+ t +
B
C
t3 + :::
B
C
B
C
2
B
C
t
B
C
0
1 + 2t + +
0
C
= B
=
B
C
t3
B
C
+
+
:::
B
C
B
0
0
1 + t3 + t2 + C
@
A
t
+ + :::
0 t
1
e
0 0
B
= @ 0 et 0 C
A
0 0 et
2. computing the general solution of system (2) by (64)
0 1 0 t
10 1 0 t 1
x
e
0 0
c
c e
B
C
B
C
B
C
B
t
x(t) = @ x A = @ 0 e 0 A @ c A = @ c e t C
A:
t
t
x
0 0 e
c
c e
eAt
2!
3!
2!
3!
2!
3!
2!
3!
(2 )
2!
(2 )
3!
2!
3!
1
2
11
(70)
(71)
Exercises
1. Solve the initial value problem
0 0 1 0
10 1
x
7 0 0
x
B
C
B
C
B
0
x
0
6
0
=
@ A @
A@ x C
A;
0
x
0 0 3
x
1
0 1
1
x(0) = B
@2C
A:
(72)
= 0;
2 [a; b];
(73)
where u(x) is the unknown function and g(x) is a known function. The
capital L denotes a linear dierential operator, which species the2 actual
form of the dierential equation (73) (for example L = dxd or L = dxd 2 ). The
boundary conditions are given by
u(a)
= ua;
u(b)
= ub:
(74)
v (Lu + g )dx
= 0:
(75)
Evidently (73) and (75) are equivalent, because v(x) is an arbitrary function.
Now we seek a numerical solution to (75), (74) in the form
u
Here
=a
+ ::: + an
n:
(76)
u
= a;
12
(77)
where
0 1
a
B
Ba C
C
C;
a=B
.
B
@ .. C
A
1
=(
; :::; n ):
(78)
an
v (Lu
+ g)dx = 0:
(79)
+ g = e:
(80)
vedx
= 0:
(81)
= Vc;
where
(83)
0 1
c
B
c C
C
B
B
:
c = B .. C
@ . C
A
1
V = (V
Evidently
; :::; Vn );
(84)
cn
= vT = cT VT ;
13
(85)
Zb
a
V T e dx
= 0:
(86)
or
Zb
a
V1 e dx
Ve dx = 0:
= 0; : : : ;
Zb
a
(87)
Vn e dx
= 0:
(88)
b
a
Zb
( ) dx] a =
VT L
Zb
a
V L( ) dx;
T
(90)
VT g dx:
Zb
a
(91)
VT g dx;
= f:
(92)
Finally, we have n linear equations (92) for determing n coecients a ; :::; an:
1
In the point collocation method, the weight function v (82) is chosen such
that
V = [ (x x ) (x x )::: (x xn )];
(93)
where the xed points xi 2 [a; b]; (i = 1; :::; n) are called collocation points.
Here Dirac's delta function (x xi) is dened as
1; if x = xi
(x xi ) =
(94)
0 else:
14
1
Vi e(x) dx
Zb
(x
= e(xi)
Z x+
xi )e(x) dx
xi
(x
xi ) dx
Z x+
i
xi
(x
xi )e(x) dx
= e(xi ) = 0;
= 1; :::; n; (95)
0
g (x
B
.
B
@ ..
(96)
1
)C
C
A:
g (xn )
Zb
a
Vi e(x) dx
Z x +1
i
xi
e(x) dx
= 0;
= 1; :::; n:
(98)
15
0 R x2
x1 g dx
B
.
B
@ R ..
x +1
g dx
xn
(99)
1
C
C
A:
In the least square method the functions Vi[x] in (82) are dened as
Vi
@e
Zb
@e
a @ai
@ai
e dx
= 1; :::; n;
= 0;
(100)
= 1; :::; n:
(101)
Zb
=2
Zb
a
@e
@ai
= 0;
@ai
(102)
e2 dx:
dx;
= 1; :::; n:
(103)
= 1; :::; n:
(104)
Therefore J is stationary and the square of the error e(x) attains its minimum. In explicit form the linear system (92) reads
0 Rb
1
Rb
Rb
L( )L( ) dx
L( )L( ) dx ::: a L( )L( n ) dx
a
a
B
B.............................................................C
C
C
K = B
B
C
1
@R
b
a L( n )L(
0 1
a
B
. C=
B
@ .. C
A
1
an
) dx
0 Rb
a L(
B
B
@R
b
Rb
a L( n )L(
...
)g dx
( n )g dx
aL
1
C
C
A:
16
) dx
:::
Rb
a L( n )L( n ) dx
(105)
i;
= 1; :::; n:
(106)
= 0;
i e dx
= 1; :::; n:
(107)
0 Rb
10 1
Rb
Rb
L( ) dx
L( ) dx ::: a
L( n ) dx
a
a
a
B
C
B
C
B
C
B
C
B
= B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C @ ... C
A=
@R
A
Rb
Rb
an
b
1
( ) dx
nL
0 Rb
g dx
a
B
...
B
@R
b
1
n g dx
( ) dx
nL
:::
( n ) dx
nL
1
C
C
A:
(108)
+ u + x = 0;
2 [0; 1];
(109)
u(0)
= 0; u(1) = 0:
(110)
The function g(x) and the dierential operator L are determined as
g (x)
= x;
d2
dx2
+ 1:
(111)
The two point boundary value problem (109)-(110) has the exact solution
sin x
u(x) =
(112)
sin 1 x:
17
= ;
b0
= 0;
b1
= 0; :::; bn = 0:
(114)
(115)
and
(116)
2 ) sin x1
2 ) sin x2
(1 4 ) sin 2x
(1 4 ) sin 2x
2
a1
a2
x1
x2
(117)
u
(118)
0 R1
2 (1
B
B
@R
0
11 (1
2
2 ) sin(x) dx
2 ) sin(x) dx
R 21
u
10
(1 4 ) sin(2x) dx C B
C
A@
R
1 (1 4 ) sin(2x) dx
2
a2
a1
a2
11 x dx
2
(119)
= 0:0102 and therefore
0 R1
1
2 x dx
B
C
A= B
@R
(120)
1
C
C
A:
0
B
@
1
0
0
B
@
1
0
(1
a1
a2
(1
2 )2 sin2 (x) dx
2 )(1
1
0
(1
2 )(1
4 ) sin(x) sin(2x) dx
2
1
0 R
(1
C
B
A= @ R
1
) sin(x)x dx
(1 4 ) sin(2x)x dx
(1 4 ) sin (2x) dx
2
1
C
A:
u
4 ) sin(x) sin(2x) dx
a2
= 0:0083 and
(122)
0
B
@
1
0
0
B
@
1
0
a1
a2
(1
2 ) sin2 (x) dx
sin(2x)(1
1
0
2 ) sin(x) dx
sin(x)(1 4 ) sin(2x) dx
2
1
0
(1 4 ) sin (2x) dx
2
1
0 R
1
sin(x)x dx
C
C
A= B
@R
A:
1
C
A
(123)
sin(2x)x dx
u
a2
(124)
Comparison of solutions:
It is seen in Fig. 1., that the numerical results, obtained by four
weighted residual methods are quite close to the exact solution. However, in
present example only two terms in trigonometric series are considered.
Exercises
1. Solve the two point boundary value problem (109)-(110) taking
n = 3 and n = 4: Compare results.
19
1
C
A
(121)