Docsity

ASTR 5540: Computing Spherical Harmonics with Legendre Polynomials - Prof. Andrew J. S. Ha, Assignments of Astronomy

Toggle sidebar
bg1
ASTR 5540 Math Meth Fall 2008. Problem Set 7. Due Mon Oct 13
1. Numerical computation of spherical harmonics
For positive m, the orthonormal spherical harmonics Ylm(θ, φ) are given explicitly in terms
of associated Legendre polynomials Pm
l(x) by
Ylm(θ, φ) = r2l+ 1
4πs(l−m)!
(l+m)!Pm
l(cos θ)eimφ (m= 0, ..., l).(1.1)
For negative m,
Yl,−m(θ, φ) = (−)mY∗
lm(θ, φ).(1.2)
Usually, the fastest and most accurate way to compute the associated Legendre polynomials
Pm
l(x) is to use recurrence relations. This is especially true if you want not just one spherical
harmonic but a full set of them, complete up to some maximum harmonic number lmax.
The associated Legendre polynomials satisfy many recurrence relations, but the numerically
useful one proves to be
(l−m+ 1)Pm
l+1(x) = (2l+ 1)xP m
l(x)−(l+m)Pm
l−1(x).(1.3)
If the recursion is applied in the direction of increasing l, then the starting point is
Pl
l(x) = (−)l(2l−1)!!(1 −x2)l/2(1.4)
and of course Pl
l−1(x) = 0.
(a) Stability
Investigate analytically the stability of the recurrence relation (1.3). Show that the stability
is neutral if |x|is not near 1, but that there are growing and decaying modes if |x|is near 1.
Given that the leading term in the series of expansion of Pm
l(x) near |x|= 1 is
Pm
l(x) = (−)m(l+m)!
(l−m)! 1−x2
4m/2
(1.5)
in which direction would you expect the recurrence to be stable, increasing or decreasing l?
(b) Code
In the language of your choice (mathematica, IDL, c, ...), write code that implements the
recurrence relation (1.3). The code should take as inputs lmax and x, and it should return a
set of Pm
l(x) complete up to harmonic number lmax.
(c) Plot and comment
Plot a selection of Pm
l(x) for suitably large l, say l≈100. Comment.
1

Partial preview of the text

Download ASTR 5540: Computing Spherical Harmonics with Legendre Polynomials - Prof. Andrew J. S. Ha and more Assignments Astronomy in PDF only on Docsity!

ASTR 5540 Math Meth Fall 2008. Problem Set 7. Due Mon Oct 13

  1. Numerical computation of spherical harmonics

For positive m, the orthonormal spherical harmonics Ylm(θ, φ) are given explicitly in terms of associated Legendre polynomials P (^) lm (x) by

Ylm(θ, φ) =

2 l + 1 4 π

(l − m)! (l + m)!

P (^) lm (cos θ)eimφ^ (m = 0, ..., l). (1.1)

For negative m, Yl,−m(θ, φ) = (−)mY (^) lm∗(θ, φ). (1.2)

Usually, the fastest and most accurate way to compute the associated Legendre polynomials P (^) lm (x) is to use recurrence relations. This is especially true if you want not just one spherical harmonic but a full set of them, complete up to some maximum harmonic number lmax. The associated Legendre polynomials satisfy many recurrence relations, but the numerically useful one proves to be

(l − m + 1)P (^) lm+1(x) = (2l + 1)xP (^) lm (x) − (l + m)P (^) lm− 1 (x). (1.3)

If the recursion is applied in the direction of increasing l, then the starting point is

P (^) ll (x) = (−)l(2l − 1)!!(1 − x^2 )l/^2 (1.4)

and of course P (^) ll− 1 (x) = 0.

(a) Stability

Investigate analytically the stability of the recurrence relation (1.3). Show that the stability is neutral if |x| is not near 1, but that there are growing and decaying modes if |x| is near 1. Given that the leading term in the series of expansion of P (^) lm (x) near |x| = 1 is

P (^) lm (x) = (−)m^

(l + m)! (l − m)!

1 − x^2 4

)m/ 2 (1.5)

in which direction would you expect the recurrence to be stable, increasing or decreasing l?

(b) Code

In the language of your choice (mathematica, IDL, c, ...), write code that implements the recurrence relation (1.3). The code should take as inputs lmax and x, and it should return a set of P (^) lm (x) complete up to harmonic number lmax.

(c) Plot and comment

Plot a selection of P (^) lm (x) for suitably large l, say l ≈ 100. Comment.