Efficient method for solving highly oscillatory ordinary differential equations with applications to physical systems
Abstract
We present a numerical routine (uc(oscode)) with a C ++ and Python interface for the efficient solution of one-dimensional, second-order, ordinary differential equations with rapidly oscillating solutions. The method is based on a Runge-Kutta-like stepping procedure that makes use of the Wentzel-Kramers-Brillouin approximation to skip regions of integration where the characteristic frequency varies slowly. In regions where this is not the case, the method is able to switch to a made-to-measure Runge-Kutta integrator that minimizes the total number of function evaluations. We demonstrate the effectiveness of the method with example solutions of the Airy equation and an equation exhibiting a burst of oscillations, discussing the error properties of the method in detail. We then show the method applied to physical systems. First, the one-dimensional, time-independent Schrödinger equation is solved as part of a shooting method to search for the energy eigenvalues for a potential with quartic anharmonicity. Then, the method is used to solve the Mukhanov-Sasaki equation describing the evolution of cosmological perturbations, and the primordial power spectrum of the perturbations is computed in different cosmological scenarios. We compare the performance of our solver in calculating a primordial power spectrum of scalar perturbations to that of uc(bingo), an efficient code specifically designed for such applications, and find that our method performs better.
- Publication:
-
Physical Review Research
- Pub Date:
- January 2020
- DOI:
- 10.1103/PhysRevResearch.2.013030
- arXiv:
- arXiv:1906.01421
- Bibcode:
- 2020PhRvR...2a3030A
- Keywords:
-
- Physics - Computational Physics;
- Astrophysics - Cosmology and Nongalactic Astrophysics;
- Astrophysics - Instrumentation and Methods for Astrophysics;
- Mathematics - Numerical Analysis
- E-Print:
- Physical Review Research, accepted. 23 pages, 15 figures. The associated code is available online at https://github.com/fruzsinaagocs/oscode