#10550: integration not working
------------------------+---------------------------------------------------
   Reporter:  mariah    |       Owner:  burcin    
       Type:  defect    |      Status:  new       
   Priority:  minor     |   Milestone:  sage-4.6.2
  Component:  calculus  |    Keywords:            
     Author:            |    Upstream:  N/A       
   Reviewer:            |      Merged:            
Work_issues:            |  
------------------------+---------------------------------------------------

Comment(by mhampton):

 Seems like there might be two issues here.  One is that the default for
 integrate_numerical (which is what I think gets called here after symbolic
 integration fails) only uses a maximum of 87 sample points.  This
 parameter can be set by using integrate_numerical directly but I don't
 think it can be through integrate.

 The second possible issue is that it seems that integrate_numerical tries
 to create a fast version of the function, but this is not done in an
 accurate way.  I believe this code was written prior to fast_callable,
 which seems to help:

 {{{
 g = abs(x^2-1)^(-2/3)
 gc = fast_callable(g,vars=[x],domain=RDF)
 for i in range(3,15):
     print i, RR(g.integrate(x, -10^i, 10^i)), integral_numerical(gc,
 -10^i, 10^i, max_points=150)

 3 12.0193735393553 (12.019608153321734, 9.1957321661164813e-05)
 4 12.3400570107857 (12.341098980932561, 9.1150919425152691e-05)
 5 12.4880961536322 (12.49028406429874, 6.9889256990153531e-05)
 6 12.5548875258538 (12.55959625938481, 7.1073622858611871e-05)
 7 12.6007931754768 (12.591761943525762, 0.00010294503436049848)
 8 12.5769884999380 (12.60668258943978, 0.00010062716727896715)
 9 12.6035401600491 (12.613617891834338, 0.00014081135169109776)
 10 12.4014006867096 (12.616777202843952, 9.2533059420607869e-05)
 11 11.1318879504315 (12.618201503159618, 0.0025695049437327948)
 12 7.82165950876205 (12.618006422456004, 0.00021237998608546343)
 13 6.48361691536824 (12.618918276607321, 0.0032425594623566767)
 14 6.32209292067043 (12.619569344159935, 0.0097174091356236336)
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10550#comment:1>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to