sghayebph
(Sara Zamharir)
January 10, 2016, 11:27am
1
Hello everybody
I want to solve Schrodinger equation for a quantum dot by shooting method. My code is:
v[x_] := If[0 < x < 0.5, 0, 50];
energy = 6;
xMax = 5;
solution =
NDSolve[{psi’‘[x] + (2/x) psi’[x] == -2 (energy - v[x]) psi[x],
psi[xMax] == 0, psi’[xMax] == 0.001}, psi, {x, 0, xMax}];
Plot[psi[x] /. solution, {x, 0, xMax}]
The plotted wave function is not the correct one. What is my mistake?
nma
(Nasser M. Abbasi)
January 10, 2016, 11:44am
2
The plotted wave function is not the correct one
You did not tell the readers what the correct one should be? But this eliminates the warnings you were getting, may be it will get you started. I have no idea what the plot should look like, or if your equation and parameters are correct or not.
ClearAll[x, psi, v];
v[x_] := If[0 < x < 0.5, 0, 50];
energy = 6; xMax = 1;
solution = NDSolve[{psi''[x] + (2/x) psi'[x] == -2 (energy - v[x]) psi[x],psi[xMax] == 0, psi'[xMax] == 0.001},
psi, {x, 0.00001, xMax}, Method -> "StiffnessSwitching"]
Plot[psi[x] /. solution, {x, 0.00001, xMax}]
fkampas
(Frank Kampas)
January 10, 2016, 1:54pm
3
I’ve found the quasi-linearization has better convergence for boundary value problems than the shooting method.
sghayebph
(Sara Zamharir)
January 10, 2016, 3:25pm
4
Thanks for your reply. it should be something like the wavefunction corresponding to n=1 in the attached figure.
sghayebph
(Sara Zamharir)
January 10, 2016, 3:28pm
5
Thanks for your suggestion. Unfortunately I have to use shooting method not other numerical methods.
fkampas
(Frank Kampas)
January 10, 2016, 4:00pm
6
I suspect the 2/x term, which is singular at the origin, is what’s causing problems.