Mathematica球面调和函数
Legendre多项式(the Legendre polynomial)
Legendre多项式$P_n (x)$ 满足下面的微分方程:
$ (1-x^2) \frac{d^2 y}{d x^2} - 2 x \frac{d y}{d x} + n (n+1) y=0 $
此时,
$ P_n (x) = \frac{1}{2^n n!} \frac{d^n }{d x^n} {(x-1)^n} = \sum _{k=0}^{[n/2]} \frac{(-1)^k (2 n-2 k)!} {2^n k! (n-k)! (n-2k)!} x^{n-2k} $
其中,[ ]为取整数部分。
在Mathematica中,调用的Legendre多项式为:LegendreP[n,x]。
Table[LegendreP[n, x], {n, 1, 8}] // TableForm
连带Legendre多项式(the associated Legendre polynomial)
$ P_{nm} (x) = (-1)^m (1-x^2)^{m/2} \frac{d^m }{d x^m} P_n (x)$
其中,$P_{nm} (x)$ 为连带Legendre多项式。
在Mathematica中,调用的连带Legendre多项式为:LegendreP[n,m,x]。
Table[LegendreP[n, m, x], {n, 2, 5}, {m, 2, n}] // TableForm
Plot[{LegendreP[1, x], LegendreP[2, x], LegendreP[3, x],
LegendreP[4, x], LegendreP[5, x], LegendreP[6, x],
LegendreP[7, x]}, {x, -1, 1}, PlotLegends -> "Expressions" ]
球面调和函数(Spherical Harmonic)
在Mathematica中,调用的球面调和函数SphericalHarmonicY为:
SphericalHarmonicY[n, m, Theta, Lambda]
SphericalPlot3D[
Re[10 + 4*SphericalHarmonicY[12, 3, theta, phi]], {theta, 0,
Pi}, {phi, 0, 2 Pi}, PlotPoints -> 50]