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 $r(x)=x^2/(1-x)$. Under this map, near the origin $r \approx x^2$, $V_{eff}(r) \sim 1/x^2$, $\Psi(r) \sim x^2$ and $\frac{dr}{dx} \sim 2 x$. Thus, it is mathematically correct to regard the offending term $V_{eff} \Psi
\frac{dr}{dx} \sim x \rightarrow 0$ 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 2004-02-20