Again, run the program with E=-0.5. Your results for the outward
integration should agree with the analytic solution to about 4-5
decimal places (except for k
80). Because the Schrödinger
equation determines the wave function only up to a constant
normalization factor, the results for the inward integration will not
match the analytic solution, but the ratio should be constant to
within about 4-5 decimal places, except for numerical errors near the
ends of the integration interval.
Note: The facts that
and r[0]=0 cause
numerical difficulties at the origin. To avoid this, ``schdebug.c'' uses
the change of variables map
. Under this map, near
the origin
,
,
and
. Thus, it is
mathematically correct to regard the offending term
as zero at the origin. The
program ``schdebug.c'' achieves the same effect, but without the
division by zero and the NaN's, by simply setting V[0]
0 when
initializing the array V[].
Tomas Arias
2007-02-16