Teukolsky
MathematicaSolutions to the Teukolsky equation for perturbations of Kerr
PacletInstall["Teukolsky"]
Radial equations
Solutions to the Regge-Wheeler equation for Schwarzschild perturbations
PacletInstall["ReggeWheeler"]
The ReggeWheeler package for Mathematica computes solutions to the Regge–Wheeler equation, which governs perturbations of the Schwarzschild spacetime:
\[f^2 \frac{d^2\Psi}{dr^2} + f f' \frac{d\Psi}{dr} + [\omega^2 - U_\ell(r)]\Psi = \mathcal{T} \nonumber\]where the potential is given by
\[U_\ell(r) = \frac{f}{r^2}\left( \ell(\ell+1) -\frac{6M}{r} \right) \nonumber\]and $f = 1-2M/r$, a prime denotes differentiation with respect to $r$, $M$ is the black hole mass, $\omega$ is the mode frequency, $\Psi$ is the Regge–Wheeler master variable and $\mathcal{T}$ is the source.
The package provides:
HeunC function;The package depends on the SpinWeightedSpheroidalHarmonics and KerrGeodesics packages. For perturbations of Kerr spacetime see the Teukolsky package.
ReggeWheeler is distributed as a paclet. Once the BHPToolkit paclet server is set up (see Get started), install it together with its dependencies:
PacletSiteRegister["https://pacletserver.bhptoolkit.org", "Black Hole Perturbation Toolkit Paclet Server"]
PacletSiteUpdate["https://pacletserver.bhptoolkit.org"]
PacletInstall["SpinWeightedSpheroidalHarmonics"]
PacletInstall["KerrGeodesics"]
PacletInstall["ReggeWheeler"]
<< ReggeWheeler`
The source is implemented for a point particle moving on a circular geodesic orbit. For example, the
$\ell=2$, $m=2$ mode for a particle at orbital radius $r_0 = 10M$ is computed with
ReggeWheelerPointParticleMode[s, l, m, n, orbit]:
r0 = 10`30;
orbit = KerrGeoOrbit[0, r0, 0, 1];
s = 2; l = 2; m = 2; n = 0;
mode = ReggeWheelerPointParticleMode[s, l, m, n, orbit];
mode is a ReggeWheelerMode object which can be queried for results. The energy and angular momentum
fluxes at infinity ($\mathcal{I}$) and the horizon ($\mathcal{H}$) are given by mode["Fluxes"]:
mode["Fluxes"]
(* <|"Energy" -> <|"I" -> 0.000026843977395510576377, "H" -> 5.6541387345369358451*10^-9|>,
"AngularMomentum" -> <|"I" -> 0.00084888110027888050954, "H" -> 1.78799566077188627708*10^-7|>|> *)
Note the high precision of the input value of $r_0$. This is required by default, as the package uses the MST
method to calculate the homogeneous solutions. You can also extract "EnergyFlux",
"AngularMomentumFlux", "s", "l", "m", "ω", "Eigenvalue", "RadialFunctions",
"AngularFunction", "Amplitudes" and "Method" from a ReggeWheelerMode.
For even-parity modes ($\ell + m$ even) the radial functions are computed from the Zerilli equation, and for odd-parity modes from the Regge–Wheeler equation.
The homogeneous radial solutions alone are computed with ReggeWheelerRadial[s, l, ω], which returns an
association of ReggeWheelerRadialFunctions (or a single one if only one boundary condition is requested).
A ReggeWheelerRadialFunction can be evaluated at a radius r, and queried for properties such as
"Amplitudes" (incidence, transmission and reflection) and "Eigenvalue".
The following options are available:
"BoundaryConditions" — {"In", "Up"} (default), "In" or "Up"."Potential" — "ReggeWheeler" (default) or "Zerilli" (only for $\lvert s\rvert = 2$).Method — "MST" (default), "NumericalIntegration" or "HeunC", described below.WorkingPrecision, PrecisionGoal, AccuracyGoal — by default set from the precision of $\omega$.The default method uses the semi-analytic Mano–Suzuki–Takasugi (MST) expansion. It works well for
high-precision results, but currently needs high-precision input (a warning is given for machine-precision
input), and is slower to evaluate than numerical integration. Use it explicitly by passing Method -> "MST".
By default both the “In” and “Up” solutions are computed; use, e.g., "BoundaryConditions" -> "Up" to compute
only one.
The numerical integration method is used via, e.g.,
RW = ReggeWheelerRadial[2, 2, 0.1, Method -> {"NumericalIntegration", "Domain" -> {10, 10^4}}, "BoundaryConditions" -> "Up"]
for the “Up” solution. Note that you have to set the integration "Domain". The resulting
ReggeWheelerRadialFunction can be evaluated rapidly, though this method is not as effective for results
beyond machine precision.
With Mathematica 12.1 or newer, Method -> "HeunC" computes the solutions using Mathematica’s built-in
confluent Heun function.
For circular equatorial orbits, ReggeWheelerPointParticleMode can alternatively solve the
Regge–Wheeler–Zerilli equations with a hyperboloidal compactification and a spectral method
(arXiv:2202.01794, arXiv:2411.14976):
orbit = KerrGeoOrbit[0, 10`30, 0, 1];
mode = ReggeWheelerPointParticleMode[2, 2, 2, 0, orbit, Method -> "Hyperboloidal"];
mode["Fluxes"]
This method currently supports $s=2$ and $n=0$ only. The number of grid points can be set with
Method -> {"Hyperboloidal", "GridPoints" -> N}. The hyperboloidal method was added after the 0.3.0 release,
so it currently requires the development version of the package from the
GitHub repository.
Plot the real and imaginary parts of the numerically integrated “Up” solution computed above:
Plot[RW[r] // ReIm // Evaluate, {r, 10, 200}, PlotTheme -> "Detailed", PlotLegends -> None, BaseStyle -> 20]

Further examples using the Toolkit’s Mathematica packages can be found in the Mathematica Toolkit Examples repository.
David Q. Aruquipa, Marc Casals, William Doherty, Leanne Durkan, Josh Mathews, Adrian Ottewill, Jonathan Thompson, Niels Warburton, Barry Wardell
If you use ReggeWheeler in your research, please acknowledge the Toolkit:
This work makes use of the Black Hole Perturbation Toolkit.
ReggeWheeler also requests the following citations:
@software{BHPToolkit:ReggeWheeler,
author = {Wardell, Barry and Warburton, Niels and Thompson, Jonathan},
title = {ReggeWheeler},
month = sep,
year = 2020,
publisher = {Zenodo},
version = {0.3.0},
doi = {10.5281/zenodo.17417009},
url = {https://doi.org/10.5281/zenodo.17417009},
}
@article{PanossoMacedo:2022fdi,
author = "Panosso Macedo, Rodrigo and Leather, Benjamin and Warburton, Niels and Wardell, Barry and Zengino{\u{g}}lu, An{\i}l",
title = "{Hyperboloidal method for frequency-domain self-force calculations}",
eprint = "2202.01794",
archivePrefix = "arXiv",
primaryClass = "gr-qc",
doi = "10.1103/PhysRevD.105.104033",
journal = "Phys. Rev. D",
volume = "105",
number = "10",
pages = "104033",
year = "2022"
}
@article{Leather:2024mls,
author = "Leather, Benjamin",
title = "{Gravitational self-force with hyperboloidal slicing and spectral methods}",
eprint = "2411.14976",
archivePrefix = "arXiv",
primaryClass = "gr-qc",
doi = "10.1007/s10714-025-03443-9",
journal = "Gen. Rel. Grav.",
volume = "57",
number = "7",
pages = "112",
year = "2025"
}
@misc{BHPToolkit,
title = {{Black Hole Perturbation Toolkit}},
howpublished = {(\href{http://bhptoolkit.org/}{bhptoolkit.org})},
}
See how to cite for further guidance.