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?

  • $\begingroup$ 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)$. $\endgroup$
    – cfdlab
    Dec 5, 2019 at 16:19
  • $\begingroup$ 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. $\endgroup$
    – pmu2022
    Dec 5, 2019 at 16:41

1 Answer 1


I think DifferentialEquations.jl in Julia has a very comprehensive suite of ODE solvers, including the ones you mentioned (Adams-Bashfort and GBS) and many others. This Julia library is becoming more and more popular nowadays, is well documented, and has quite the coverage here.

Note: Chris Rackauckas is a core contributor to this project and is pretty active on Computational Science SE, and he should be able to answer really in-depth questions if those arise.

  • 1
    $\begingroup$ 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. $\endgroup$ Dec 5, 2019 at 16:40
  • $\begingroup$ Interpolation can be quite tricky. I have only tried cubic splines so far. But this didn't give the best results. $\endgroup$
    – pmu2022
    Dec 5, 2019 at 16:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.