# Revision history [back]

### problems with symbolic integration and then numerical evaluating

can anyone explain this: sage: integrate(legendre_P(64,x)sin((1+x)pi/2),x,-1,1).n() 1.16508247725542e79

from approximation one know's that the legendre coefficients converge exponentially to zero and not to infinity!

and indeed with mpmath I get a better answer: sage: import sage.libs.mpmath.all as mpmath sage: mpmath.call(mpmath.quad,lambda x: mpmath.legendre(64,x)mpmath.sin(pi/2(x+1)),[-1,1]) -5.04684703543649e-25

Is there an overhead happening, when I numerically evaluate large rationals or something???

 2 fixed math typesetting. William Stein 2179 ●11 ●32 ●63 http://wstein.org/

### problems with symbolic integration and then numerical evaluating

can anyone explain this: this:

sage: integrate(legendre_P(64,x)sin((1+x)pi/2),x,-1,1).n()
1.16508247725542e79integrate(legendre_P(64,x)*sin((1+x)*pi/2),x,-1,1).n()
1.16508247725542e79


from approximation one know's that the legendre coefficients converge exponentially to zero and not to infinity!

sage: import sage.libs.mpmath.all as mpmath