MathGroup Archive 2000

[Date Index] [Thread Index] [Author Index]

Search the Archive

Problem with partial differential equations


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[3]},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



  • Prev by Date: Re: Integrate query
  • Next by Date: Re: Integrate query
  • Previous by thread: Why is Timing so irregular? How should I measure efficiency?
  • Next by thread: Re: Problem with partial differential equations