Example 5.4 

Consnider the following heat/mass transfer problem with a time dependent boundary condition, 

 

Typesetting:-mrow(Typesetting:-mfrac(Typesetting:-mrow(Typesetting:-mo( 

 

                                                                                        u(x,0) = 0                                                              (5.1.25)             

              

Typesetting:-mfrac(Typesetting:-mrow(Typesetting:-mo((0,t) = 0 and u(1,t) = 1 - e-t 

 

This boundary value problem is solved below in Maple by following the procedure described earlier.   In this case, the forcing function vector, b(t), is a funtion of time and hence equaiton (5.1.17)a is used to obtain the semianalytical solution.  The program used for example 5.3 can be used to solve this ecample by just modifying the boundary conditions. 

 

> restart;
 

> with(linalg):with(plots):
 

> ge:=diff(u(x,t),t)=diff(u(x,t),x$2);
 

diff(u(x, t), t) = diff(diff(u(x, t), x), x) (1)
 

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

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

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

`+`(u(x, t), `-`(1), exp(`+`(`-`(t)))) (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), exp(`+`(`-`(t)))) (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))), `*`(`^`(h, 2)))
diff(u[2](t), t) = `/`(`*`(`+`(u[1](t), `-`(`*`(2, `*`(u[2](t)))), u[3](t))), `*`(`^`(h, 2)))
diff(u[3](t), t) = `/`(`*`(`+`(u[2](t), `-`(`*`(2, `*`(u[3](t)))), u[4](t))), `*`(`^`(h, 2)))
diff(u[4](t), t) = `/`(`*`(`+`(u[3](t), `-`(`*`(2, `*`(u[4](t)))), u[5](t))), `*`(`^`(h, 2)))
diff(u[5](t), t) = `/`(`*`(`+`(u[4](t), `-`(`*`(2, `*`(u[5](t)))), u[6](t))), `*`(`^`(h, 2)))
diff(u[6](t), t) = `/`(`*`(`+`(u[5](t), `-`(`*`(2, `*`(u[6](t)))), u[7](t))), `*`(`^`(h, 2)))
diff(u[7](t), t) = `/`(`*`(`+`(u[6](t), `-`(`*`(2, `*`(u[7](t)))), u[8](t))), `*`(`^`(h, 2)))
diff(u[8](t), t) = `/`(`*`(`+`(u[7](t), `-`(`*`(2, `*`(u[8](t)))), u[9](t))), `*`(`^`(h, 2)))
diff(u[9](t), t) = `/`(`*`(`+`(u[8](t), `-`(`*`(2, `*`(u[9](t)))), u[10](t))), `*`(`^`(h, 2)))
diff(u[10](t), t) = `/`(`*`(`+`(u[9](t), `-`(`*`(2, `*`(u[10](t)))), u[11](t))), `*`(`^`(h, 2))) (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, `-`(exp(`+`(`-`(t))))) (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)))))), `*`(`^`(h, 2)))
diff(u[2](t), t) = `/`(`*`(`+`(u[1](t), `-`(`*`(2, `*`(u[2](t)))), u[3](t))), `*`(`^`(h, 2)))
diff(u[3](t), t) = `/`(`*`(`+`(u[2](t), `-`(`*`(2, `*`(u[3](t)))), u[4](t))), `*`(`^`(h, 2)))
diff(u[4](t), t) = `/`(`*`(`+`(u[3](t), `-`(`*`(2, `*`(u[4](t)))), u[5](t))), `*`(`^`(h, 2)))
diff(u[5](t), t) = `/`(`*`(`+`(u[4](t), `-`(`*`(2, `*`(u[5](t)))), u[6](t))), `*`(`^`(h, 2)))
diff(u[6](t), t) = `/`(`*`(`+`(u[5](t), `-`(`*`(2, `*`(u[6](t)))), u[7](t))), `*`(`^`(h, 2)))
diff(u[7](t), t) = `/`(`*`(`+`(u[6](t), `-`(`*`(2, `*`(u[7](t)))), u[8](t))), `*`(`^`(h, 2)))
diff(u[8](t), t) = `/`(`*`(`+`(u[7](t), `-`(`*`(2, `*`(u[8](t)))), u[9](t))), `*`(`^`(h, 2)))
diff(u[9](t), t) = `/`(`*`(`+`(u[8](t), `-`(`*`(2, `*`(u[9](t)))), u[10](t))), `*`(`^`(h, 2)))
diff(u[10](t), t) = `/`(`*`(`+`(u[9](t), `-`(`*`(2, `*`(u[10](t)))), 1, `-`(exp(`+`(`-`(t)))))), `*`(`^`(h, 2))) (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);
 

Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mtable(Typesetting:-mtr(Typesetting:-mtd(Typesetting:-mn( (14)
 

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

`/`(1, 11) (15)
 

> A:=map(eval,A):
 

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

> evalm(A);
 

Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mtable(Typesetting:-mtr(Typesetting:-mtd(Typesetting:-mn( (16)
 

> det(A);
 

0.4484999965e21 (17)
 

> mat:=exponential(A,t):
 

> mat:=map(evalf,mat):
 

> mat:=map(simplify,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);
 

Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mtable(Typesetting:-mtr(Typesetting:-mtd(Typesetting:-mn( (18)
 

> b2:=subs(t=tau,evalm(b));
 

`:=`(b2, Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mtable(Typesetting:-mtr(Typesetting:-mtd(Typesetting:-mn( (19)
 

> mat2:=subs(t=t-tau,evalm(mat)):
 

> mat3:=evalm(mat2&*b2):
 

> mat4:=map(int,mat3,tau=0..t):
 

> Y:=evalm(mat&*Y0+mat4):
 

> Y:=map(simplify,Y):
 

> 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;
 

 

 

 

 

 

 

 

 

 

 

 

`+`(`*`(.8681373190, `*`(exp(`+`(`-`(`*`(2.465470971, `*`(t))))))), `-`(`*`(0.2000242675e-1, `*`(exp(`+`(`-`(`*`(22.03592529, `*`(t)))))))), `*`(0.4166760389e-2, `*`(exp(`+`(`-`(`*`(60.19228428, `*`(t...
`+`(`*`(.8681373190, `*`(exp(`+`(`-`(`*`(2.465470971, `*`(t))))))), `-`(`*`(0.2000242675e-1, `*`(exp(`+`(`-`(`*`(22.03592529, `*`(t)))))))), `*`(0.4166760389e-2, `*`(exp(`+`(`-`(`*`(60.19228428, `*`(t...
`+`(`*`(.8681373190, `*`(exp(`+`(`-`(`*`(2.465470971, `*`(t))))))), `-`(`*`(0.2000242675e-1, `*`(exp(`+`(`-`(`*`(22.03592529, `*`(t)))))))), `*`(0.4166760389e-2, `*`(exp(`+`(`-`(`*`(60.19228428, `*`(t...
`+`(`*`(.8681373190, `*`(exp(`+`(`-`(`*`(2.465470971, `*`(t))))))), `-`(`*`(0.2000242675e-1, `*`(exp(`+`(`-`(`*`(22.03592529, `*`(t)))))))), `*`(0.4166760389e-2, `*`(exp(`+`(`-`(`*`(60.19228428, `*`(t...
`+`(`*`(.8593820229, `*`(exp(`+`(`-`(`*`(2.465470971, `*`(t))))))), `-`(`*`(0.1833306308e-1, `*`(exp(`+`(`-`(`*`(22.03592529, `*`(t)))))))), `*`(0.3336802648e-2, `*`(exp(`+`(`-`(`*`(60.19228428, `*`(t...
`+`(`*`(.8593820229, `*`(exp(`+`(`-`(`*`(2.465470971, `*`(t))))))), `-`(`*`(0.1833306308e-1, `*`(exp(`+`(`-`(`*`(22.03592529, `*`(t)))))))), `*`(0.3336802648e-2, `*`(exp(`+`(`-`(`*`(60.19228428, `*`(t...
`+`(`*`(.8593820229, `*`(exp(`+`(`-`(`*`(2.465470971, `*`(t))))))), `-`(`*`(0.1833306308e-1, `*`(exp(`+`(`-`(`*`(22.03592529, `*`(t)))))))), `*`(0.3336802648e-2, `*`(exp(`+`(`-`(`*`(60.19228428, `*`(t...
`+`(`*`(.8593820229, `*`(exp(`+`(`-`(`*`(2.465470971, `*`(t))))))), `-`(`*`(0.1833306308e-1, `*`(exp(`+`(`-`(`*`(22.03592529, `*`(t)))))))), `*`(0.3336802648e-2, `*`(exp(`+`(`-`(`*`(60.19228428, `*`(t...
`+`(`*`(.8331161339, `*`(exp(`+`(`-`(`*`(2.465470971, `*`(t))))))), `-`(`*`(0.1332497207e-1, `*`(exp(`+`(`-`(`*`(22.03592529, `*`(t)))))))), `*`(0.8469294252e-3, `*`(exp(`+`(`-`(`*`(60.19228428, `*`(t...
`+`(`*`(.8331161339, `*`(exp(`+`(`-`(`*`(2.465470971, `*`(t))))))), `-`(`*`(0.1332497207e-1, `*`(exp(`+`(`-`(`*`(22.03592529, `*`(t)))))))), `*`(0.8469294252e-3, `*`(exp(`+`(`-`(`*`(60.19228428, `*`(t...
`+`(`*`(.8331161339, `*`(exp(`+`(`-`(`*`(2.465470971, `*`(t))))))), `-`(`*`(0.1332497207e-1, `*`(exp(`+`(`-`(`*`(22.03592529, `*`(t)))))))), `*`(0.8469294252e-3, `*`(exp(`+`(`-`(`*`(60.19228428, `*`(t...
`+`(`*`(.8331161339, `*`(exp(`+`(`-`(`*`(2.465470971, `*`(t))))))), `-`(`*`(0.1332497207e-1, `*`(exp(`+`(`-`(`*`(22.03592529, `*`(t)))))))), `*`(0.8469294252e-3, `*`(exp(`+`(`-`(`*`(60.19228428, `*`(t...
`+`(`*`(.7898748320, `*`(exp(`+`(`-`(`*`(2.465470971, `*`(t))))))), `-`(`*`(0.5890202896e-2, `*`(exp(`+`(`-`(`*`(22.03592529, `*`(t)))))))), `-`(`*`(0.2064254676e-2, `*`(exp(`+`(`-`(`*`(60.19228428, `...
`+`(`*`(.7898748320, `*`(exp(`+`(`-`(`*`(2.465470971, `*`(t))))))), `-`(`*`(0.5890202896e-2, `*`(exp(`+`(`-`(`*`(22.03592529, `*`(t)))))))), `-`(`*`(0.2064254676e-2, `*`(exp(`+`(`-`(`*`(60.19228428, `...
`+`(`*`(.7898748320, `*`(exp(`+`(`-`(`*`(2.465470971, `*`(t))))))), `-`(`*`(0.5890202896e-2, `*`(exp(`+`(`-`(`*`(22.03592529, `*`(t)))))))), `-`(`*`(0.2064254676e-2, `*`(exp(`+`(`-`(`*`(60.19228428, `...
`+`(`*`(.7898748320, `*`(exp(`+`(`-`(`*`(2.465470971, `*`(t))))))), `-`(`*`(0.5890202896e-2, `*`(exp(`+`(`-`(`*`(22.03592529, `*`(t)))))))), `-`(`*`(0.2064254676e-2, `*`(exp(`+`(`-`(`*`(60.19228428, `...
`+`(`*`(.7305391818, `*`(exp(`+`(`-`(`*`(2.465470971, `*`(t))))))), `*`(0.2617261358e-2, `*`(exp(`+`(`-`(`*`(22.03592529, `*`(t))))))), `-`(`*`(0.3948561064e-2, `*`(exp(`+`(`-`(`*`(60.19228428, `*`(t)...
`+`(`*`(.7305391818, `*`(exp(`+`(`-`(`*`(2.465470971, `*`(t))))))), `*`(0.2617261358e-2, `*`(exp(`+`(`-`(`*`(22.03592529, `*`(t))))))), `-`(`*`(0.3948561064e-2, `*`(exp(`+`(`-`(`*`(60.19228428, `*`(t)...
`+`(`*`(.7305391818, `*`(exp(`+`(`-`(`*`(2.465470971, `*`(t))))))), `*`(0.2617261358e-2, `*`(exp(`+`(`-`(`*`(22.03592529, `*`(t))))))), `-`(`*`(0.3948561064e-2, `*`(exp(`+`(`-`(`*`(60.19228428, `*`(t)...
`+`(`*`(.7305391818, `*`(exp(`+`(`-`(`*`(2.465470971, `*`(t))))))), `*`(0.2617261358e-2, `*`(exp(`+`(`-`(`*`(22.03592529, `*`(t))))))), `-`(`*`(0.3948561064e-2, `*`(exp(`+`(`-`(`*`(60.19228428, `*`(t)...
`+`(`*`(.6563181841, `*`(exp(`+`(`-`(`*`(2.465470971, `*`(t))))))), `*`(0.1064808398e-1, `*`(exp(`+`(`-`(`*`(22.03592529, `*`(t))))))), `-`(`*`(0.3868628354e-2, `*`(exp(`+`(`-`(`*`(60.19228428, `*`(t)...
`+`(`*`(.6563181841, `*`(exp(`+`(`-`(`*`(2.465470971, `*`(t))))))), `*`(0.1064808398e-1, `*`(exp(`+`(`-`(`*`(22.03592529, `*`(t))))))), `-`(`*`(0.3868628354e-2, `*`(exp(`+`(`-`(`*`(60.19228428, `*`(t)...
`+`(`*`(.6563181841, `*`(exp(`+`(`-`(`*`(2.465470971, `*`(t))))))), `*`(0.1064808398e-1, `*`(exp(`+`(`-`(`*`(22.03592529, `*`(t))))))), `-`(`*`(0.3868628354e-2, `*`(exp(`+`(`-`(`*`(60.19228428, `*`(t)...
`+`(`*`(.6563181841, `*`(exp(`+`(`-`(`*`(2.465470971, `*`(t))))))), `*`(0.1064808398e-1, `*`(exp(`+`(`-`(`*`(22.03592529, `*`(t))))))), `-`(`*`(0.3868628354e-2, `*`(exp(`+`(`-`(`*`(60.19228428, `*`(t)...
`+`(`*`(.5687241527, `*`(exp(`+`(`-`(`*`(2.465470971, `*`(t))))))), `*`(0.1673973203e-1, `*`(exp(`+`(`-`(`*`(22.03592529, `*`(t))))))), `-`(`*`(0.1864219414e-2, `*`(exp(`+`(`-`(`*`(60.19228428, `*`(t)...
`+`(`*`(.5687241527, `*`(exp(`+`(`-`(`*`(2.465470971, `*`(t))))))), `*`(0.1673973203e-1, `*`(exp(`+`(`-`(`*`(22.03592529, `*`(t))))))), `-`(`*`(0.1864219414e-2, `*`(exp(`+`(`-`(`*`(60.19228428, `*`(t)...
`+`(`*`(.5687241527, `*`(exp(`+`(`-`(`*`(2.465470971, `*`(t))))))), `*`(0.1673973203e-1, `*`(exp(`+`(`-`(`*`(22.03592529, `*`(t))))))), `-`(`*`(0.1864219414e-2, `*`(exp(`+`(`-`(`*`(60.19228428, `*`(t)...
`+`(`*`(.5687241527, `*`(exp(`+`(`-`(`*`(2.465470971, `*`(t))))))), `*`(0.1673973203e-1, `*`(exp(`+`(`-`(`*`(22.03592529, `*`(t))))))), `-`(`*`(0.1864219414e-2, `*`(exp(`+`(`-`(`*`(60.19228428, `*`(t)...
`+`(`*`(.4695419152, `*`(exp(`+`(`-`(`*`(2.465470971, `*`(t))))))), `*`(0.1978282451e-1, `*`(exp(`+`(`-`(`*`(22.03592529, `*`(t))))))), `*`(0.1067558932e-2, `*`(exp(`+`(`-`(`*`(60.19228428, `*`(t)))))...
`+`(`*`(.4695419152, `*`(exp(`+`(`-`(`*`(2.465470971, `*`(t))))))), `*`(0.1978282451e-1, `*`(exp(`+`(`-`(`*`(22.03592529, `*`(t))))))), `*`(0.1067558932e-2, `*`(exp(`+`(`-`(`*`(60.19228428, `*`(t)))))...
`+`(`*`(.4695419152, `*`(exp(`+`(`-`(`*`(2.465470971, `*`(t))))))), `*`(0.1978282451e-1, `*`(exp(`+`(`-`(`*`(22.03592529, `*`(t))))))), `*`(0.1067558932e-2, `*`(exp(`+`(`-`(`*`(60.19228428, `*`(t)))))...
`+`(`*`(.4695419152, `*`(exp(`+`(`-`(`*`(2.465470971, `*`(t))))))), `*`(0.1978282451e-1, `*`(exp(`+`(`-`(`*`(22.03592529, `*`(t))))))), `*`(0.1067558932e-2, `*`(exp(`+`(`-`(`*`(60.19228428, `*`(t)))))...
`+`(`*`(.3607924401, `*`(exp(`+`(`-`(`*`(2.465470971, `*`(t))))))), `*`(0.1922316709e-1, `*`(exp(`+`(`-`(`*`(22.03592529, `*`(t))))))), `*`(0.3468273597e-2, `*`(exp(`+`(`-`(`*`(60.19228428, `*`(t)))))...
`+`(`*`(.3607924401, `*`(exp(`+`(`-`(`*`(2.465470971, `*`(t))))))), `*`(0.1922316709e-1, `*`(exp(`+`(`-`(`*`(22.03592529, `*`(t))))))), `*`(0.3468273597e-2, `*`(exp(`+`(`-`(`*`(60.19228428, `*`(t)))))...
`+`(`*`(.3607924401, `*`(exp(`+`(`-`(`*`(2.465470971, `*`(t))))))), `*`(0.1922316709e-1, `*`(exp(`+`(`-`(`*`(22.03592529, `*`(t))))))), `*`(0.3468273597e-2, `*`(exp(`+`(`-`(`*`(60.19228428, `*`(t)))))...
`+`(`*`(.3607924401, `*`(exp(`+`(`-`(`*`(2.465470971, `*`(t))))))), `*`(0.1922316709e-1, `*`(exp(`+`(`-`(`*`(22.03592529, `*`(t))))))), `*`(0.3468273597e-2, `*`(exp(`+`(`-`(`*`(60.19228428, `*`(t)))))...
`+`(`*`(.2446916090, `*`(exp(`+`(`-`(`*`(2.465470971, `*`(t))))))), `*`(0.1516267965e-1, `*`(exp(`+`(`-`(`*`(22.03592529, `*`(t))))))), `*`(0.4143672356e-2, `*`(exp(`+`(`-`(`*`(60.19228428, `*`(t)))))...
`+`(`*`(.2446916090, `*`(exp(`+`(`-`(`*`(2.465470971, `*`(t))))))), `*`(0.1516267965e-1, `*`(exp(`+`(`-`(`*`(22.03592529, `*`(t))))))), `*`(0.4143672356e-2, `*`(exp(`+`(`-`(`*`(60.19228428, `*`(t)))))...
`+`(`*`(.2446916090, `*`(exp(`+`(`-`(`*`(2.465470971, `*`(t))))))), `*`(0.1516267965e-1, `*`(exp(`+`(`-`(`*`(22.03592529, `*`(t))))))), `*`(0.4143672356e-2, `*`(exp(`+`(`-`(`*`(60.19228428, `*`(t)))))...
`+`(`*`(.2446916090, `*`(exp(`+`(`-`(`*`(2.465470971, `*`(t))))))), `*`(0.1516267965e-1, `*`(exp(`+`(`-`(`*`(22.03592529, `*`(t))))))), `*`(0.4143672356e-2, `*`(exp(`+`(`-`(`*`(60.19228428, `*`(t)))))...
`+`(`*`(0.9631500831e-5, `*`(exp(`+`(`-`(`*`(472.7251489, `*`(t))))))), `*`(.1236050601, `*`(exp(`+`(`-`(`*`(2.465470971, `*`(t))))))), `*`(0.8340836747e-2, `*`(exp(`+`(`-`(`*`(22.03592529, `*`(t)))))...
`+`(`*`(0.9631500831e-5, `*`(exp(`+`(`-`(`*`(472.7251489, `*`(t))))))), `*`(.1236050601, `*`(exp(`+`(`-`(`*`(2.465470971, `*`(t))))))), `*`(0.8340836747e-2, `*`(exp(`+`(`-`(`*`(22.03592529, `*`(t)))))...
`+`(`*`(0.9631500831e-5, `*`(exp(`+`(`-`(`*`(472.7251489, `*`(t))))))), `*`(.1236050601, `*`(exp(`+`(`-`(`*`(2.465470971, `*`(t))))))), `*`(0.8340836747e-2, `*`(exp(`+`(`-`(`*`(22.03592529, `*`(t)))))...
`+`(`*`(0.9631500831e-5, `*`(exp(`+`(`-`(`*`(472.7251489, `*`(t))))))), `*`(.1236050601, `*`(exp(`+`(`-`(`*`(2.465470971, `*`(t))))))), `*`(0.8340836747e-2, `*`(exp(`+`(`-`(`*`(22.03592529, `*`(t)))))...
`+`(1, `-`(exp(`+`(`-`(t))))) (20)
 

> for i from 0 to N+1 do
 p[i]:=plot(subs(delta=1,u[i](t)),t=0..0.4,thickness=4,color=COLOR(HUE,i/(N+2)));
end do:
 

> arw:=arrow(<0.3,0.02>,<-0.15,0.11>,width=[1/1000,relative=false],head_width=[1/200,relative=false],head_length=[1/20,relative]):
pt:=textplot([[0.12,0.17,typeset("Follow the arrow: ",u[0],"(t), ..., ",u[N+1],"(t).")]]):
 

> display([seq(p[i],i=1..N),p[0],pt,arw],title="Figure Exp. 5.11.",axes=boxed,labels=[t,"u"]);
 

Plot_2d
 

> for i from 0 to N+1 do p[i]:=plot(subs(delta=0.1,u[i](t)),t=0..0.4,thickness=3);od:
 

> tf:=0.4;
 

.4 (21)
 

> M:=30;
 

30 (22)
 

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

[0., 0.1333333333e-1, 0.2666666667e-1, 0.4000000000e-1, 0.5333333333e-1, 0.6666666667e-1, 0.8000000000e-1, 0.9333333333e-1, .1066666667, .1200000000, .1333333333, .1466666667, .1600000000, .1733333333...
[0., 0.1333333333e-1, 0.2666666667e-1, 0.4000000000e-1, 0.5333333333e-1, 0.6666666667e-1, 0.8000000000e-1, 0.9333333333e-1, .1066666667, .1200000000, .1333333333, .1466666667, .1600000000, .1733333333...
[0., 0.1333333333e-1, 0.2666666667e-1, 0.4000000000e-1, 0.5333333333e-1, 0.6666666667e-1, 0.8000000000e-1, 0.9333333333e-1, .1066666667, .1200000000, .1333333333, .1466666667, .1600000000, .1733333333...
[0., 0.1333333333e-1, 0.2666666667e-1, 0.4000000000e-1, 0.5333333333e-1, 0.6666666667e-1, 0.8000000000e-1, 0.9333333333e-1, .1066666667, .1200000000, .1333333333, .1466666667, .1600000000, .1733333333...
[0., 0.1333333333e-1, 0.2666666667e-1, 0.4000000000e-1, 0.5333333333e-1, 0.6666666667e-1, 0.8000000000e-1, 0.9333333333e-1, .1066666667, .1200000000, .1333333333, .1466666667, .1600000000, .1733333333...
(23)
 

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

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

> 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],subs(delta=1,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.12.",labels=[x,t,u],orientation=[-145,45]);
 

Plot
 

> u[0](t);
 

`+`(`*`(.8681373190, `*`(exp(`+`(`-`(`*`(2.465470971, `*`(t))))))), `-`(`*`(0.2000242675e-1, `*`(exp(`+`(`-`(`*`(22.03592529, `*`(t)))))))), `*`(0.4166760389e-2, `*`(exp(`+`(`-`(`*`(60.19228428, `*`(t...
`+`(`*`(.8681373190, `*`(exp(`+`(`-`(`*`(2.465470971, `*`(t))))))), `-`(`*`(0.2000242675e-1, `*`(exp(`+`(`-`(`*`(22.03592529, `*`(t)))))))), `*`(0.4166760389e-2, `*`(exp(`+`(`-`(`*`(60.19228428, `*`(t...
`+`(`*`(.8681373190, `*`(exp(`+`(`-`(`*`(2.465470971, `*`(t))))))), `-`(`*`(0.2000242675e-1, `*`(exp(`+`(`-`(`*`(22.03592529, `*`(t)))))))), `*`(0.4166760389e-2, `*`(exp(`+`(`-`(`*`(60.19228428, `*`(t...
`+`(`*`(.8681373190, `*`(exp(`+`(`-`(`*`(2.465470971, `*`(t))))))), `-`(`*`(0.2000242675e-1, `*`(exp(`+`(`-`(`*`(22.03592529, `*`(t)))))))), `*`(0.4166760389e-2, `*`(exp(`+`(`-`(`*`(60.19228428, `*`(t...
(25)
 

> plot(evalf(u[0](t)),t=0..10,thickness=4,axes=boxed,labels=['t',typeset(u[0],"(t)")]);
 

Plot_2d
 

> plot(u[N+1](t),t=0..10,thickness=4,axes=boxed,labels=['t',typeset(u[N+1],"(t)")]);
 

Plot_2d
 

> limit(u[0](t),t=4);
 

.9661380686 (26)
 

>