Spherical harmonics usually arise in the solution of Laplace's equation in spherical coordinates where azimuthal symmetry is not present. They satisfy the spherical harmonic equation, which is simply the angular part of Laplace's equation in spherical coordinates. These functions are given by:
Yml(θ, φ) = sqrt(((2l+1)(l-m)!)/(4π(l+m)!))Pml(cos θ) exp(imφ)
where Pml(z) is an associated Legendre polynomial.