Exmaple 8.4
Example (8.1.4) is solved in Maple below:
| > | restart:with(inttrans):with(plots): |
| > |
| > | eq:=diff(u(x,t),t)=diff(u(x,t),x$2); |
| (1) |
| > | u(x,0):=sin(Pi*x/2); |
| (2) |
| > | bc1:=u(x,t)=0; |
| (3) |
| > | bc2:=diff(u(x,t),x)=0; |
| (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,bc1,bc2},U(x))); |
| (8) |
| > | u:=invlaplace(U(x),s,t); |
| (9) |
| > | plot3d(u,x=1..0,t=0..0.2,axes=boxed,title="Figure Exp. 8.7.",labels=[x,t,"u"],orientation=[120,60]); |
![]() |
| > | plot([subs(t=0,u),subs(t=0.1,u),subs(t=0.2,u),subs(t=0.5,u)],x=0..1,axes=boxed,title="Figure Exp. 8.8.",thickness=5,labels=[x,"u"]); |
![]() |
In examples 8.3 and 8.4 Maple was used to invert from the Laplace domain to the time domain. Unfortunately, these two examples are very simple and, hence, we could invert to the time domain using Maple. For practical problems, inversion is not straightforward. The inversion to the time domain can be done in two different ways. In section 8.1.4, short time solutions will be obtained by converting the solution in Laplace domain to an infinite series. In section 8.1.5, a long time solution will be obtained by using the Heaviside expansion theorem.
| > |