We begin by reading in the necessary libraries and defining the
associated Legendre functions.
> with(share): readshare(orbitals,science): with(orbitals):
See ?share and ?share,contents for information about the share library
> P := (l,m,theta) -> simplify(ComplexSurfaceHarmonic(l,m,theta,phi)/exp(I*m*phi));
Next, plot the function for and m=0:
> plot([abs(P(3,0,theta)),theta,theta=0..2*Pi], coords=polar,scaling=constrained);
For and |m|=1,
> plot([abs(P(3,1,theta)),theta,theta=0..2*Pi], coords=polar,scaling=constrained);
For and |m|=2,
> plot([abs(P(3,2,theta)),theta,theta=0..2*Pi], coords=polar,scaling=constrained);}{%
Finally, for and |m|=3,
> plot([abs(P(3,3,theta)),theta,theta=0..2*Pi], coords=polar,scaling=constrained);