This site is version 0.0.1. Most of the code on this site is drafted by an agent and needs review. I apologize for the AI-speak, we are working on rewriting it!
viv-lang.org

Notebooks · posts/make-numerov-find-the-decaying-solution

Make Numerov find the decaying solution

Numerov's method integrates outward from , , aiming at the decaying solution . By it is off by a factor of 30, and by by . Rewrite decaying so that it follows to Numerov's own accuracy, within , on both intervals.

Numerov's method is the standard way to integrate , which is the form of the radial Schrödinger equation. For on a grid of spacing it is the three-term recurrence

accurate to fourth order in . The equation has two solutions, and , and the recurrence carries both. The two starting values are never exactly on the decaying one (they differ from the recurrence's own decaying solution by its truncation error), so a little of is always mixed in. Going outward, that part grows by relative to the part you want. In the region where a bound state's wavefunction decays, every outward integration has this problem.

The function must return at , normalized to . The tests compare it with at every point. Their tolerances come from posts/refs/make-numerov-find-the-decaying-solution.py, which runs the working method in numpy: its largest relative error is for on , for , and for on . The tests allow about 1.5 times those. Halving divides the error by 15.9, the factor 16 of a fourth-order method.

Look inside this program

  • Atlas

    The program’s map: every function and which calls which.

  • There’s no recorded run of this program yet.

This is a problem: its tests fail until the functions in it are written. Edit a cell and run it to try; the cells below it show whether the tests pass.

Shift+Enter in a cell runs it and moves to the next. Running a cell runs every cell above it too, as one program.

[1]lines 36–88