spherical_harmonic( l , m , θ , φ )

The spherical harmonic \( Y_l^m (\theta,\phi) \) in SageMath. A solution of the partial differential equation

\[ \frac{ 1 }{ \sin \theta } \frac{ \partial }{ \partial \theta } \left( \sin \theta \frac{ \partial f }{ \partial \theta } \right) + \frac{ 1 }{ \sin^2 \theta } \frac{ \partial^2 f }{ \partial \phi^2 } + l(l+1) f = 0 \]

Related to gen_legendre_P by

\[ Y_l^m (\theta,\phi) = (-1)^m \sqrt{ \frac{ 2l+1 }{ 4\pi } \frac{ (l-m)! }{ (l+m)! } } e^{ im\phi } P_l^m (\cos\theta) \]

Explicit form:

Absolute value of the real part:

Absolute value of the imaginary part:

Related functions:   gen_legendre_P   gaunt

Function category: orthogonal polynomials sagemath-docs