> > f1(x)=1/sqrt(x^3+2) > f2(x)=1/sqrt(x^4+2) > r1=RR(integrate(f1(x),(x,1,10^(10)))) > r2=RR(integrate(f2(x),(x,1,10^(10)))) > s1=RR(integrate(f1(x),(x,1,10^(11)))) > s2=RR(integrate(f2(x),(x,1,10^(11)))) >
Note that probably using something like sage: numerical_integral(f2,1,10^8) (0.8815690504421161, 3.309409685784312e-09) would be better here, since Sage isn't doing the symbolic integration in any case (Maxima is fairly weak on this kind of integral). > The integrals to 10^(10) are being evaluated more or less correctly, as is > the integral of f1 to 10^(11), but the > integral of f2 to 10^(11) is wrong by about seven orders of magnitude. > > sage: numerical_integral(f2,1,10^8) (0.8815690504421161, 3.309409685784312e-09) sage: numerical_integral(f2,1,10^9) (0.8815690594421439, 2.7280605832086615e-08) sage: numerical_integral(f2,1,10^10) (0.8815690603426408, 6.194229607849825e-07) sage: numerical_integral(f2,1,4.5*10^10) (0.8815690604198958, 2.5079492928729825e-11) sage: numerical_integral(f2,1,10^11) (2.3214916598860602e-07, 4.5569931705290324e-07) Yeah, that is annoying. Something similar happens with our other "standard" numerical integration procedure: sage: f2.nintegrate(x,1,1000000) (0.8815680604421181, 1.6586910832421555e-12, 819, 0) sage: f2.nintegrate(x,1,10000000) (-1.0000000002652395e-07, 9.9265675869388e-15, 861, 5) Interestingly, going to infinity avoids this: sage: numerical_integral(f2,1,oo) (0.8815690604419927, 5.603223703062511e-08) Or use sage: numerical_integral(f2,10^10,10^11) (9.000000000000001e-11, 9.99200722162641e-25) This uses the Gnu Scientific Library. Perhaps this is a limitation of how it is constructed. But I have a feeling someone else who knows more about the internals of quadrature methods will have more info, so for now I've opened http://trac.sagemath.org/ticket/16905 for this bug. Thank you! -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.