Multipole Expansion
For axially symmetric mass distributions, the density can be written as
that is, it does not depend on the azimuthal angle \(\phi\). For this case Eq. (2.94) of (Binney & Tremaine, 2008)1 reduces to
which can numerically pre-computed for a given mass model. In the example below I use the Satoh model
The potential can be computed using the multipole expansion as
In code this looks like this
>>> from galactic_dynamics_bt.chapter02.multipole_expansion import SatohModel, SatohModelParams
>>> model = SatohModel(SatohModelParams(q=0.6))
>>> expansion = MultipoleExpansion(model, 6)
This will create a multipole expansion up to \(l_\mathrm{max} = 6\) for the Satoh model with flattening parameter \(q = b/a = 0.6\). You can then evaluate the potential at any point \((R, z)\) using

Figure: Multipole Expansion of Satoh Model, \(b/a=0.6\). I included a flatter potential than the one in (Binney & Tremaine, 2008)1 to better illustrate the convergence of the expansion with \(l_\mathrm{max}\). The solid black line shows the exact potential, other lines show the multipole expansion with different \(l_\mathrm{max}\) values. \(l_\mathrm{max} = 10\) is practically indistinguishable from the exact potential.