Spherical Harmonics Expansion of Analytic Function derivation Someone has led me to understand that the following spherical harmonic expansion of an analytic function is completely general, however I am having trouble seeing how one would derive it. As far as I understand the following formula is the general solution to Laplace's equation inside a ball centered at the origin – a linear combination of the spherical harmonics multiplied by the scale factor $r^{l}$. I have no trouble seeing how this is derived from Laplace's equation, but am struggling to see how one obtains this as a general expansion for an analytic function.
$$
f(r,\theta ,\varphi ) = \sum\limits_{\ell  = 0}^\infty  {\sum\limits_{m =  - \ell }^\ell  {f_\ell ^m r^\ell  Y_\ell ^m (\theta ,\varphi )} } .
$$
Might anyone illuminate how one obtains this expansion if one is not to obtain it from Laplace's equation?
 A: I didn't fully understand your question, but I guess the confusion starts with your (someone's ;) first statement: The formula you are referencing is not completely general, this can be seen as follows: The spherical harmonics $Y_l^m$ form a  basis on the sphere, whereas the polynomials $r^k$ form a basis in the 'radial part' of the space of functions $f(\mathbf r)$. Since this function space is the (tensor) product of radial functions 'times' angular functions, the basis in this space is the tensor product of the respective 'partial' basis functions (This holds for any tensor product of two vector spaces). Hence the complete basis functions read $r^k Y_l^m$ and a generic function is expanded as $f(\mathbf r)= \sum_{klm} f_{klm}r^k Y_l^m(\hat r)$.
If now $f(\mathbf r)$ is supposed to solve the Laplace equation, there is $\Delta f = (\Delta_r + \Delta_S/r^2)f = \sum_{klm} f_{klm}\Delta_r r^k Y_l^m(\hat r)+f_{klm}r^{k-2}\Delta_S Y_l^m(\hat r) = 0$
where the Laplace operator (in spherical coordinates) was split into a radial and angular part. Since $\Delta_r r^k = (k(k-1) + 2k)r^{k-2}$ and $\Delta_S Y_l^m = -l(l+1)Y_l^m$ were are left with $\Delta f  = \sum_{klm} f_{klm}((k(k-1) + 2k - l(l+1))r^{k-2}Y_l^m(\hat r)= 0 $. One can easily see that the parenthesis is zero for $k=l$, but not otherwise, hence the (generic) expansion coefficient $f_{klm}$ must vanish for $k\ne l$, such that we only need to take coefficients $f_{lm}$ into account and finally arrive at the formula you have given above. (Only valid for harmonic functions).
Also note that a analytic function $f$ is 'automatically' harmonic only if it is holomorphic, i.e. $f: \mathbf{C} \rightarrow \mathbf{C}$ interpreted as $f: \mathbf{R}^2 \rightarrow \mathbf{C}$, this equivalence does not hold for functions with more than two real variables (like here: $f: \mathbf{R}^3 \rightarrow \mathbf{C}$)
Side note: Outside the ball where the above series converges one uses $r^{-(k+1)}, k=0,1,2,..$ as radial functions, they do not form a basis but have the (physical) property that $f(\mathbf r) \rightarrow 0$ for $|\mathbf r|\rightarrow \infty$. A similar calculation as above shows that $k=l$ for harmonic functions.
The above is written from a physicist's perspective, mathematicians are welcome to comment/correct!
