Spherical Harmonics

SetOptions[PolarPlot,PlotStyle->{{Black,AbsoluteThickness[2]}},PlotRange->All,Axes->None];

In this worksheet, you will examine the graphs of the spherical harmonics (Subscript[Y, l,m])(θ,ϕ).  Since the spherical harmonics are complex functions of the angular coordinates, it is not possible to plot  (Subscript[Y, l,m])(θ,ϕ).  Instead, we will plot |(Subscript[Y, l,m])(θ,ϕ)((|)^2) as a function of the angular coordinates.  The square of the norm gives the probability density in quantum mechanics.  NOTE: By looking only at the square of the norm in this worksheet, we are throwing away information about the phase.  We will explore the physical importance of the phase in a subsequent worksheet.

Define function by choosing l and m.

Y[θ_,ϕ_]:=SphericalHarmonicY[2,2,θ,ϕ];
maxx=Max[Table[ComplexExpand[Conjugate[Y[θ,ϕ]]*Y[θ,ϕ]],{θ,0,π,π/20},{ϕ,0,2π,π/10}]];
Y[θ,ϕ]

Plot the real and imaginary parts of the spherical harmonic.

YReal=ParametricPlot3D[{ϕ,θ,Re[Y[θ,ϕ]]},{θ,0,π},{ϕ,0,2*π},PlotPoints -> 50,ColorFunction->Function[{x,y,z,θ,ϕ},Hue[0.67*(1-((Abs[Y[θ,ϕ]])^2)/maxx)]],ColorFunctionScaling->False,Boxed->True,Mesh->False,ImageSize->216,Ticks->{{0,π/2,π,3π/2,2π},{0,π/2,π},None},AxesLabel->{ϕ,θ,None},ViewPoint->{3π/4,-π,2}];
YIm=ParametricPlot3D[{ϕ,θ,Im[Y[θ,ϕ]]},{θ,0,π},{ϕ,0,2*π},PlotPoints -> 50,ColorFunction->Function[{x,y,z,θ,ϕ},Hue[0.67*(1-((Abs[Y[θ,ϕ]])^2)/maxx)]],ColorFunctionScaling->False,Boxed->True,Mesh->False,ImageSize->216,Ticks->{{0,π/2,π,3π/2,2π},{0,π/2,π},None},AxesLabel->{ϕ,θ,None},ViewPoint->{3π/4,-π,2}];
Grid[{{YReal,YIm}},Spacings->2]

Plot the probability density.  Red is max, blue is min (0).

Yrect=ParametricPlot3D[{ϕ,θ,Abs[2.5Y[θ,ϕ]]^2},{θ,0,π},{ϕ,0,2*π},PlotPoints -> 50,ColorFunction->Function[{x,y,z,θ,ϕ},Hue[0.67*(1-((Abs[Y[θ,ϕ]])^2)/maxx)]],ColorFunctionScaling->False,Boxed->True,Mesh->False,ImageSize->216,Ticks->{{0,π/2,π,3π/2,2π},{0,π/2,π},None},AxesLabel->{ϕ,θ,None},ViewPoint->{3π/4,-π,2}]

Probability density in color on flat projection.  Red is max, blue is min (0).

Yflat=ParametricPlot[{ϕ,θ},{ϕ,0,2*π},{θ,0,π},Mesh->False,Axes->True,AxesOrigin->{0,0},AxesLabel->{ϕ,θ},Ticks->{{{0,0,{0,0.02}},{π/2,π/2,{0,0.02}},{π,π,{0,0.02}},{3*π/2,3*π/2,{0,0.02}},{2*π,2*π,{0,0.02}}},{{0,π,{0,0.02}},{π/2,π/2,{0,0.02}},{π,0,{0,0.02}}}},Frame->False,ColorFunction->Function[{x,y,ϕ,θ},Hue[0.67*(1-((Abs[Y[θ,ϕ]])^2)/maxx)]],ColorFunctionScaling->False,BoundaryStyle->None,ImageSize->216]

Probability density in color on sphere.  Red is max, blue is min (0).

Ysph=ParametricPlot3D[{Cos[ϕ] Sin[θ],Sin[ϕ] Sin[θ],Cos[θ]},{θ,0,π},{ϕ,0,2*π},PlotPoints -> 50,ColorFunction->Function[{x,y,z,θ,ϕ},Hue[0.67*(1-((Abs[Y[θ,ϕ]])^2)/maxx)]],ColorFunctionScaling->False,ViewPoint->{2.6, 0, 1.6},Axes->False,Boxed->False,Mesh->False,ImageSize->150]

Collage.  Red is max, blue is min (0).

Grid[{{Yrect,Yflat,Ysph}},Spacings->0]

Some of these plots look like electron orbitals, BUT THESE  ARE NOT THE ELECTRON ORBITALS.  Not until we have included the radial dependence in the wave function will you truly be able to see the probability distribution as a function of all three spatial coordinates.  You should think of the spherical harmonics as functions on the sphere.

Below is a 3D polar plot, which can be confusing.  View at your own peril!

Ymesh=SphericalPlot3D[((Abs[N[Y[θ,ϕ]]])^2),{θ,0,π},{ϕ,0,2*π},PlotRange->All,ViewPoint->{2.6, 0, 1.4},Axes->False,Boxed->False,Mesh->{30,10},ImageSize->150]