Example 3.4
To illustrate the process of using the matrizant, consider the initial value problem
(3.15)
c
This equation is solved in Maple by finding the matrizant below.
| > |
with(linalg):with(plots): |
Warning, the protected names norm and trace have been redefined and unprotected
|
|
Warning, the name changecoords has been redefined
|
|
 |
(1) |
Enter the number of terms used in calculating the matrizant. (Usually 6 terms are sufficient).
 |
(2) |
| > |
Eq:=diff(c(t),t)=-t*c(t); |
 |
(3) |
 |
(4) |
 |
(5) |
| > |
id:=Matrix(N,N,shape=identity); |
 |
(6) |
Define the two dummy variables X1 and X2
| > |
X1:=matrix(N,N);X2:=matrix(N,N); |
![`:=`(X1, array(1 .. 1, 1 .. 1, []))](images/Example3.4 Rev 1_9.gif) |
(7) |
![`:=`(X2, array(1 .. 1, 1 .. 1, []))](images/Example3.4 Rev 1_10.gif) |
(7) |
A dummy variable t1 is used in the integration. For matrix integration, Maple's 'map' command should be used.
| > |
X1:=map(int,subs(t=t1,evalm(A)),t1=0..t); |
 |
(8) |
| > |
mat := evalm(id + X1) ; |
 |
(9) |
We now have the first two terms of thematrizant. The next step is to find the next five terms. A 'do loop' can be written to find the matrizant:
| > |
for i from 2 to nvars do
S:=evalm( subs(t=t1,evalm(A))&*subs(t=t1,evalm(X1)) ):X2:=
map(int,S,t1=0..t):mat := evalm(mat +X2) :
X1:=evalm(X2):od : evalm(mat) ; |
 |
(10) |
 |
(11) |
 |
(12) |
Thus, the process yields a series solution in t for C. This solution can be compared to the series solution given by Maple's 'dsolve' command:
| > |
dsolve({Eq,c(0)=1},c(t),type=series); |
 |
(13) |
By default, Maple gives a series solution accurate to the order of t6. The order of the series solution can be increased by using Maple's order specification as:
 |
(14) |
| > |
dsolve({Eq,c(0)=1},c(t),type=series); |
 |
(15) |
We observe that the series solution obtained using the 'matrizant' method matches exactly with the series solution given by Maple's 'dsolve' command.