# Calculating the normalization constant in spherical harmonics?

Anyone know a presentation of the calculation of the normalization constant in spherical harmonics. Specifically, how has

$$\sqrt{\frac{2l+1}{4 \pi} \frac{(l-m)!}{(l+m)!}}$$ been found in

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

I know (by this) that it's related to the integral:

$$\int_0^{2\pi} \int_0^{\pi} Y_l^m(\theta, \phi) \bar{Y}_{l'}^{m'}(\theta, \phi) sin\theta \space d\theta d\phi = \delta_{m m'} \delta_{l l'}$$

but would like to see the complete derivation.

The outline is something like this. Write the spherical harmonic as $$Y_k^m (\theta, \phi) := a P_k^m(\cos \theta) \exp(i m \phi),$$ where $a$ is an unknown normalisation constant. Now we require the normalisation to be $$I:= \int_0^{2 \pi} \int_{0}^{\pi} Y_k^m Y_l^{n*} \sin\theta d \theta d \phi = \delta_{kl} \delta_{mn}.$$ We can separate this integral over $\theta$ and $\phi$ because they are independent. First we'll evaluate the $\phi$ integral $$\int_0^{2 \pi} \exp(i m \phi) \exp(-i n \phi) d \phi = 2 \pi \delta_{mn}.$$
Now the $\theta$ integral is evaluated using well known orthogonality relationships for the Legendre polynomials $$\int_{0}^{\pi} P_k^m (\cos \theta) P_l^{m} (\cos \theta) \sin\theta d \theta = \frac{2(l+m)!}{(2l+1)(l-m)!}\delta_{kl},$$ note here that I've set $n = m$ because we can see from the previous integral that if $n \neq m$ $I$ will vanish. Combining these two results we find the following value for $I$: $$I = a^2 \frac{4 \pi(l+m)!}{(2l+1)(l-m)!}\delta_{kl} \delta_{mn},$$ the appropriate value for $a$ follows by ensuring that $I = \delta_{kl} \delta_{mn}$.