next up previous contents
Next: Number of nodes Up: Debugging Previous: Endpoint values

Output wave functions

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 V(r)=-1/r and r[0]=0 cause numerical difficulties at the origin. To avoid this, ``schdebug.c'' uses the change of variables map tex2html_wrap_inline429 . Under this map, near the origin tex2html_wrap_inline431 , tex2html_wrap_inline433 , tex2html_wrap_inline435 and tex2html_wrap_inline437 . Thus, it is mathematically correct to regard the offending term tex2html_wrap_inline439 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
Mon Feb 18 16:02:23 EST 2002