MathGroup Archive 2003

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

Search the Archive

Re: NDSolve and partial differential equations

  • To: mathgroup at smc.vnet.net
  • Subject: [mg42361] Re: NDSolve and partial differential equations
  • From: "Bill Bertram" <wkb at ansto.gov.au>
  • Date: Wed, 2 Jul 2003 06:36:23 -0400 (EDT)
  • Organization: Australian Nuclear Science and Technology Organisation
  • References: <bds0s0$64t$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

"AES/newspost" <siegman at stanford.edu> wrote in message
news:bds0s0$64t$1 at smc.vnet.net...
> The paraxial wave equation for an optical beam propagating in the z
> direction is in essence
>
>     D[ f[x, z], z] = I alpha D[ f[x,z], {x,2}]
>
> I'd like to integrate this forward in z starting with some specified
> input profile  f[x,0]  at z = 0.  Approaches of the general form
>
>   NDSolve[ { D[ f[x, z], z] == I alpha D[ f[x, z], {x,2}],
>                         f[x, 0] == Exp[-x^2]}, {x,-5,5}, {z,0,2}]
>
> and variations on this theme are giving me a lot of mysterious error

Yes, but there are two errors in your version ( I presume you have given
alpha a numerical value before you start).
Firstly you have to tell Mathematica what you are solving for. So you need
to insert "f" before your integration limits.
Secondly, as well as your initial (ie z=0) condition, you need to specify
two boundary conditions which fix the values of any two of  f[-5, z] , f
'[-5,z], f[5,z] f '[5,z]. (here f ' denotes derivative wrt x).
For example:
DSolve[{D[f[x, z], z] == I*alpha*D[f[x, z], {x, 2}],  f[x, 0] == Exp[-x^2],
f[-5, z] == Exp[-25],

f[5, z] == Exp[-25]},  f, {x, -5, 5}, {z, 0, 2}]

Cheers,

  Bill



  • Prev by Date: New version, new bugs
  • Next by Date: RE: formatting question
  • Previous by thread: Re: NDSolve and partial differential equations
  • Next by thread: Re: format Text in graphics