MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Integrating SphericalHarmonicY

  • To: mathgroup at
  • Subject: [mg73297] Re: Integrating SphericalHarmonicY
  • From: Paul Abbott <paul at>
  • Date: Fri, 9 Feb 2007 23:42:42 -0500 (EST)
  • Organization: The University of Western Australia
  • References: <eq9c4v$n37$> <eqh6rm$hqg$>

In article <eqh6rm$hqg$1 at>, wgempel at wrote:

> Sure, I had to calculate some expectation values for non-relativistic
> hydrogen wavefunctions for a homework assignment.  That was fine and I
> have already submitted that work.  When I entered the formulas for the
> wavefunctions, I wanted to check that they were normalized for general
> n,l,m (just to double check that I had the right normalization
> constants).  I was unable to figure out how to do this for the general
> case using mathematica.  Instead I ended just trying several test case
> (e.g. n = 18, l = 11, m = -4)  until I felt confident the
> normalization was correct.  There are other portions of the integral
> that fail to simplify, but I was struck by my inability to coax
> mathematica into simplifying this basic integral.

Such integrals are _not_ trivial for general values of n, l, m.
> Mainly, I am just trying to learn Mathematica.  I came across this
> simplification that I think of as a basic pattern, and I was unable to
> figure out the right way to represent it in the system.  It seems to
> me that Mathematica should be able to recognize simple integrals of
> orthogonal polynomials (if the parameters are correctly constrained),
> so I assume that I am missing some technique.  Since projecting
> functions onto orthogonal polynomials is quite common (in physics), I
> want to know the correct way to work with these functions in
> Mathematica.

The "correct" approach is essentially the approach you use in physics 
(and mathematics) if you are doing the calculation by hand. To compute 
integrals such as

   Integrate[LegendreP[m, x] x^n, {x, -1, 1}]

(where it is implicit that n and m are non-negative integers), or to 
show that

  Integrate[LegendreP[m, x] LegendreP[n, x], {x, -1, 1}]

vanishes for n != m, one can use the generating function

  (1 - 2 x t + t^2)^(1/2) == 
     Sum[t^n LegendreP[n, x], {n, 0, Infinity}]

and interchange the order of summation and integration.

As an exercise, show that

  Integrate[(LegendreP[n + 1, x] - LegendreP[n - 1, x])/(1 - x)^(3/2),
    {x, -1, 1}] == -4 Sqrt[2]

for n = 1, 2, 3, ... (see The Mathematica Journal 7 (2)).


Paul Abbott                                      Phone:  61 8 6488 2734
School of Physics, M013                            Fax: +61 8 6488 1014
The University of Western Australia         (CRICOS Provider No 00126G)    

  • Prev by Date: FindRoot Precision Problem
  • Next by Date: Re: record intermediate steps
  • Previous by thread: Re: Integrating SphericalHarmonicY
  • Next by thread: dot minus operator