next up previous contents
Next: zriddrp480() Up: Schrödinger energy solver Previous: func_Schrodinger()

Debugging

To test your routines, run and compile them with the main program ``Edebug.c'' in Appendix B. This program takes as inputs E1 and E2 as initial lower and upper bounds on the energy for which you wish to solve, and then asks for different values of N, the number of integration intervals. Running the code with E1=-1 and E2=-0.3, you should be able to solve for the ground state and verify that it approaches the analytic result (E=-0.5) with the expected behavior for N=10,100,1000,10000. Similarly, you should be able to find all of the excited states, which have analytic solutions tex2html_wrap_inline471 , for tex2html_wrap_inline473 .



Tomas Arias
Mon Feb 18 16:02:23 EST 2002