#8624: integral of abs(cos(x))*sin(x) gives false results
-----------------------------+----------------------------------------------
   Reporter:  jeroen         |       Owner:  burcin    
       Type:  defect         |      Status:  needs_work
   Priority:  minor          |   Milestone:  sage-4.4.3
  Component:  calculus       |    Keywords:            
     Author:  Jason Grout    |    Upstream:  N/A       
   Reviewer:  Burcin Erocal  |      Merged:            
Work_issues:                 |  
-----------------------------+----------------------------------------------

Comment(by kcrisman):

 > ----
 > {{{
 > **********************************************************************
 > File ".../devel/sage-t/sage/misc/functional.py", line 705:
 >     sage: h = integral(sin(x)/x^2, (x, 1, pi/2)); h
 > Expected:
 >     integrate(sin(x)/x^2, x, 1, 1/2*pi)
 > Got:
 >     1/2*gamma(-1, -1/2*I*pi) + 1/2*gamma(-1, 1/2*I*pi) - 1/2*gamma(-1,
 -I) - 1/2*gamma(-1, I)
 > **********************************************************************
 > File ".../devel/sage-t/sage/misc/functional.py", line 707:
 >     sage: h.n()
 > Expected:
 >     0.339447940978915...
 > Got:
 >     0.339447940978884
 > **********************************************************************
 > }}}

 Hmm, did you have the new Maxima package at #8731 already installed?  This
 is dealt with there.

 >
 > Here's the Maple output:
 > {{{
 > > integrate(sin(x)/x^2, x=1..1/2*Pi);
 > memory used=7.6MB, alloc=5.1MB, time=0.33
 >                                                Pi
 >                     sin(1) Pi - Ci(1) Pi + Ci(----) Pi - 2
 >                                                2
 >                     --------------------------------------
 >                                       Pi
 > }}}
 >
 > It would be interesting to see how this is transformed to the expression
 with the incomplete gamma function above.
 >

 Apparently via Gamma(-1,x)=Ei(-x)+e^(-x)/x+1/2 (log(-1/x)-log(-x))+log(x)
 and the connection between Ei and Ci.  But it does check out!

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8624#comment:10>
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