# Recommendation for a fixed-step ODE solver?

My problem involves the solution of a second-order ODE with a fixed-step (input and output). Specifically, this ODE is the radial part of Dirac and Schrödinger equation for a spherical symmetric potential.

This is for example the ODE of the radial part Schrödinger equation:

$$\left(\frac{d^2}{dr^2} +2r\frac{d}{dr} -\frac{l(l+1)}{r^2} \right) R(r)+V(r)P(r)=E\,R(r)$$

or by substituing R(r) = P(r)*r:

$$\left(\frac{d^2}{dr^2}-\frac{l(l+1)}{r^2} \right) P(r)+V(r)P(r)=E\,P(r)$$

$$V(r)$$ is defined on a fixed grid, that why I need a fixed-step solver. $$E$$, $$l$$ are numerical predefined values. $$r$$ can have values in the interval from $$[0,\infty]$$, but usually it is only interesting up to an certain $$r_{max}$$. The initial condition are $$P(0) = 0$$ and $$P'(0) = 0$$.

Commonly used solvers are multistep methods like Adams–Bashfort or also extrapolation methods like the GBS method. I already have some implementation exactly using these aforementioned methods, which were specifically created to deal with this certain problem.

For comparison, I am searching for a software package or library, which has some evolved fixed-step solver implemented.

Are there libraries that contain general-purpose fixed-step ODE solvers?

• Could you specify the range of $r$ ? Any boundary/initial conditions ? Even if $V(r)$ is known only at some points, you can construct an interpolant of this function and evaluate it anywhere you want. You do not have to use the same step size as the data of $V(r)$. Dec 5 '19 at 16:19
• I tried this approach too. Interpolating the potential piecewise and then solve it. Actually one of my solvers is doing the same thing too. But the question arises, if this makes it actually better. Dec 5 '19 at 16:41

• Yes, if you do solve(prob,alg,adaptive=false,dt=x) it'll turn any native Julia method into one that's doing fixed time stepping. So all of the methods mentioned here are all available with fixed time stepping via the OrdinaryDiffEq.jl module of DifferentialEquations.jl. Whether it's a good idea is a different story, but you can do it! I'd like to see if in your specific case if it does better than interpolating. Dec 5 '19 at 16:40