answer to VladimirN: Numerical matrix methods.xmcd
I have only a hard copy of the article: American Journal of Physics, vol 81, no 5, May, 2013, pages 344 -349. It is available for viewing only on line for members of Amer. Phy. Soc. I have tried to follow the authors derivations quite faithfully in the MathCad file. They actually evaluate 800x800 matrices. Mathcad chokes on matrices this big!
I really don't see an error in the mathcad program. I tried different methods of evaluating the integrals needed to obtain hnm, the elements of the approximating Hamiltonian matrix. Is it possible that mathcad is not properly evaluating the Cosine integrals?
The other point is that the authors are not exactly clear on how they obtain energy estimates. Even though they set nmax to 200 - 800 ( big matrices) they may estimate energy as the sum of only the first few contibutions of (sum) cn * hnm. It is clear that the higher energies of the infinite well are orders of magnitude greater than the Coulomb potential energies.