Example 8.6
Example (8.1.6) is solved in Maple and the results obtained are given below:
| > |
| > | eq:=diff(u(x,t),t)=diff(u(x,t),x$2)+2/x*diff(u(x,t),x); |
| (1) |
| > | u(x,0):=0; |
| (2) |
| > | bc1:=diff(u(x,t),x)=0; |
| (3) |
| > | bc2:=u(x,t)=1; |
| (4) |
| > | eqs:=laplace(eq,t,s): |
| > | eqs:=subs(laplace(u(x,t),t,s)=U(x),eqs); |
| (5) |
| > | bc1:=laplace(bc1,t,s): |
| > | bc1:=subs(diff(laplace(u(x,t),t,s),x)=D(U)(0),laplace(u(x,t),t,s)=U(0),bc1); |
| (6) |
| > | bc2:=laplace(bc2,t,s): |
| > | bc2:=subs(diff(laplace(u(x,t),t,s),x)=D(U)(1),laplace(u(x,t),t,s)=U(1),bc2); |
| (7) |
| > | U(x):=rhs(dsolve({eqs,bc2},U(x))); |
| (8) |
| > | U(x):=subs(_C2=0,U(x)); |
| (9) |
| > | convert(U(x),exp); |
![]() |
(10) |
| > | U1s:=exp(s^(1/2))/s/(exp(s^(1/2))^2-1)*exp(s^(1/2)*x)/x; |
| (11) |
| > | U2s:=-exp(s^(1/2))/s/(exp(s^(1/2))^2-1)*exp(-s^(1/2)*x)/x; |
| (12) |
| > | U1S:=series(subs(exp(s^(1/2))=1/S,U1s),S): |
| > | U1S:=subs(S=exp(-s^(1/2)),U1S): |
| > | simplify(U1S); |
| (13) |
| > | U1S:=1/x*Sum(exp(s^(1/2)*(x-2*n+1))/s,n=1..infinity); |
![]() |
(14) |
| > | u1s:=exp(s^(1/2)*(x-2*n+1))/s; |
| (15) |
| > | u1t:=invlaplace(u1s,s,t); |
| (16) |
| > | U1t:=1/x*Sum(u1t,n=1..infinity); |
![]() |
(17) |
| > | U2S:=series(subs(exp(s^(1/2))=1/S,U2s),S): |
| > | U2S:=subs(S=exp(-s^(1/2)),U2S): |
| > | simplify(U2S); |
| (18) |
| > | U2S:=-1/x*Sum(exp(-s^(1/2)*(x+2*n-1))/s,n=1..infinity); |
![]() |
(19) |
| > | u2s:=exp(-s^(1/2)*(x+2*n-1))/s: |
| > | u2t:=invlaplace(u2s,s,t); |
| (20) |
| > | U2t:=-1/x*Sum(u2t,n=1..infinity); |
![]() |
(21) |
| > | Ut:=U1t+U2t; |
![]() |
(22) |
| > | u:=subs(infinity=N,Ut): |
| > | u:=subs(N=20,u); |
![]() |
(23) |
| > | plot3d(u,x=1e-6..1,t=1e-6..0.1,axes=boxed,title="Figure Exp. 8.11.",labels=[x,t,"u"],orientation=[-150,60]); |
![]() |
| > | plot([subs(t=1e-6,u),subs(t=1e-2,u),subs(t=0.05,u),subs(t=0.1,u)],x=0..1,axes=boxed,title="Figure Exp. 8.12.",thickness=5,labels=[x,"u"]); |
![]() |
| > |