Problems with Legendre expansion

• To: mathgroup at smc.vnet.net
• Subject: [mg24402] Problems with Legendre expansion
• From: "Kevin J. McCann" <Kevin.McCann at jhuapl.edu>
• Date: Wed, 12 Jul 2000 23:13:46 -0400 (EDT)
• Organization: Johns Hopkins University Applied Physics Lab, Laurel, MD, USA
• Sender: owner-wri-mathgroup at wolfram.com

```I am doing a Legendre expansion of Sin[Pi x] and have, amongst others,
the following integral

Integrate[Sin[Pi*x]*LegendreP[21,x],{x,-1,1}]

Mathematica just returns the input with the polynomial expanded out. Now,
everything about the integral is exact. We have a 21st order polynomial
times the sine, and these integrals are all exact. Why no answer? This
same integral does work for the 19th and 20th Legendre functions.

However, complications arise even for

Integrate[Sin[Pi*x]*LegendreP[19,x],{x,-1,1}]

Here I do get an exact answer with Pi's and large numbers, but when I do
N[%] on it, I get an answer of -0.000299144 which is way too large. If
instead I do N[%,30] on the exact, I get 10^(-14).

Kevin

```

• Prev by Date: RSolve can't solve non-linear difference eqns?
• Next by Date: List of symbols
• Previous by thread: RSolve can't solve non-linear difference eqns?
• Next by thread: RE: Problems with Legendre expansion