Spherical Harmonics: General Solutions for the Polar and Azimuthal Angles in the Spherical Coordinate Laplace's Equation
Definition
The general solution for the polar and azimuthal angles in the spherical coordinate system for the Laplace equation is as follows, and this is called Spherical harmonics.
$$ Y_{l}^{m}(\theta,\phi)=e^{im\phi}P_{l}^{m}(\cos \theta) $$
Here, $l$ is $l=0,1,2\cdots$ and $m$ is an integer that satisfies $ -l \le m \le l$. Also, $P_{l}^{m}(\cos\theta)$ is as follows.
$$ \begin{align*} P_{l}^{m}(\cos \theta)&= (1-\cos ^{2}\theta)^{\frac{|m|}{2}} \frac{ d^{|m|} }{ dx^{|m|} } P_{l}(x) \\ & =(1-\cos ^{2}\theta)^{\frac{|m|}{2}} \frac{ d^{|m|} }{ dx^{|m|} }\left[ \dfrac{1}{2^l l!} \dfrac{d^l}{dx^l}(x^2-1)^l \right] \end{align*} $$