0% found this document useful (0 votes)
37 views6 pages

Spherical Harmonics in Mathematica

The document discusses spherical harmonics and their properties. It provides the mathematical definitions of spherical harmonics and shows how they can be plotted and visualized as functions of the angular coordinates θ and φ. It also explains how spherical harmonics relate to the angular part of the hydrogen atomic orbitals in quantum mechanics.

Uploaded by

Bat
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views6 pages

Spherical Harmonics in Mathematica

The document discusses spherical harmonics and their properties. It provides the mathematical definitions of spherical harmonics and shows how they can be plotted and visualized as functions of the angular coordinates θ and φ. It also explains how spherical harmonics relate to the angular part of the hydrogen atomic orbitals in quantum mechanics.

Uploaded by

Bat
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Mathematica for spherical harmonics

Spherical harmonics are built in functions.


Arguments are l, m, θ𝜃, ϕ𝜑
Here, for example, are the l=4 harmonics for m=0-4
Table[SphericalHarmonicY[4, m, θ, ϕ], {m, 0, 4}] /∕/∕ TableForm
3 (3-−30 Cos[θ]2 +35 Cos[θ]4 )
16 π

-− 38 ⅇⅈ ϕ 5
π
Cos[θ] -− 3 + 7 Cos[θ]2  Sin[θ]

3 5
8
ⅇ2 ⅈ ϕ 2π
-− 1 + 7 Cos[θ]2  Sin[θ]2

-− 38 ⅇ3 ⅈ ϕ 35
π
Cos[θ] Sin[θ]3

3 35
16
ⅇ4 ⅈ ϕ 2π
Sin[θ]4

Spherical plot visualizes their shape in angular space.


The distance of the surface from the origin at a given θ𝜃, ϕ𝜑 is the function being plotted.
The absolute value removes the ϕ𝜑 dependence, so one only sees the θ𝜃 dependence.
Table[SphericalPlot3D[
{Abs[SphericalHarmonicY[4, m, θ, ϕ]]}, {θ, 0, Pi}, {ϕ, 0, 2 Pi}], {m, 0, 4}]

 , , ,

, 

To see the ϕ𝜑 dependence one can take either the real or imaginary part.
Here they are:
2 RevisedSpherical_Harmonics.nb

To see the ϕ𝜑 dependence one can take either the real or imaginary part.
Here they are:
Table[SphericalPlot3D[Re[SphericalHarmonicY[4, m, θ, ϕ]],
{θ, 0, Pi}, {ϕ, 0, 2 Pi}, PlotRange → All], {m, 0, 4}]

 , , ,

, 
RevisedSpherical_Harmonics.nb 3

Table[SphericalPlot3D[Im[SphericalHarmonicY[4, m, θ, ϕ]],
{θ, 0, Pi}, {ϕ, 0, 2 Pi}, PlotRange → All], {m, 0, 4}]

 , ,

, , 

The m=0 spherical harmonic is purely real


FunctionExpand[SphericalHarmonicY[4, 0, θ, ϕ]]
3 3 -− 30 Cos[θ]2 + 35 Cos[θ]4 

16 π

The spherical harmonics can be written in terms of the associated Legendre polynomials as:
Ylm (θ𝜃, ϕ𝜑) = (2 l + 1)/∕(4 π𝜋) (l -− m)!/∕(l + m)! Plm (cos (θ𝜃)) eimϕ𝜑
So it follows that for m=0, it can be written in terms of the standard Legendre polynomials, which are real
FunctionExpand[SphericalHarmonicY[l, 0, θ, ϕ]]

1 + 2 l LegendreP[l, Cos[θ]]
2 π

As you will learn in quantum mechanics (or may have learned in chemistry) the orbitals are spherical
harmonics
The s orbital is l=0, p is l=1, d is l=2 and so on
4 RevisedSpherical_Harmonics.nb

TableStringForm["l=``", l], StringForm["m=±``", m], FullSimplify


Abs[SphericalHarmonicY[l, m, θ, ϕ]]2 , Assumptions → θ ∈ Reals && ϕ ∈ Reals,
SphericalPlot3DAbs[SphericalHarmonicY[l, m, θ, ϕ]]2 , {θ, 0, Pi},
{ϕ, 0, 2 Pi}, PlotRange → All, {l, 0, 3}, {m, 0, l} /∕/∕ TableForm
l=0
m=±0
1

l=1
m=±0
3 Cos[θ]2

l=1
m=±1
3 Sin[θ]2

l=2
m=±0 l=2
5 (1+3 Cos[2 θ])2 m=±1
64 π 15 Sin[2 θ]2
32 π
l=2
m=±2
15 Sin[θ]4
32 π

l=3 l=3
m=±0 m=±1
7 (3 Cos[θ]+5 Cos[3 θ])2 21 (Sin[θ]+5 Sin[3 θ])2
256 π 1024 π l=3
m=±2
105 Cos[θ]2 Sin[θ]4
32 π l=3
RevisedSpherical_Harmonics.nb 5

32 π
m=±3 6
35 Sin
64

Note that this is only the angular part of the hydrogen wave function, the radial part is based on the
associated Laguerre polynomials.
We won’t discuss the Laguerre polynomials as they aren’t as widespread as the spherical harmoninics.
All we’ll say for now is that the radial part of the hydrogen Schrodinger equation takes the form of the
associated Laugerre differential equation, for which the associated Laugerre polynomials are the solu-

tion. In Mathematica the associated Laguerre polynomials can be called as LaguerreL[λ𝜆, ⋁ , x] ( = Lλ𝜆 [x])
The radial wave function (including the overall normalization) looks like,
R[r_, n_, l_] :=

2 3 (n -− l -− 1) ! r l r
2 Exp[-− r /∕ n] LaguerreLn -− l -− 1, 2 l + 1, 2  /∕. n → 2 /∕. l → 0
n 2 n *⋆ (n + l) ! n n

Note: Here I have set the Bohr radius (a combination of physical constants with units of length) to 1.
6 RevisedSpherical_Harmonics.nb

TableStringForm["n=``", n], StringForm[ "l=``", l],


FullSimplifyAbs[R[r, n, l]]2 , Assumptions → r ∈ Reals,
PlotAbs[R[r, n, l]]2 , {r, 0, 40}, AxesLabel → "r", "|R(r) 2
", PlotRange → All,
{n, 1, 4}, {l, 0, n -− 1} /∕/∕ TableForm
n=1
l=0
4 ⅇ-−2 r
2
|R(r)
4

r
10 20 30 40
n=2 n=2
l=0 l=1
1 -−r
8
ⅇ (-− 2 + r)2 1
ⅇ-−r r2
24
2
|R(r) |R(r) 2

0.5
0.020
0.4
0.015
0.3
0.2 0.010

0.1 0.005

r r
10 20 30 40 10 20 30 40
n=3 n=3 n=3
l=0 l=1 l=2
-−2 r/∕3
2 ⅇ (27+2 (-−9+r) r)2 -−2 r/∕3
8 ⅇ (-−6+r)2 r2 -−2 r/∕3
8 ⅇ
6561 19 683 98 415
2 2
|R(r) |R(r) |R(r) 2

0.15 0.007 0.0020


0.006
0.0015
0.10 0.005
0.004 0.0010
0.003
0.05 0.002 0.0005
0.001
r r r
10 20 30 40 10 20 30 40 10 20 30 40
n=4 n=4 n=4 n=4
l=0 l=1 l=2 l=3-−
-−r/∕2
ⅇ (-−192+(-−12+r)2 r)2 -−r/∕2
ⅇ r2 (80+(-−20+r) r)2 -−r/∕2
ⅇ (-−12+r)2 ⅇ
589 824 983 040 2 949 120
2 20 643 840
|R(r) |R(r) 2
|R(r) 2 |R(r) 2
0.06 0.0030 0.00035
0.0008
0.05 0.0025 0.00030
0.0020 0.0006 0.00025
0.04
0.00020
0.03 0.0015 0.0004 0.00015
0.02 0.0010 0.00010
0.0002
0.01 0.0005 0.00005
r r r
10 20 30 40 10 20 30 40 10 20 30 40

Together with the spherical harmonics, the hydrogen atom wave function is,
l
ψ𝜓nlr (r, θ𝜃, ϕ𝜑) = Rnl (r) Y m (θ𝜃,ϕ𝜑)

(Sometimes the normalization is kept separate)

You might also like