# Numerov method for solving Schrödinger equation

I have just begun learning computer science to apply it to Physics and I am trying to write a code for solving Schrödinger's equation of the harmonic oscillator (setting $$V=\frac{x^2}{2}$$) in one dimension.

I know the basics of how to do this, but I would like to know whether some resources are available, or if someone could help me how to write my program (I feel more confident with Python, but C, C++, or any other language works fine too).

I know I should:

1. Choose a value for the maximum angular momentum $$\ell$$ and the quantum number $$n$$.
2. Seek an energy interval $$E_i, E_{i-1}$$ where I can look more accurately for the solution.
3. Find the best approximate value of energy through an algorithm (ex: secant formula).
4. Compare the interval in energies with a certain accuracy $$\epsilon$$ established at the beginning.

• Something wrong here, in 1D there is no angular momentum. Feb 28 at 19:55
• Thank you @MaximUmansky, sorry I was wrong! Mar 1 at 20:08
• What you are trying to do with the enumeration mentioned in the OP seems to me like a form of shooting method, that you try to solve with Numerov's method, which is a special kind of multistep method. If it's just about solving the harmonic oscillator, just discretize your system and use an eigenvalue solver. It's easier and more accurate. Mar 1 at 21:58
• Usually steps and wells are the first thing to solve. I’ve found tridiagonal matrix method worked very well for this. Mar 2 at 14:07