       Re: Problem with partial differential equations

• To: mathgroup at smc.vnet.net
• Subject: [mg23400] Re: Problem with partial differential equations
• From: Roland Franzius <Roland.Franzius at uos.de>
• Date: Sat, 6 May 2000 02:26:44 -0400 (EDT)
• References: <8etp9i\$n1n@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```Hi Max,
seems to work if you use delayed definitions (at evalutation time)

> P1[x_,t_]:=2x^2;
> P2[x_,t_]:=2(x+t)^2;
> Diff=0.2;
> G[x_]:=Exp[-x^2];

probably a problem of fixing variables to numbers

Max Ulbrich wrote:
>
> Hi,
>
> I have a problem with a partial differential equation.
> I want to solve a diffusion problem in a time-dependent potential.
> It works with the potential P1, but not with P2.
> Can someone help me?
>
> P1[x_,t_]=2x^2;
> P2[x_,t_]=2(x+t)^2;
> Diff=0.2;
> G[x_]=Exp[-x^2];
> solution=n/.First[
>       NDSolve[{Derivative[0,1][n][x,t]==
>
> Diff*Derivative[2,0][n][x,t]+n[x,t]*Derivative[2,0][P1][x,t]+
>
> Derivative[1,0][n][x,t]*Derivative[1,0][P1][x,t],n[x,0]==G[x],
>           n[-3,t]==G[-3],n[3,t]==G},n,{x,-3,3},{t,0,4},
>         StartingStepSize->0.05]];
> Plot3D[solution[x,t],{x,-2,2},{t,0,4}];
>
> Max Ulbrich
> ulbrich at biochem.mpg.de

--
Roland Franzius

+++ exactly <<n>> lines of this message have value <<FALSE>> +++

```

• Prev by Date: matrices, dot products and convergents of continued fractions
• Next by Date: Database in Module ?
• Previous by thread: Problem with partial differential equations
• Next by thread: Re: Problem with partial differential equations