# Function composition and multipole expansion

Assume that I have some function $$g(r,\theta,\phi)$$ which I have expanded in a multipole series: $$g(r,\theta,\phi) = \sum_{\ell=0}^\infty \sum_{m=-\ell}^{+\ell} g_{\ell m}(r)\, Y_{\ell m}(\theta,\phi).$$ If I have scalar function $$f(x)$$, is there a concise way of calculating the multipole expansion of their composition $$f\circ g$$? That is, can I calculate $$f\bigl(g(r,\theta,\phi)\bigr) = \sum_{\ell=0}^\infty \sum_{m=-\ell}^{+\ell} [f\circ g]_{\ell m}(r)\, Y_{\ell m}(\theta,\phi)$$ in terms of $$f(x)$$ and $$g_{\ell m}(r)$$?

For a simple case like $$g(r,\theta,\phi) = r + r \beta Y_{20}(\theta, \phi)$$, I could think of doing something like expanding in powers of $$\beta$$: $$f\bigl(g(r,\theta,\phi)\bigr) = \sum_{k=0}^\infty \frac{f^{(k)}(r)}{k!} r^k \beta^k \bigl[Y_{20}(\theta,\phi)\bigr]^k.$$ In this case, one would need to use the Clebsch-Gordan coefficients to rewrite $$\bigl[ Y_{20}(\theta,\phi) \bigr]^k$$ in terms of $$Y_{\ell 0}(\theta,\phi)$$. Likewise, if the function $$g(r,\theta,\phi)$$ is basically just a scaling of $$r$$ (as one would have for the parameterization of a surface) such that $$g(r,\theta,\phi) = r\, g(\theta,\phi)$$, then I could expand around $$r=0$$ $$f\bigl(r\,g(\theta,\phi)\bigr) = \sum_{k=0}^\infty \frac{f^{(k)}(0)}{k!} r^k\left[\sum_{\ell=0}^\infty \sum_{m=-\ell}^{+\ell} g_{\ell m} Y_{\ell m}(\theta,\phi) \right]^k,$$ where now the $$g_{\ell m}$$ coefficients are independent of $$r$$. In this case I would need to expand arbitrary products of spherical harmonics in terms of spherical harmonics again.

Is there any more elegant or general way?