# galpy.potential.scf_compute_coeffs_spherical¶

Note: This function computes Acos and Asin as defined in Hernquist & Ostriker (1992), except that we multiply Acos by 2 such that the density from Galpy’s Hernquist Potential corresponds to $$Acos = \delta_{0n}\delta_{0l}\delta_{0m}$$.

Further note that this function is a specification of scf_compute_coeffs_axi where $$Acos_{nlm} = 0$$ at $$l\neq0$$

For a given $$\rho(r)$$ we can compute $$Acos$$ and $$Asin$$ through the following equation

$Acos_{nlm}= \frac{16 \pi a^3}{I_{nl}} \int_{\xi=0}^{\infty} (1 + \xi)^{2} (1 - \xi)^{-4} \rho(r) \Phi_{nlm}(\xi) d\xi \qquad Asin_{nlm}=None$

Where

$\Phi_{nlm}(\xi, \cos(\theta)) = -\frac{1}{2 a} (1 - \xi) C_{n}^{3/2}(\xi) \delta_{l0} \delta_{m0}$
$I_{n0} = - K_{n0} \frac{1}{4 a} \frac{(n + 2) (n + 1)}{(n + 3/2)} \qquad K_{nl} = \frac{1}{2}n(n + 3) + 1$

$$C_{n}^{\alpha}$$ is the Gegenbauer polynomial.

Also note $$\xi = \frac{r - a}{r + a}$$, and $$n$$, $$l$$ and $$m$$ are integers bounded by $$0 <= n < N$$ , $$l = m = 0$$

NAME:

scf_compute_coeffs_spherical

PURPOSE:

Numerically compute the expansion coefficients for a given spherical density

INPUT:

dens - A density function that takes a parameter R

N - size of expansion coefficients

a= (1.) parameter used to scale the radius