Laplace Transform Method:
Diffusion Equation With Dirichlet Condition
M.M. Yovanovich
LPTPDEDIR.MWS
Laplace transform of one-dimensional diffusion equation in half-space
with Dirichlet boundary condition at
. The PDE is
and the initial condition is
, with boundary conditions:
and
.
> restart:
> with(inttrans):
> pde:= diff(u(x,t),x,x) = 1/alpha*diff(u(x,t),t);
> alias(U(x,s)=laplace(u(x,t),t,s)):
> ode:= laplace(pde,t,s);
> ic:= u(x,0) = 0;
> bc1:= u(0,t) = u[0];
> bc2:= u(infinity,t) = 0;
> ode1:= subs(ic,ode);
> ode2:= subs(U(x,s) = U(x), ode1);
> solode2:= dsolve(ode2, U(x));
To have a bounded solution at
, eliminate the positive exponential.
> _C1:= 0;
> solode3:= solode2;
Take the Laplace transform of the boundary condition at
.
> bc1:= laplace(bc1,t,s);
Solve for the second boundary condition.
> _C2:= solve(simplify(subs(x=0, rhs(solode3)) - rhs(bc1)), _C2);
> solode4:= solode3;
The solution of the problem is the inverse Laplace tranform of the above relation.
The Laplace transform tables cannot provide the inverse directly from the above expression. It will be necesary to let
before the tables can be used. We will try to use Maple to get the inverse.
> try1:= u[0]*exp(-sqrt(s)*a)/s;
> invlaplace(try1,s,t);
Maple can not give the inverse. Now try the parameter
.
> try2:= subs(a=1, try1);
> invlaplace(try2,s,t);
Maple has found the inverse and the solution can be expressed as
> assume(x>0):u(x,t) = subs(t = alpha*t/x^2, %);
The solution of the one-dimensional diffusion equation with Dirichlet boundary condition has been found.