Example 3.5
The method described for example 3.4 can beused to solve boundary value problems. Consider the boundary value problem given by the Airy differential equation:
(3.16)
The procedure for solving this boundary value problem is the same as that of section 3.1.2 except that instead of the exponential matrix, the matrizant must be used.
| > |
with(linalg):with(plots): |
Warning, the protected names norm and trace have been redefined and unprotected
|
|
Warning, the name changecoords has been redefined
|
|
 |
(1) |
 |
(2) |
| > |
Eq:=diff(y(x),x$2)=x*y(x); |
 |
(3) |
| > |
A:=matrix(2,2,[0,1,x,0]); |
 |
(4) |
| > |
Y0:=matrix(N,1,[1,c[1]]); |
 |
(5) |
| > |
id:=Matrix(N,N,shape=identity); |
 |
(6) |
| > |
X1:=matrix(N,N);X2:=matrix(N,N); |
![`:=`(X1, array(1 .. 2, 1 .. 2, []))](images/Example3.5 Rev 1_9.gif) |
(7) |
![`:=`(X2, array(1 .. 2, 1 .. 2, []))](images/Example3.5 Rev 1_10.gif) |
(7) |
| > |
X1:=map(int,subs(x=x1,evalm(A)),x1=0..x); |
 |
(8) |
| > |
mat := evalm(id + X1) ; |
 |
(9) |
| > |
for i from 2 to nvars do
S:=evalm( subs(x=x1,evalm(A))&*subs(x=x1,evalm(X1)) ):X2:=
map(int,S,x1=0..x):mat := evalm(mat +X2) :
X1:=evalm(X2):od : |
 |
(10) |
 |
(11) |
 |
(12) |
 |
(13) |
Now the unknown constant c1 is solved by using the boundary condition at x = 1.
![`:=`(bc2, `+`(`/`(769, 1440), `*`(`/`(764, 567), `*`(c[1]))) = 0)](images/Example3.5 Rev 1_17.gif) |
(14) |
![`:=`(c[1], -`/`(48447, 122240))](images/Example3.5 Rev 1_18.gif) |
(15) |
 |
(16) |
Readers can verify this series solution with the series solution obtained by using Maple's 'dsolve' command.