Status: Open
Hello.
I just bought Mathematica for developing physical simulations for the physics courses I follow. I have made a little program for animating quantum waves (for a given potential) using solutions of the TDSE (Time-Depended Schrödinger Equation). The code of the program is
V[x_, t_] :=
Evaluate[Input["Enter the potential function:", Abs[x]]];
m = Evaluate[Input["Enter the mass of the particle:", 1]];
collapsePower = 10;
collapseWidth = 1/6.5;
collapseX = 0;
h = 6.62606957*10^-34;
hbar = h/(2*\[Pi]);
\[Psi][x_] := collapseX + 1/(Abs[x/collapseWidth]^collapsePower + 1);
\[Psi]n[x_] := \[Psi][x]/
NIntegrate[\[Psi][X], {X, -Infinity, Infinity}];
S = NDSolve[{I*hbar*
D[\[CapitalPsi][x, t], t] == -hbar^2/(2*m)*
D[\[CapitalPsi][x, t], {x, 2}] + V[x, t], \[CapitalPsi][x,
0] == \[Psi]n[x]}, \[CapitalPsi][x, t], {x, -20, 20}, {t, 0,
50}];
P[x_, t_] := Abs[\[CapitalPsi][x, t] /. S]^2;
Animate[Plot[{P[x, t], V[x, t],
Re[\[CapitalPsi][x, t] /. S]}, {x, -20, 20}, PlotRange -> 10], {t,
0, 50}]
The code above are the last version.
- V is the potential
- m is the mass- collapse… is a variable that describes the starting wave (a collapsed/observed wave)
- ? (Psi) is the collapsed wave
- ?n (Psi-n) is the normalized ?
- ? (CapitalPsi) is a function of time that describes the wave
- P is the probability density function
When NDSolve runs Mathematica returns:
NDSolve::bcart: Warning: an insufficient number of boundary conditions have been specified for the direction of independent variable x. Artificial boundary effects may be present in the solution.
What have i done wrong?
I hope you can help me. Thanks you.
NOTE: Sorry for my bad english


