Legendre Expansions & Spherical Harmonics
William O. Bray
Basic Plots
The following commands give plots similar to Figures 8.2 and 8.3 in the text.
As functions on the sphere, we can look at the plots with the following commands.
An Expansion Example (Mathematica version of Example 8.1 in text)
Notice that the Legendre coefficient corresponding to l=0 is zero.
Spherical Harmonics
The code below generates Figure 8.6 in the text. By varying the parameters other spherical harmonics can be plotted on the sphere.