Example 5.6 Semianalytical Method for the Graetz Problem 

Equation (5.1.30) is solved in Maple using the Maple program developed for example 5.2 by making very few changes: 

> restart;
 

> with(linalg):with(plots):
 

> ge:=diff(u(x,t),t)=1/(1-x^2)*diff(u(x,t),x$2)+1/(1-x^2)/x*diff(u(x,t),x);
 

diff(u(x, t), t) = `+`(`/`(`*`(diff(diff(u(x, t), x), x)), `*`(`+`(1, `-`(`*`(`^`(x, 2)))))), `/`(`*`(diff(u(x, t), x)), `*`(`+`(1, `-`(`*`(`^`(x, 2)))), `*`(x)))) (1)
 

> bc1:=diff(u(x,t),x);
 

diff(u(x, t), x) (2)
 

> bc2:=u(x,t)-1;
 

`+`(u(x, t), `-`(1)) (3)
 

> IC:=u(x,0)=0;
 

u(x, 0) = 0 (4)
 

> N:=10;
 

10 (5)
 

> L:=1;
 

1 (6)
 

> dydxf:=1/2*(-u[2](t)-3*u[0](t)+4*u[1](t))/h:
 

> dydxb:=1/2*(u[N-1](t)+3*u[N+1](t)-4*u[N](t))/h:
 

> dydx:=1/2/h*(u[m+1](t)-u[m-1](t)):
 

> d2ydx2:=1/h^2*(u[m-1](t)-2*u[m](t)+u[m+1](t)):
 

> bc1:=subs(diff(u(x,t),x)=dydxf,u(x,t)=u[0](t),x=0,bc1):
 

> bc2:=subs(diff(u(x,t),x)=dydxb,u(x,t)=u[N+1](t),x=1,bc2):
 

> eq[0]:=bc1;
 

`+`(`/`(`*`(`/`(1, 2), `*`(`+`(`-`(u[2](t)), `-`(`*`(3, `*`(u[0](t)))), `*`(4, `*`(u[1](t)))))), `*`(h))) (7)
 

> eq[N+1]:=bc2;
 

`+`(u[11](t), `-`(1)) (8)
 

> for i from 1 to N do eq[i]:=diff(u[i](t),t)= subs(diff(u(x,t),x$2) = subs(m=i,d2ydx2),diff(u(x,t),x) = subs(m=i,dydx),u(x,t)=u[i](t),x=i*h,rhs(ge));od;
 

 

 

 

 

 

 

 

 

 

diff(u[1](t), t) = `+`(`/`(`*`(`+`(u[0](t), `-`(`*`(2, `*`(u[1](t)))), u[2](t))), `*`(`+`(1, `-`(`*`(`^`(h, 2)))), `*`(`^`(h, 2)))), `/`(`*`(`/`(1, 2), `*`(`+`(u[2](t), `-`(u[0](t))))), `*`(`+`(1, `-`...
diff(u[2](t), t) = `+`(`/`(`*`(`+`(u[1](t), `-`(`*`(2, `*`(u[2](t)))), u[3](t))), `*`(`+`(1, `-`(`*`(4, `*`(`^`(h, 2))))), `*`(`^`(h, 2)))), `/`(`*`(`/`(1, 4), `*`(`+`(u[3](t), `-`(u[1](t))))), `*`(`+...
diff(u[3](t), t) = `+`(`/`(`*`(`+`(u[2](t), `-`(`*`(2, `*`(u[3](t)))), u[4](t))), `*`(`+`(1, `-`(`*`(9, `*`(`^`(h, 2))))), `*`(`^`(h, 2)))), `/`(`*`(`/`(1, 6), `*`(`+`(u[4](t), `-`(u[2](t))))), `*`(`+...
diff(u[4](t), t) = `+`(`/`(`*`(`+`(u[3](t), `-`(`*`(2, `*`(u[4](t)))), u[5](t))), `*`(`+`(1, `-`(`*`(16, `*`(`^`(h, 2))))), `*`(`^`(h, 2)))), `/`(`*`(`/`(1, 8), `*`(`+`(u[5](t), `-`(u[3](t))))), `*`(`...
diff(u[5](t), t) = `+`(`/`(`*`(`+`(u[4](t), `-`(`*`(2, `*`(u[5](t)))), u[6](t))), `*`(`+`(1, `-`(`*`(25, `*`(`^`(h, 2))))), `*`(`^`(h, 2)))), `/`(`*`(`/`(1, 10), `*`(`+`(u[6](t), `-`(u[4](t))))), `*`(...
diff(u[6](t), t) = `+`(`/`(`*`(`+`(u[5](t), `-`(`*`(2, `*`(u[6](t)))), u[7](t))), `*`(`+`(1, `-`(`*`(36, `*`(`^`(h, 2))))), `*`(`^`(h, 2)))), `/`(`*`(`/`(1, 12), `*`(`+`(u[7](t), `-`(u[5](t))))), `*`(...
diff(u[7](t), t) = `+`(`/`(`*`(`+`(u[6](t), `-`(`*`(2, `*`(u[7](t)))), u[8](t))), `*`(`+`(1, `-`(`*`(49, `*`(`^`(h, 2))))), `*`(`^`(h, 2)))), `/`(`*`(`/`(1, 14), `*`(`+`(u[8](t), `-`(u[6](t))))), `*`(...
diff(u[8](t), t) = `+`(`/`(`*`(`+`(u[7](t), `-`(`*`(2, `*`(u[8](t)))), u[9](t))), `*`(`+`(1, `-`(`*`(64, `*`(`^`(h, 2))))), `*`(`^`(h, 2)))), `/`(`*`(`/`(1, 16), `*`(`+`(u[9](t), `-`(u[7](t))))), `*`(...
diff(u[9](t), t) = `+`(`/`(`*`(`+`(u[8](t), `-`(`*`(2, `*`(u[9](t)))), u[10](t))), `*`(`+`(1, `-`(`*`(81, `*`(`^`(h, 2))))), `*`(`^`(h, 2)))), `/`(`*`(`/`(1, 18), `*`(`+`(u[10](t), `-`(u[8](t))))), `*...
diff(u[10](t), t) = `+`(`/`(`*`(`+`(u[9](t), `-`(`*`(2, `*`(u[10](t)))), u[11](t))), `*`(`+`(1, `-`(`*`(100, `*`(`^`(h, 2))))), `*`(`^`(h, 2)))), `/`(`*`(`/`(1, 20), `*`(`+`(u[11](t), `-`(u[9](t))))),... (9)
 

> u[0](t):=(solve(eq[0],u[0](t)));
 

`+`(`-`(`*`(`/`(1, 3), `*`(u[2](t)))), `*`(`/`(4, 3), `*`(u[1](t)))) (10)
 

> u[N+1](t):=solve(eq[N+1],u[N+1](t));
 

1 (11)
 

> for i from 1 to N do eq[i]:=eval(eq[i]);od;
 

 

 

 

 

 

 

 

 

 

diff(u[1](t), t) = `+`(`/`(`*`(`+`(`*`(`/`(2, 3), `*`(u[2](t))), `-`(`*`(`/`(2, 3), `*`(u[1](t)))))), `*`(`+`(1, `-`(`*`(`^`(h, 2)))), `*`(`^`(h, 2)))), `/`(`*`(`/`(1, 2), `*`(`+`(`*`(`/`(4, 3), `*`(u...
diff(u[2](t), t) = `+`(`/`(`*`(`+`(u[1](t), `-`(`*`(2, `*`(u[2](t)))), u[3](t))), `*`(`+`(1, `-`(`*`(4, `*`(`^`(h, 2))))), `*`(`^`(h, 2)))), `/`(`*`(`/`(1, 4), `*`(`+`(u[3](t), `-`(u[1](t))))), `*`(`+...
diff(u[3](t), t) = `+`(`/`(`*`(`+`(u[2](t), `-`(`*`(2, `*`(u[3](t)))), u[4](t))), `*`(`+`(1, `-`(`*`(9, `*`(`^`(h, 2))))), `*`(`^`(h, 2)))), `/`(`*`(`/`(1, 6), `*`(`+`(u[4](t), `-`(u[2](t))))), `*`(`+...
diff(u[4](t), t) = `+`(`/`(`*`(`+`(u[3](t), `-`(`*`(2, `*`(u[4](t)))), u[5](t))), `*`(`+`(1, `-`(`*`(16, `*`(`^`(h, 2))))), `*`(`^`(h, 2)))), `/`(`*`(`/`(1, 8), `*`(`+`(u[5](t), `-`(u[3](t))))), `*`(`...
diff(u[5](t), t) = `+`(`/`(`*`(`+`(u[4](t), `-`(`*`(2, `*`(u[5](t)))), u[6](t))), `*`(`+`(1, `-`(`*`(25, `*`(`^`(h, 2))))), `*`(`^`(h, 2)))), `/`(`*`(`/`(1, 10), `*`(`+`(u[6](t), `-`(u[4](t))))), `*`(...
diff(u[6](t), t) = `+`(`/`(`*`(`+`(u[5](t), `-`(`*`(2, `*`(u[6](t)))), u[7](t))), `*`(`+`(1, `-`(`*`(36, `*`(`^`(h, 2))))), `*`(`^`(h, 2)))), `/`(`*`(`/`(1, 12), `*`(`+`(u[7](t), `-`(u[5](t))))), `*`(...
diff(u[7](t), t) = `+`(`/`(`*`(`+`(u[6](t), `-`(`*`(2, `*`(u[7](t)))), u[8](t))), `*`(`+`(1, `-`(`*`(49, `*`(`^`(h, 2))))), `*`(`^`(h, 2)))), `/`(`*`(`/`(1, 14), `*`(`+`(u[8](t), `-`(u[6](t))))), `*`(...
diff(u[8](t), t) = `+`(`/`(`*`(`+`(u[7](t), `-`(`*`(2, `*`(u[8](t)))), u[9](t))), `*`(`+`(1, `-`(`*`(64, `*`(`^`(h, 2))))), `*`(`^`(h, 2)))), `/`(`*`(`/`(1, 16), `*`(`+`(u[9](t), `-`(u[7](t))))), `*`(...
diff(u[9](t), t) = `+`(`/`(`*`(`+`(u[8](t), `-`(`*`(2, `*`(u[9](t)))), u[10](t))), `*`(`+`(1, `-`(`*`(81, `*`(`^`(h, 2))))), `*`(`^`(h, 2)))), `/`(`*`(`/`(1, 18), `*`(`+`(u[10](t), `-`(u[8](t))))), `*...
diff(u[10](t), t) = `+`(`/`(`*`(`+`(u[9](t), `-`(`*`(2, `*`(u[10](t)))), 1)), `*`(`+`(1, `-`(`*`(100, `*`(`^`(h, 2))))), `*`(`^`(h, 2)))), `/`(`*`(`/`(1, 20), `*`(`+`(1, `-`(u[9](t))))), `*`(`+`(1, `-... (12)
 

> eqs:=[seq(rhs(eq[j]),j=1..N)]:
 

> Y:=[seq(u[i](t),i=1..N)];
 

[u[1](t), u[2](t), u[3](t), u[4](t), u[5](t), u[6](t), u[7](t), u[8](t), u[9](t), u[10](t)] (13)
 

> A:=genmatrix(eqs,Y,'b1'):
 

> b:=matrix(N,1):for i to N do b[i,1]:=-eval(b1[i]);od:evalm(b);
 

array( 1 .. 10, 1 .. 1, [( 1, 1 ) = 0, ( 8, 1 ) = 0, ( 4, 1 ) = 0, ( 2, 1 ) = 0, ( 10, 1 ) = `+`(`/`(`*`(`/`(21, 20)), `*`(`+`(1, `-`(`*`(100, `*`(`^`(h, 2))))), `*`(`^`(h, 2))))), ( 6, 1 ) = 0, ( 3, ... (14)
 

> h:=eval(L/(N+1));
 

`/`(1, 11) (15)
 

> A:=map(eval,A):
 

> if N > 4 then A:=map(evalf,A);end:
 

> evalm(A);
 

array( 1 .. 10, 1 .. 10, [( 6, 2 ) = 0., ( 10, 5 ) = 0., ( 6, 8 ) = 0., ( 4, 5 ) = 156.8678571, ( 8, 2 ) = 0., ( 5, 10 ) = 0., ( 1, 10 ) = 0., ( 5, 4 ) = 137.2593750, ( 9, 5 ) = 0., ( 5, 9 ) = 0., ( 1...
array( 1 .. 10, 1 .. 10, [( 6, 2 ) = 0., ( 10, 5 ) = 0., ( 6, 8 ) = 0., ( 4, 5 ) = 156.8678571, ( 8, 2 ) = 0., ( 5, 10 ) = 0., ( 1, 10 ) = 0., ( 5, 4 ) = 137.2593750, ( 9, 5 ) = 0., ( 5, 9 ) = 0., ( 1...
array( 1 .. 10, 1 .. 10, [( 6, 2 ) = 0., ( 10, 5 ) = 0., ( 6, 8 ) = 0., ( 4, 5 ) = 156.8678571, ( 8, 2 ) = 0., ( 5, 10 ) = 0., ( 1, 10 ) = 0., ( 5, 4 ) = 137.2593750, ( 9, 5 ) = 0., ( 5, 9 ) = 0., ( 1...
array( 1 .. 10, 1 .. 10, [( 6, 2 ) = 0., ( 10, 5 ) = 0., ( 6, 8 ) = 0., ( 4, 5 ) = 156.8678571, ( 8, 2 ) = 0., ( 5, 10 ) = 0., ( 1, 10 ) = 0., ( 5, 4 ) = 137.2593750, ( 9, 5 ) = 0., ( 5, 9 ) = 0., ( 1...
array( 1 .. 10, 1 .. 10, [( 6, 2 ) = 0., ( 10, 5 ) = 0., ( 6, 8 ) = 0., ( 4, 5 ) = 156.8678571, ( 8, 2 ) = 0., ( 5, 10 ) = 0., ( 1, 10 ) = 0., ( 5, 4 ) = 137.2593750, ( 9, 5 ) = 0., ( 5, 9 ) = 0., ( 1...
array( 1 .. 10, 1 .. 10, [( 6, 2 ) = 0., ( 10, 5 ) = 0., ( 6, 8 ) = 0., ( 4, 5 ) = 156.8678571, ( 8, 2 ) = 0., ( 5, 10 ) = 0., ( 1, 10 ) = 0., ( 5, 4 ) = 137.2593750, ( 9, 5 ) = 0., ( 5, 9 ) = 0., ( 1...
array( 1 .. 10, 1 .. 10, [( 6, 2 ) = 0., ( 10, 5 ) = 0., ( 6, 8 ) = 0., ( 4, 5 ) = 156.8678571, ( 8, 2 ) = 0., ( 5, 10 ) = 0., ( 1, 10 ) = 0., ( 5, 4 ) = 137.2593750, ( 9, 5 ) = 0., ( 5, 9 ) = 0., ( 1...
array( 1 .. 10, 1 .. 10, [( 6, 2 ) = 0., ( 10, 5 ) = 0., ( 6, 8 ) = 0., ( 4, 5 ) = 156.8678571, ( 8, 2 ) = 0., ( 5, 10 ) = 0., ( 1, 10 ) = 0., ( 5, 4 ) = 137.2593750, ( 9, 5 ) = 0., ( 5, 9 ) = 0., ( 1...
array( 1 .. 10, 1 .. 10, [( 6, 2 ) = 0., ( 10, 5 ) = 0., ( 6, 8 ) = 0., ( 4, 5 ) = 156.8678571, ( 8, 2 ) = 0., ( 5, 10 ) = 0., ( 1, 10 ) = 0., ( 5, 4 ) = 137.2593750, ( 9, 5 ) = 0., ( 5, 9 ) = 0., ( 1...
array( 1 .. 10, 1 .. 10, [( 6, 2 ) = 0., ( 10, 5 ) = 0., ( 6, 8 ) = 0., ( 4, 5 ) = 156.8678571, ( 8, 2 ) = 0., ( 5, 10 ) = 0., ( 1, 10 ) = 0., ( 5, 4 ) = 137.2593750, ( 9, 5 ) = 0., ( 5, 9 ) = 0., ( 1...
(16)
 

> mat:=exponential(A,t):
 

> mat:=map(evalf,mat):
 

> Y0:=matrix(N,1):for i from 1 to N do Y0[i,1]:=evalf(subs(x=i*h,rhs(IC)));od:evalm(Y0);
 

array( 1 .. 10, 1 .. 1, [( 1, 1 ) = 0., ( 8, 1 ) = 0., ( 4, 1 ) = 0., ( 2, 1 ) = 0., ( 10, 1 ) = 0., ( 6, 1 ) = 0., ( 3, 1 ) = 0., ( 5, 1 ) = 0., ( 7, 1 ) = 0., ( 9, 1 ) = 0. ] ) (17)
 

> s1:=evalm(Y0+inverse(A)&*b):
 

> Y:=evalm(mat&*s1-inverse(A)&*b):
 

> Y:=map(simplify,Y):
 

> Digits:=10;
 

10 (18)
 

> for i from 1 to N do u[i](t):=evalf((Y[i,1]));od:
 

> for i from 0 to N+1 do u[i](t):=eval(u[i](t));od;
 

 

 

 

 

 

 

 

 

 

 

 

`+`(`*`(0.6396258436e-7, `*`(exp(`+`(`-`(`*`(1687.725405, `*`(t))))))), `-`(`*`(0.2046970356e-3, `*`(exp(`+`(`-`(`*`(834.0458065, `*`(t)))))))), `*`(0.1195590815e-1, `*`(exp(`+`(`-`(`*`(592.7186781, `...
`+`(`*`(0.6396258436e-7, `*`(exp(`+`(`-`(`*`(1687.725405, `*`(t))))))), `-`(`*`(0.2046970356e-3, `*`(exp(`+`(`-`(`*`(834.0458065, `*`(t)))))))), `*`(0.1195590815e-1, `*`(exp(`+`(`-`(`*`(592.7186781, `...
`+`(`*`(0.6396258436e-7, `*`(exp(`+`(`-`(`*`(1687.725405, `*`(t))))))), `-`(`*`(0.2046970356e-3, `*`(exp(`+`(`-`(`*`(834.0458065, `*`(t)))))))), `*`(0.1195590815e-1, `*`(exp(`+`(`-`(`*`(592.7186781, `...
`+`(`*`(0.6396258436e-7, `*`(exp(`+`(`-`(`*`(1687.725405, `*`(t))))))), `-`(`*`(0.2046970356e-3, `*`(exp(`+`(`-`(`*`(834.0458065, `*`(t)))))))), `*`(0.1195590815e-1, `*`(exp(`+`(`-`(`*`(592.7186781, `...
`+`(`*`(0.1453919354e-7, `*`(exp(`+`(`-`(`*`(1687.725405, `*`(t))))))), `-`(`*`(0.755639912e-4, `*`(exp(`+`(`-`(`*`(834.0458065, `*`(t)))))))), `*`(0.5398922725e-2, `*`(exp(`+`(`-`(`*`(592.7186781, `*...
`+`(`*`(0.1453919354e-7, `*`(exp(`+`(`-`(`*`(1687.725405, `*`(t))))))), `-`(`*`(0.755639912e-4, `*`(exp(`+`(`-`(`*`(834.0458065, `*`(t)))))))), `*`(0.5398922725e-2, `*`(exp(`+`(`-`(`*`(592.7186781, `*...
`+`(`*`(0.1453919354e-7, `*`(exp(`+`(`-`(`*`(1687.725405, `*`(t))))))), `-`(`*`(0.755639912e-4, `*`(exp(`+`(`-`(`*`(834.0458065, `*`(t)))))))), `*`(0.5398922725e-2, `*`(exp(`+`(`-`(`*`(592.7186781, `*...
`+`(`*`(0.1453919354e-7, `*`(exp(`+`(`-`(`*`(1687.725405, `*`(t))))))), `-`(`*`(0.755639912e-4, `*`(exp(`+`(`-`(`*`(834.0458065, `*`(t)))))))), `*`(0.5398922725e-2, `*`(exp(`+`(`-`(`*`(592.7186781, `*...
`+`(`-`(`*`(0.1337309789e-6, `*`(exp(`+`(`-`(`*`(1687.725405, `*`(t)))))))), `*`(0.311835142e-3, `*`(exp(`+`(`-`(`*`(834.0458065, `*`(t))))))), `-`(`*`(0.1427203354e-1, `*`(exp(`+`(`-`(`*`(592.7186781...
`+`(`-`(`*`(0.1337309789e-6, `*`(exp(`+`(`-`(`*`(1687.725405, `*`(t)))))))), `*`(0.311835142e-3, `*`(exp(`+`(`-`(`*`(834.0458065, `*`(t))))))), `-`(`*`(0.1427203354e-1, `*`(exp(`+`(`-`(`*`(592.7186781...
`+`(`-`(`*`(0.1337309789e-6, `*`(exp(`+`(`-`(`*`(1687.725405, `*`(t)))))))), `*`(0.311835142e-3, `*`(exp(`+`(`-`(`*`(834.0458065, `*`(t))))))), `-`(`*`(0.1427203354e-1, `*`(exp(`+`(`-`(`*`(592.7186781...
`+`(`-`(`*`(0.1337309789e-6, `*`(exp(`+`(`-`(`*`(1687.725405, `*`(t)))))))), `*`(0.311835142e-3, `*`(exp(`+`(`-`(`*`(834.0458065, `*`(t))))))), `-`(`*`(0.1427203354e-1, `*`(exp(`+`(`-`(`*`(592.7186781...
`+`(`*`(0.1239372059e-5, `*`(exp(`+`(`-`(`*`(1687.725405, `*`(t))))))), `-`(`*`(0.1118464477e-2, `*`(exp(`+`(`-`(`*`(834.0458065, `*`(t)))))))), `*`(0.2800583789e-1, `*`(exp(`+`(`-`(`*`(592.7186781, `...
`+`(`*`(0.1239372059e-5, `*`(exp(`+`(`-`(`*`(1687.725405, `*`(t))))))), `-`(`*`(0.1118464477e-2, `*`(exp(`+`(`-`(`*`(834.0458065, `*`(t)))))))), `*`(0.2800583789e-1, `*`(exp(`+`(`-`(`*`(592.7186781, `...
`+`(`*`(0.1239372059e-5, `*`(exp(`+`(`-`(`*`(1687.725405, `*`(t))))))), `-`(`*`(0.1118464477e-2, `*`(exp(`+`(`-`(`*`(834.0458065, `*`(t)))))))), `*`(0.2800583789e-1, `*`(exp(`+`(`-`(`*`(592.7186781, `...
`+`(`*`(0.1239372059e-5, `*`(exp(`+`(`-`(`*`(1687.725405, `*`(t))))))), `-`(`*`(0.1118464477e-2, `*`(exp(`+`(`-`(`*`(834.0458065, `*`(t)))))))), `*`(0.2800583789e-1, `*`(exp(`+`(`-`(`*`(592.7186781, `...
`+`(`-`(`*`(0.1147897273e-4, `*`(exp(`+`(`-`(`*`(1687.725405, `*`(t)))))))), `*`(0.3976521410e-2, `*`(exp(`+`(`-`(`*`(834.0458065, `*`(t))))))), `-`(`*`(0.5063790949e-1, `*`(exp(`+`(`-`(`*`(592.718678...
`+`(`-`(`*`(0.1147897273e-4, `*`(exp(`+`(`-`(`*`(1687.725405, `*`(t)))))))), `*`(0.3976521410e-2, `*`(exp(`+`(`-`(`*`(834.0458065, `*`(t))))))), `-`(`*`(0.5063790949e-1, `*`(exp(`+`(`-`(`*`(592.718678...
`+`(`-`(`*`(0.1147897273e-4, `*`(exp(`+`(`-`(`*`(1687.725405, `*`(t)))))))), `*`(0.3976521410e-2, `*`(exp(`+`(`-`(`*`(834.0458065, `*`(t))))))), `-`(`*`(0.5063790949e-1, `*`(exp(`+`(`-`(`*`(592.718678...
`+`(`-`(`*`(0.1147897273e-4, `*`(exp(`+`(`-`(`*`(1687.725405, `*`(t)))))))), `*`(0.3976521410e-2, `*`(exp(`+`(`-`(`*`(834.0458065, `*`(t))))))), `-`(`*`(0.5063790949e-1, `*`(exp(`+`(`-`(`*`(592.718678...
`+`(`*`(0.1021378324e-3, `*`(exp(`+`(`-`(`*`(1687.725405, `*`(t))))))), `-`(`*`(0.1320336041e-1, `*`(exp(`+`(`-`(`*`(834.0458065, `*`(t)))))))), `*`(0.795280937e-1, `*`(exp(`+`(`-`(`*`(592.7186781, `*...
`+`(`*`(0.1021378324e-3, `*`(exp(`+`(`-`(`*`(1687.725405, `*`(t))))))), `-`(`*`(0.1320336041e-1, `*`(exp(`+`(`-`(`*`(834.0458065, `*`(t)))))))), `*`(0.795280937e-1, `*`(exp(`+`(`-`(`*`(592.7186781, `*...
`+`(`*`(0.1021378324e-3, `*`(exp(`+`(`-`(`*`(1687.725405, `*`(t))))))), `-`(`*`(0.1320336041e-1, `*`(exp(`+`(`-`(`*`(834.0458065, `*`(t)))))))), `*`(0.795280937e-1, `*`(exp(`+`(`-`(`*`(592.7186781, `*...
`+`(`*`(0.1021378324e-3, `*`(exp(`+`(`-`(`*`(1687.725405, `*`(t))))))), `-`(`*`(0.1320336041e-1, `*`(exp(`+`(`-`(`*`(834.0458065, `*`(t)))))))), `*`(0.795280937e-1, `*`(exp(`+`(`-`(`*`(592.7186781, `*...
`+`(`-`(`*`(0.8324323948e-3, `*`(exp(`+`(`-`(`*`(1687.725405, `*`(t)))))))), `*`(0.3838244329e-1, `*`(exp(`+`(`-`(`*`(834.0458065, `*`(t))))))), `-`(`*`(0.949531851e-1, `*`(exp(`+`(`-`(`*`(592.7186781...
`+`(`-`(`*`(0.8324323948e-3, `*`(exp(`+`(`-`(`*`(1687.725405, `*`(t)))))))), `*`(0.3838244329e-1, `*`(exp(`+`(`-`(`*`(834.0458065, `*`(t))))))), `-`(`*`(0.949531851e-1, `*`(exp(`+`(`-`(`*`(592.7186781...
`+`(`-`(`*`(0.8324323948e-3, `*`(exp(`+`(`-`(`*`(1687.725405, `*`(t)))))))), `*`(0.3838244329e-1, `*`(exp(`+`(`-`(`*`(834.0458065, `*`(t))))))), `-`(`*`(0.949531851e-1, `*`(exp(`+`(`-`(`*`(592.7186781...
`+`(`-`(`*`(0.8324323948e-3, `*`(exp(`+`(`-`(`*`(1687.725405, `*`(t)))))))), `*`(0.3838244329e-1, `*`(exp(`+`(`-`(`*`(834.0458065, `*`(t))))))), `-`(`*`(0.949531851e-1, `*`(exp(`+`(`-`(`*`(592.7186781...
`+`(`*`(0.5905778525e-2, `*`(exp(`+`(`-`(`*`(1687.725405, `*`(t))))))), `-`(`*`(0.8952503648e-1, `*`(exp(`+`(`-`(`*`(834.0458065, `*`(t)))))))), `*`(0.590173413e-1, `*`(exp(`+`(`-`(`*`(592.7186781, `*...
`+`(`*`(0.5905778525e-2, `*`(exp(`+`(`-`(`*`(1687.725405, `*`(t))))))), `-`(`*`(0.8952503648e-1, `*`(exp(`+`(`-`(`*`(834.0458065, `*`(t)))))))), `*`(0.590173413e-1, `*`(exp(`+`(`-`(`*`(592.7186781, `*...
`+`(`*`(0.5905778525e-2, `*`(exp(`+`(`-`(`*`(1687.725405, `*`(t))))))), `-`(`*`(0.8952503648e-1, `*`(exp(`+`(`-`(`*`(834.0458065, `*`(t)))))))), `*`(0.590173413e-1, `*`(exp(`+`(`-`(`*`(592.7186781, `*...
`+`(`*`(0.5905778525e-2, `*`(exp(`+`(`-`(`*`(1687.725405, `*`(t))))))), `-`(`*`(0.8952503648e-1, `*`(exp(`+`(`-`(`*`(834.0458065, `*`(t)))))))), `*`(0.590173413e-1, `*`(exp(`+`(`-`(`*`(592.7186781, `*...
`+`(`-`(`*`(0.3400299773e-1, `*`(exp(`+`(`-`(`*`(1687.725405, `*`(t)))))))), `*`(.1423367722, `*`(exp(`+`(`-`(`*`(834.0458065, `*`(t))))))), `*`(0.3190253306e-1, `*`(exp(`+`(`-`(`*`(592.7186781, `*`(t...
`+`(`-`(`*`(0.3400299773e-1, `*`(exp(`+`(`-`(`*`(1687.725405, `*`(t)))))))), `*`(.1423367722, `*`(exp(`+`(`-`(`*`(834.0458065, `*`(t))))))), `*`(0.3190253306e-1, `*`(exp(`+`(`-`(`*`(592.7186781, `*`(t...
`+`(`-`(`*`(0.3400299773e-1, `*`(exp(`+`(`-`(`*`(1687.725405, `*`(t)))))))), `*`(.1423367722, `*`(exp(`+`(`-`(`*`(834.0458065, `*`(t))))))), `*`(0.3190253306e-1, `*`(exp(`+`(`-`(`*`(592.7186781, `*`(t...
`+`(`-`(`*`(0.3400299773e-1, `*`(exp(`+`(`-`(`*`(1687.725405, `*`(t)))))))), `*`(.1423367722, `*`(exp(`+`(`-`(`*`(834.0458065, `*`(t))))))), `*`(0.3190253306e-1, `*`(exp(`+`(`-`(`*`(592.7186781, `*`(t...
`+`(`*`(.1410615395, `*`(exp(`+`(`-`(`*`(1687.725405, `*`(t))))))), `-`(`*`(0.8807283196e-1, `*`(exp(`+`(`-`(`*`(834.0458065, `*`(t)))))))), `-`(`*`(0.6129252106e-1, `*`(exp(`+`(`-`(`*`(592.7186781, `...
`+`(`*`(.1410615395, `*`(exp(`+`(`-`(`*`(1687.725405, `*`(t))))))), `-`(`*`(0.8807283196e-1, `*`(exp(`+`(`-`(`*`(834.0458065, `*`(t)))))))), `-`(`*`(0.6129252106e-1, `*`(exp(`+`(`-`(`*`(592.7186781, `...
`+`(`*`(.1410615395, `*`(exp(`+`(`-`(`*`(1687.725405, `*`(t))))))), `-`(`*`(0.8807283196e-1, `*`(exp(`+`(`-`(`*`(834.0458065, `*`(t)))))))), `-`(`*`(0.6129252106e-1, `*`(exp(`+`(`-`(`*`(592.7186781, `...
`+`(`*`(.1410615395, `*`(exp(`+`(`-`(`*`(1687.725405, `*`(t))))))), `-`(`*`(0.8807283196e-1, `*`(exp(`+`(`-`(`*`(834.0458065, `*`(t)))))))), `-`(`*`(0.6129252106e-1, `*`(exp(`+`(`-`(`*`(592.7186781, `...
`+`(`-`(`*`(.3184973256, `*`(exp(`+`(`-`(`*`(1687.725405, `*`(t)))))))), `-`(`*`(.1041036052, `*`(exp(`+`(`-`(`*`(834.0458065, `*`(t)))))))), `-`(`*`(0.5065880317e-1, `*`(exp(`+`(`-`(`*`(592.7186781, ...
`+`(`-`(`*`(.3184973256, `*`(exp(`+`(`-`(`*`(1687.725405, `*`(t)))))))), `-`(`*`(.1041036052, `*`(exp(`+`(`-`(`*`(834.0458065, `*`(t)))))))), `-`(`*`(0.5065880317e-1, `*`(exp(`+`(`-`(`*`(592.7186781, ...
`+`(`-`(`*`(.3184973256, `*`(exp(`+`(`-`(`*`(1687.725405, `*`(t)))))))), `-`(`*`(.1041036052, `*`(exp(`+`(`-`(`*`(834.0458065, `*`(t)))))))), `-`(`*`(0.5065880317e-1, `*`(exp(`+`(`-`(`*`(592.7186781, ...
`+`(`-`(`*`(.3184973256, `*`(exp(`+`(`-`(`*`(1687.725405, `*`(t)))))))), `-`(`*`(.1041036052, `*`(exp(`+`(`-`(`*`(834.0458065, `*`(t)))))))), `-`(`*`(0.5065880317e-1, `*`(exp(`+`(`-`(`*`(592.7186781, ...
1 (19)
 

Set the colors for the curves: 

> setcolors(["Red", "Blue", "LimeGreen", "Goldenrod", "maroon", "DarkTurquoise", "coral", "aquamarine", "magenta", "khaki",  "sienna", "orange", "yellow", "gray"]);
 

[ (20)
 

> pp:=plot([seq(u[i](t),i=0..N+1)],t=0..0.4,thickness=3);
 

PLOT(CURVES([[0., 0.872569843046733240e-7], [0.871886166666666594e-2, -0.686046012310370658e-5], [0.163050965833333346e-1, 0.159971046591489420e-3], [0.205708538750000032e-1, 0.101863331555307468e-2],... (21)
 

Plot the texts for the corresponding curves: 

> arw:=arrow(<0.15,0.4>,<-0.05,0.63>,width=[1/700,relative=true],head_width=[1/200,relative=false],head_length=[1/30,relative=false]):
pt:=textplot([[0.25,0.35,typeset("Follow the arrow: ",u[0],"(t), ..., ",u[N+1],"(t).")]]):
 

> display([pp,pt,arw],axes=boxed,title="Figure Exp. 5.19.",labels=[t,"u"]);
 

Plot_2d
 

> tf:=0.2;
 

.2 (22)
 

> M:=30;
 

30 (23)
 

> T1:=[seq(tf*i/M,i=0..M)];
 

[0., 0.6666666667e-2, 0.1333333333e-1, 0.2000000000e-1, 0.2666666667e-1, 0.3333333333e-1, 0.4000000000e-1, 0.4666666667e-1, 0.5333333333e-1, 0.6000000000e-1, 0.6666666667e-1, 0.7333333333e-1, 0.800000...
[0., 0.6666666667e-2, 0.1333333333e-1, 0.2000000000e-1, 0.2666666667e-1, 0.3333333333e-1, 0.4000000000e-1, 0.4666666667e-1, 0.5333333333e-1, 0.6000000000e-1, 0.6666666667e-1, 0.7333333333e-1, 0.800000...
[0., 0.6666666667e-2, 0.1333333333e-1, 0.2000000000e-1, 0.2666666667e-1, 0.3333333333e-1, 0.4000000000e-1, 0.4666666667e-1, 0.5333333333e-1, 0.6000000000e-1, 0.6666666667e-1, 0.7333333333e-1, 0.800000...
[0., 0.6666666667e-2, 0.1333333333e-1, 0.2000000000e-1, 0.2666666667e-1, 0.3333333333e-1, 0.4000000000e-1, 0.4666666667e-1, 0.5333333333e-1, 0.6000000000e-1, 0.6666666667e-1, 0.7333333333e-1, 0.800000...
[0., 0.6666666667e-2, 0.1333333333e-1, 0.2000000000e-1, 0.2666666667e-1, 0.3333333333e-1, 0.4000000000e-1, 0.4666666667e-1, 0.5333333333e-1, 0.6000000000e-1, 0.6666666667e-1, 0.7333333333e-1, 0.800000...
(24)
 

> PP:=matrix(N+2,M+1);
 

array( 1 .. 12, 1 .. 31, [ ] ) (25)
 

> for i from 1 to N+2 do PP[i,1]:=evalf(subs(x=(i-1)*h,rhs(IC)));od:
 

> for i from 1 to N+2 do for j from 2 to M+1 do PP[i,j]:=evalf(subs(t=T1[j],u[i-1](t)));od;od:
 

> plotdata := [seq([ seq([(i-1)*h,T1[j],PP[i,j]], i=1..N+2)], j=1..M+1)]:
 

> surfdata(plotdata,axes=boxed,title="Figure Exp. 5.20.",labels=[x,t,u],orientation=[-135,45]);
 

Plot
 

> for i from 0 to N+1 do u[i](z):=subs(t=z/2/Pe,u[i](t));od:
 

> pp:=plot([seq(subs(Pe=1,u[i](z)),i=0..N+1)],z=0..1,thickness=3);
 

PLOT(CURVES([[0., 0.872569843046733240e-7], [0.217971541666666658e-1, -0.128287764025181162e-4], [0.312799478125000003e-1, 0.104572904130684208e-3], [0.407627414583333348e-1, 0.956360283360102594e-3],... (26)
 

Plot the texts for the corresponding curves: 

> arw:=arrow(<0.3,0.4>,<-0.15,0.63>,width=[1/700,relative=true],head_width=[1/150,relative=false],head_length=[1/30,relative=false]):
pt:=textplot([[0.55,0.35,typeset("Follow the arrow: ",u[0],"(z), ..., ",u[N+1],"(z).")]]):
 

>
display([pp,pt,arw],axes=boxed,title="Figure Exp. 5.21.",labels=[z,"u"]);
 

Plot_2d
 

> tf:=1.;
 

1. (27)
 

> M:=30;
 

30 (28)
 

> T1:=[seq(tf*i/M,i=0..M)];
 

[0., 0.3333333333e-1, 0.6666666667e-1, .1000000000, .1333333333, .1666666667, .2000000000, .2333333333, .2666666667, .3000000000, .3333333333, .3666666667, .4000000000, .4333333333, .4666666667, .5000...
[0., 0.3333333333e-1, 0.6666666667e-1, .1000000000, .1333333333, .1666666667, .2000000000, .2333333333, .2666666667, .3000000000, .3333333333, .3666666667, .4000000000, .4333333333, .4666666667, .5000...
[0., 0.3333333333e-1, 0.6666666667e-1, .1000000000, .1333333333, .1666666667, .2000000000, .2333333333, .2666666667, .3000000000, .3333333333, .3666666667, .4000000000, .4333333333, .4666666667, .5000...
[0., 0.3333333333e-1, 0.6666666667e-1, .1000000000, .1333333333, .1666666667, .2000000000, .2333333333, .2666666667, .3000000000, .3333333333, .3666666667, .4000000000, .4333333333, .4666666667, .5000...
[0., 0.3333333333e-1, 0.6666666667e-1, .1000000000, .1333333333, .1666666667, .2000000000, .2333333333, .2666666667, .3000000000, .3333333333, .3666666667, .4000000000, .4333333333, .4666666667, .5000...
(29)
 

> PP:=matrix(N+2,M+1);
 

array( 1 .. 12, 1 .. 31, [ ] ) (30)
 

> for i from 1 to N+2 do PP[i,1]:=evalf(subs(x=(i-1)*h,rhs(IC)));od:
 

> for i from 1 to N+2 do for j from 2 to M+1 do PP[i,j]:=evalf(subs(z=T1[j],Pe=1.,u[i-1](z)));od;od:
 

> plotdata := [seq([ seq([(i-1)*h,T1[j],PP[i,j]], i=1..N+2)], j=1..M+1)]:
 

> surfdata(plotdata,axes=boxed,title="Figure 5.22.",labels=[x,z,u],orientation=[-135,45]);
 

Plot
 

> pp:=plot([seq(subs(Pe=10,u[i](z)),i=0..N+1)],z=0..1,thickness=3);
 

PLOT(CURVES([[0., 0.872569843046733240e-7], [0.217971541666666658e-1, 0.517688351076017740e-7], [0.407627414583333348e-1, 0.305930196731196702e-7], [0.620915279166666667e-1, 0.470918037898115927e-8], ... (31)
 

> display([pp],axes=boxed,title="Figure Exp. 5.23.",labels=[z,"u"],caption=typeset("From the bottom to the top of the figure: ",u[0],"(z), ..., ",u[N+1],"(z)"));
 

Plot_2d
 

> tf:=1.;
 

1. (32)
 

> M:=30;
 

30 (33)
 

> T1:=[seq(tf*i/M,i=0..M)];
 

[0., 0.3333333333e-1, 0.6666666667e-1, .1000000000, .1333333333, .1666666667, .2000000000, .2333333333, .2666666667, .3000000000, .3333333333, .3666666667, .4000000000, .4333333333, .4666666667, .5000...
[0., 0.3333333333e-1, 0.6666666667e-1, .1000000000, .1333333333, .1666666667, .2000000000, .2333333333, .2666666667, .3000000000, .3333333333, .3666666667, .4000000000, .4333333333, .4666666667, .5000...
[0., 0.3333333333e-1, 0.6666666667e-1, .1000000000, .1333333333, .1666666667, .2000000000, .2333333333, .2666666667, .3000000000, .3333333333, .3666666667, .4000000000, .4333333333, .4666666667, .5000...
[0., 0.3333333333e-1, 0.6666666667e-1, .1000000000, .1333333333, .1666666667, .2000000000, .2333333333, .2666666667, .3000000000, .3333333333, .3666666667, .4000000000, .4333333333, .4666666667, .5000...
[0., 0.3333333333e-1, 0.6666666667e-1, .1000000000, .1333333333, .1666666667, .2000000000, .2333333333, .2666666667, .3000000000, .3333333333, .3666666667, .4000000000, .4333333333, .4666666667, .5000...
(34)
 

> PP:=matrix(N+2,M+1);
 

array( 1 .. 12, 1 .. 31, [ ] ) (35)
 

> for i from 1 to N+2 do PP[i,1]:=evalf(subs(x=(i-1)*h,rhs(IC)));od:
 

> for i from 1 to N+2 do for j from 2 to M+1 do PP[i,j]:=evalf(subs(z=T1[j],Pe=10.,u[i-1](z)));od;od:
 

> plotdata:= [seq([ seq([(i-1)*h,T1[j],PP[i,j]], i=1..N+2)], j=1..M+1)]:
 

> surfdata(plotdata,axes=boxed,title="Figure Exp. 5.24.",labels=[x,z,u],orientation=[-135,45]);
 

Plot
 

> ua0:=1-1.477*exp(-3.658*z/Pe)+0.81*exp(-22.178*z/Pe)-0.385*exp(-53.05*z/Pe);
 

`+`(1, `-`(`*`(1.477, `*`(exp(`+`(`-`(`/`(`*`(3.658, `*`(z)), `*`(Pe)))))))), `*`(.81, `*`(exp(`+`(`-`(`/`(`*`(22.178, `*`(z)), `*`(Pe))))))), `-`(`*`(.385, `*`(exp(`+`(`-`(`/`(`*`(53.05, `*`(z)), `*`... (36)
 

> u[0](z);
 

`+`(`*`(0.6396258436e-7, `*`(exp(`+`(`-`(`/`(`*`(843.8627025, `*`(z)), `*`(Pe))))))), `-`(`*`(0.2046970356e-3, `*`(exp(`+`(`-`(`/`(`*`(417.0229032, `*`(z)), `*`(Pe)))))))), `*`(0.1195590815e-1, `*`(ex...
`+`(`*`(0.6396258436e-7, `*`(exp(`+`(`-`(`/`(`*`(843.8627025, `*`(z)), `*`(Pe))))))), `-`(`*`(0.2046970356e-3, `*`(exp(`+`(`-`(`/`(`*`(417.0229032, `*`(z)), `*`(Pe)))))))), `*`(0.1195590815e-1, `*`(ex...
`+`(`*`(0.6396258436e-7, `*`(exp(`+`(`-`(`/`(`*`(843.8627025, `*`(z)), `*`(Pe))))))), `-`(`*`(0.2046970356e-3, `*`(exp(`+`(`-`(`/`(`*`(417.0229032, `*`(z)), `*`(Pe)))))))), `*`(0.1195590815e-1, `*`(ex...
`+`(`*`(0.6396258436e-7, `*`(exp(`+`(`-`(`/`(`*`(843.8627025, `*`(z)), `*`(Pe))))))), `-`(`*`(0.2046970356e-3, `*`(exp(`+`(`-`(`/`(`*`(417.0229032, `*`(z)), `*`(Pe)))))))), `*`(0.1195590815e-1, `*`(ex...
(37)
 

> pars:=[0.1,0.2,0.25,0.5,1,2];
 

[.1, .2, .25, .5, 1, 2] (38)
 

> M:=nops(pars);
 

6 (39)
 

> seq(evalf(subs(z=Pe*pars[i],ua0)),i=1..M);
 

0.6174643482e-1, .2989457048, .4113066251, .7628444874, .9619169890, .9990180665 (40)
 

> seq(evalf(subs(z=Pe*pars[i],z=10,u[0](z))),i=1..M);
 

0.621584604e-1, .2974939700, .4092682142, .7607005605, .9611740074, .9989780471 (41)
 

>