#11164: Integral of sin(x)/x gives false result.
-------------------------------------------------+-------------------------
       Reporter:  benreynwar                     |        Owner:  burcin
           Type:  defect                         |       Status:
       Priority:  major                          |  needs_info
      Component:  calculus                       |    Milestone:
       Keywords:                                 |   Resolution:
        Authors:                                 |    Merged in:
Report Upstream:  Fixed upstream, in a later     |    Reviewers:
  stable release.                                |  Work issues:
         Branch:                                 |       Commit:
   Dependencies:                                 |     Stopgaps:
-------------------------------------------------+-------------------------

Old description:

> {{{
> > eq = sin(x)/x
> > integrate(eq, x, -1e-6, 1e6)
> -3.14159065359
> }}}
> I expected an answer of about 2e-6.

New description:

 {{{
 > eq = sin(x)/x
 > integrate(eq, x, -1e-6, 1e-6)
 -3.14159065359
 }}}
 I expected an answer of about 2e-6.

--

Comment (by tscrim):

 In 6.3.beta4 (so with #13973), I get:
 {{{
 sage: eq = sin(x) / x
 sage: integrate(eq, x, -1e-6, 1e-6)
 -I*Ei(1/1000000*I) + I*Ei(-1/1000000*I)
 sage: _.n()
 3.14159465358979
 sage: integrate(eq, x, -1e-12, 1e-12)
 -I*Ei(1/1000000000000*I) + I*Ei(-1/1000000000000*I)
 sage: _.n()
 3.14159265359179
 }}}
 Something bad happens with the integration computation when crossing over
 0 as we have:
 {{{
 sage: integrate(eq, x, 1e-12, 1e-6)
 -1/2*I*Ei(1/1000000*I) + 1/2*I*Ei(1/1000000000000*I) -
 1/2*I*Ei(-1/1000000000000*I) + 1/2*I*Ei(-1/1000000*I)
 sage: _.n()
 9.99999000050877e-7
 }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/11164#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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to