7.20 boundary conditions in pdsolve (23.11.98)

7.20.1 Tom Casselman

Well I thought I had a simple problem to solve using maple: a first order linear pde of a function of two variables: n(x,t). This pde has the form:

      dn/dt + v*dn/dx+n/tau=G0*Heaviside(t)

(the derivitives are in fact partial derivitives)

with boundary conditions: n(x,0)=0 and n(0,t)=0. Note v and G0 are positive constants.

When I invoke pdsolve in R5 (Mac) I get a solution with an unknown function of \(x\) and \(t\):


The form is not useful to me as I do not know _F1. How do I insert the above boundry conditions into pdsolve or is pdsolve strictly for symbolic solutions?

Should I avoid using pdsolve and use Laplace transforms instead?

7.20.2 Robert Israel (24.11.98)

pdsolve doesn’t always find enough solutions for arbitrary boundary values, but in this case it does work. I assume you’re interested in the solution for t > 0 and x > 0.

> alias(N=n(x,t)); assume(v>0, G0>0, t>0, x>0); 
> de:= diff(N,t)+v*diff(N,x)+N/tau=G0*Heaviside(t); 
> sol:=pdsolve(de,N); 
                                                   x        t v - x 
                 sol := n(x, t) = G0 tau + exp(- -----) _F1(-------) 
                                                 tau v         v

For the boundary condition at t=0:

> eval(sol,{t=0,N=0}); 
                        0 = G0 tau + exp(- -----) _F1(- x/v) 
                                           tau v 
> isolate(subs(x=-s*v,%), _F1(s)); 
                                             G0 tau 
                                 _F1(s) = - -------- 

Note that this determines _F1(s) for s <= 0.

For the boundary condition at x=0:

> eval(sol,{x=0,N=0}); 
                                 0 = G0 tau + _F1(t)

And this tells you _F1(t) for t >= 0.

7.20.3 Willard, Daniel, Dr. (24.11.98)


> pdsolve(DE);

PDEtools is in shareware if you can’t find it elsewhere (eg, in R4).

Yes, substitute your BC in the solution and solve for _F1. Basically you have two equations for it and both must be satisfied.

7.20.4 TANGUY Christian (24.11.98)

The general solution to your differential equation is indeed

    sol(x,t) := _F1(x-v*t) + G0*tau*(exp(t/tau)-1)*Heaviside(t)

Using the first boundary condition n(x,0) = 0 implies _F1(x) = 0 for arbitrary \(x\), so that _F1=0.

This gives the solution G0*tau*(exp(t/tau)-1)*Heaviside(t).

Then you add another boundary condition n(0,t) = 0 , which would lead to an impossibility, unless you assume \(t<0\).

I am wondering about your boundary conditions: aren’t they too many for a first-order differential equation?