Phase Function Methods for Second Order Inhomogeneous Linear Ordinary Differential Equations - Serkh, Kirill; Bremer, James (Journal of scientific computing, 2024)
It has long been known that second order linear homogeneous ordinary differential equations with nonoscillatory coefficients admit nonoscillatory phase functions. This observation is the basis of many techniques for the asymptotic approximation of the solutions of such equations, as well as several schemes for their numerical solution. However, it was only relatively recently exploited to develop the first high-accuracy numerical solver for second order linear homogeneous ordinary differential equations which runs in time independent of frequency. Here, we introduce the first high-accuracy, frequency-independent method for the numerical solution of second order linear inhomogeneous ordinary differential equations. Our algorithm operates by constructing a nonoscillatory phase function representing the solutions of the corresponding homogeneous equation. Then, it uses an adaptive Levin scheme to construct a collection of auxiliary nonoscillatory functions that efficiently represent a highly oscillatory indefinite integral giving a particular solution of the inhomogeneous differential equation. Once the phase function and these auxiliary functions have been constructed, the inhomogeneous equation can be solved subject to essentially any reasonable boundary conditions. The results of numerical experiments illustrating the properties of our scheme are discussed.