[Date Index]
[Thread Index]
[Author Index]
Re: shooting method
*To*: mathgroup at smc.vnet.net
*Subject*: [mg92105] Re: shooting method
*From*: "Kevin J. McCann" <Kevin.McCann at umbc.edu>
*Date*: Sat, 20 Sep 2008 04:58:38 -0400 (EDT)
*Organization*: University System of Maryland
*References*: <gapfd4$o7q$1@smc.vnet.net>
I think you mean that A is approximately zero not <<1.
To figure out what I should actually use for A and B, I first Plot your
potential. If I am looking for bound states, then it looks as though I
can use A=0.9 and B=4. Further refinements could be necessary. Here is
some code.
A = 0.9;
B = 4.0;
nde[e_] = {-y''[x] + 400 (1/x^12 - 1/x^6) y[x] - e y[x] == 0,
y[A] == 0, y'[A] == 1};
tbl = Table[{e,
y[B] /. NDSolve[nde[e],
y, {x, A, B}][[1]]}, {e, -10, -0.01, .01}];
ListPlot[tbl, PlotRange -> {-100, 100}]
What this does is to start at A and shoot to B for a given trial
eigenenergy e, then evaluate y[B] and plot the results for a lot of e's.
As you can see if you run the code, there is a zero crossing for e ~=
-0.85 (the only zero crossing).
Now you can write a function and use FindRoot to get the eigenvalue,
then you can generate the eigenfunction and normalize it.
Here is the code to find the eigenvalue and plot it:
Clear[f];
f[e_?NumberQ] := y[B] /. NDSolve[nde[e], y, {x, A, B}][[1]]
e0 = e /. FindRoot[f[e] == 0, {e, -9, -8}]
Y = y /. NDSolve[nde[e0], y, {x, A, B}][[1]]
Plot[Y[x], {x, A, B}]
Note that there is another eigenvalue/eigenfunction at about e=-55 as well.
Luca Petrone wrote:
> Dear All,
>
> Using a shooting method, I would like to find the smallest eigenvalue of
>
> -y''[x] + 400((1/x)^12 - (1/x)^6) y[x] == E0*y[x]
>
> (the quantum-mechanical steady state energy of an anharmonic
oscillator with Lennard-Jones potential)
> with the boundary conditions :
> y[A]==0
> y[B]==0
> with A<<1 and B >> 1
> Can anyone help about how to implement it ?
>
> Thank you
>
> Luca
>
Prev by Date:
**Re: NDSolve and Piecewise**
Next by Date:
**Re: Debracketing array symbols**
Previous by thread:
**Re: shooting method**
Next by thread:
**imagesize to full width of current screen**
| |