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

Problem set 7 from the astr 5540 math methods course for the fall semester of 2008. The problem set focuses on the numerical computation of spherical harmonics using associated legendre polynomials and their recurrence relation. Students are required to investigate the stability of the recurrence relation, write code to implement it, and plot a selection of the associated legendre polynomials for large harmonic numbers.

Typology: Assignments

Pre 2010

Uploaded on 02/13/2009

koofers-user-1bv
koofers-user-1bv 🇺🇸

10 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

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(lm)!
(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
(lm+ 1)Pm
l+1(x) = (2l+ 1)xP m
l(x)(l+m)Pm
l1(x).(1.3)
If the recursion is applied in the direction of increasing l, then the starting point is
Pl
l(x) = ()l(2l1)!!(1 x2)l/2(1.4)
and of course Pl
l1(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)!
(lm)! 1x2
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 l100. 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.