# Legendre Polynomials¶

Legendre polynomials defined by the Rodrigues’ formula

they also obey the completeness relation

(1)

and orthogonality relation:

Two Legendre polynomials can be expanded in a series:

This was first proven by [Adams], where he shows:

where and

The coefficient in the expansion can then be written using a symbol as:

So we will be just using the symbol form from now on. We can now calculate the integral of three Legendre polynomials:

(2)

This is consistent with the series expansion:

Any function (where ) can be expanded as:

For the following choice of we get (for ):

Code:

>>> from sympy import var, legendre, integrate
>>> var("l R t")
(l, R, t)
>>> f = (2*l+1) / (2*t) * integrate(legendre(l, (1-R**2+t**2) / (2*t)),
...         (R, 1-t, 1+t))
>>> for _l in range(20): print _l, f.subs(l, _l).doit().simplify()
...
0 1
1 t
2 t**2
3 t**3
4 t**4
5 t**5
6 t**6
7 t**7
8 t**8
9 t**9
10 t**10
11 t**11
12 t**12
13 t**13
14 t**14
15 t**15
16 t**16
17 t**17
18 t**18
19 t**19


So the Legendre polynomials are the coefficients of the following expansion for :

Note that for we get:

 [Adams] Adams, J. C. (1878). On the Expression of the Product of Any Two Legendre’s Coefficients by Means of a Series of Legendre’s Coefficients. Proceedings of the Royal Society of London, 27, 63-71.

## Example I¶

Very important is the following multipole expansion:

(3)

Where and . Assuming , we get for the first few terms:

## Example II¶

Let’s find the expansion of

for . We get:

Here is the result for the first few :

Expanding in up to we get:

Code:

>>> from sympy import var, legendre, integrate, exp, latex, cse
>>> var("l R t alpha")
(l, R, t, alpha)
>>>
>>> f = (2*l+1) / (2*t) * integrate(legendre(l, (1-R**2+t**2) / (2*t)) \
...         * exp(-alpha*R),
...         (R, 1-t, 1+t))
>>>
>>> for _l in range(3):
...     print "f_%d & =" %_l, latex(f.subs(l, _l).doit().simplify()), "\\\\"
...
f_0 & = \frac{\left(e^{2 \alpha t} -1\right) e^{- \alpha t - \alpha}}{2 \alpha t} \\
f_1 & = \frac{3}{2} \frac{\left(\alpha^{2} t e^{2 \alpha t} + \alpha^{2} t + \alpha t e^{2 \alpha t} + \alpha t - \alpha e^{2 \alpha t} + \alpha - e^{2 \alpha t} + 1\right) e^{- \alpha t - \alpha}}{\alpha^{3} t^{2}} \\
f_2 & = \frac{5}{2} \frac{\left(\alpha^{4} t^{2} e^{2 \alpha t} - \alpha^{4} t^{2} + 3 \alpha^{3} t^{2} e^{2 \alpha t} - 3 \alpha^{3} t^{2} - 3 \alpha^{3} t e^{2 \alpha t} - 3 \alpha^{3} t + 3 \alpha^{2} t^{2} e^{2 \alpha t} - 3 \alpha^{2} t^{2} - 9 \alpha^{2} t e^{2 \alpha t} - 9 \alpha^{2} t + 3 \alpha^{2} e^{2 \alpha t} - 3 \alpha^{2} - 9 \alpha t e^{2 \alpha t} - 9 \alpha t + 9 \alpha e^{2 \alpha t} - 9 \alpha + 9 e^{2 \alpha t} -9\right) e^{- \alpha t - \alpha}}{\alpha^{5} t^{3}} \\
>>> for _l in range(5):
...     result = f.subs(l, _l).doit().simplify() / exp(-alpha)
...     print "g_%d & =" %_l, latex(result.series(t, 0, 7)), "\\\\"
...
g_0 & = 1 + \frac{1}{6} \alpha^{2} t^{2} + \frac{1}{120} \alpha^{4} t^{4} + \frac{1}{5040} \alpha^{6} t^{6} + \operatorname{\mathcal{O}}\left(t^{7}\right) \\
g_1 & = t + \alpha t + \frac{1}{10} \alpha^{2} t^{3} + \frac{1}{10} \alpha^{3} t^{3} + \frac{1}{280} \alpha^{4} t^{5} + \frac{1}{280} \alpha^{5} t^{5} + \operatorname{\mathcal{O}}\left(t^{7}\right) \\
g_2 & = t^{2} + \alpha t^{2} + \frac{1}{3} \alpha^{2} t^{2} + \frac{1}{14} \alpha^{2} t^{4} + \frac{1}{14} \alpha^{3} t^{4} + \frac{1}{42} \alpha^{4} t^{4} + \frac{1}{504} \alpha^{4} t^{6} + \frac{1}{504} \alpha^{5} t^{6} + \frac{1}{1512} \alpha^{6} t^{6} + \operatorname{\mathcal{O}}\left(t^{7}\right) \\
g_3 & = t^{3} + \alpha t^{3} + \frac{2}{5} \alpha^{2} t^{3} + \frac{1}{18} \alpha^{2} t^{5} + \frac{1}{15} \alpha^{3} t^{3} + \frac{1}{18} \alpha^{3} t^{5} + \frac{1}{45} \alpha^{4} t^{5} + \frac{1}{270} \alpha^{5} t^{5} + \operatorname{\mathcal{O}}\left(t^{7}\right) \\
g_4 & = t^{4} + \alpha t^{4} + \frac{3}{7} \alpha^{2} t^{4} + \frac{1}{22} \alpha^{2} t^{6} + \frac{2}{21} \alpha^{3} t^{4} + \frac{1}{22} \alpha^{3} t^{6} + \frac{1}{105} \alpha^{4} t^{4} + \frac{3}{154} \alpha^{4} t^{6} + \frac{1}{231} \alpha^{5} t^{6} + \frac{1}{2310} \alpha^{6} t^{6} + \operatorname{\mathcal{O}}\left(t^{7}\right) \\


where:

## Example IV¶

The potential is a function of , and only:

So we expand in the variable using the Legendre expansion:

where only depends on and :

In the limit we get:

In general, the expressions are complicated. For the first few we get:

In we assume .

# Spherical Harmonics¶

Are defined for by

where are associated Legendre polynomials defined by

and are Legendre polynomials. For they are defined by:

Sometimes the spherical harmonics are written as:

where:

The spherical harmonics are ortonormal:

(4)

and complete (both in the -subspace and the whole space):

(5)

(6)

The relation (5) is a special case of an addition theorem for spherical harmonics

(7)

where is the angle between the unit vectors given by and :

Relations between complex conjugates is:

# Gaunt Coefficients¶

We use the Wigner-Eckart theorem:

Where:

In order to calculate the reduced matrix element , we evaluate the W-E theorem for :

and also evaluate the left hand side explicitly:

where we used (2). Comparing these two results, we get:

and finally:

In order to evaluate other integrals of spherical harmonics, we just use the above result, for example:

This is the most symmetric relation. It was first obtained by [Gaunt] (equation (9), p. 194, where he expanded the symbols, so his formula is more complex but equivalent to the above).

It is useful to incorporate the selection rule of the symbols into the formula and we get:

From the other selection rules of the symbols it follows, that the coefficients are nonzero only when:

 [Gaunt] Gaunt, J. A. (1929). The Triplets of Helium. Philosophical Transactions of the Royal Society of London, 228, 151-196.

## Example IV¶

Where we used the fact, that is an even integer and . is not symmetric in and :

Few other identities:

## Example VI¶

(8)

Where we used the following identities:

Note: using the integral of 3 spherical harmonics directly in (8):

doesn’t straightforwardly lead to the final result, as it is not obvious how to simplify things further.

# Wigner 3j Symbols¶

Relation between the Wigner symbols and Clebsch-Gordan coefficients:

They are nonzero only when:

They have lots of symmetries. The symbol is invariant for an even permutation of columns:

For an odd permutation of columns it changes sign if is an odd integer:

and the same if you change the sign of the second row:

Orthogonality relations:

As a special case, we get:

(9)

Here is a script to check that the equation (9) works:

from sympy import S
from sympy.physics.wigner import wigner_3j

def doit(l, k, lp, m):
s = 0
for mp in range(-lp, lp+1):
s += wigner_3j(l, k, lp, -m, m-mp, mp)**2
print "%2d %2d %2d %2d  " % (l, k, lp, m), s, " ", S(1)/(2*l+1)

k = 4
lp = 3
print " l  k  lp m:  lhs   rhs"
for l in range(1, 6):
for m in range(-l, l+1):
doit(l, k, lp, m)


it prints:

l  k  lp m:  lhs   rhs
1  4  3 -1   1/3   1/3
1  4  3  0   1/3   1/3
1  4  3  1   1/3   1/3
2  4  3 -2   1/5   1/5
2  4  3 -1   1/5   1/5
2  4  3  0   1/5   1/5
2  4  3  1   1/5   1/5
2  4  3  2   1/5   1/5
3  4  3 -3   1/7   1/7
3  4  3 -2   1/7   1/7
3  4  3 -1   1/7   1/7
3  4  3  0   1/7   1/7
3  4  3  1   1/7   1/7
3  4  3  2   1/7   1/7
3  4  3  3   1/7   1/7
4  4  3 -4   1/9   1/9
4  4  3 -3   1/9   1/9
4  4  3 -2   1/9   1/9
4  4  3 -1   1/9   1/9
4  4  3  0   1/9   1/9
4  4  3  1   1/9   1/9
4  4  3  2   1/9   1/9
4  4  3  3   1/9   1/9
4  4  3  4   1/9   1/9
5  4  3 -5   1/11   1/11
5  4  3 -4   1/11   1/11
5  4  3 -3   1/11   1/11
5  4  3 -2   1/11   1/11
5  4  3 -1   1/11   1/11
5  4  3  0   1/11   1/11
5  4  3  1   1/11   1/11
5  4  3  2   1/11   1/11
5  4  3  3   1/11   1/11
5  4  3  4   1/11   1/11
5  4  3  5   1/11   1/11

Values of the coefficients for a few special cases (use the symmetries above to obtain values for permuted symbols):

# Multipole Expansion¶

Using (3) we get:

where we used the formula: