#11164: Integral of sin(x)/x gives false result.
--------------------------+-------------------------------------------------
Reporter: benreynwar | Owner: burcin
Type: defect | Status: needs_work
Priority: major | Milestone:
Component: calculus | Keywords:
Work_issues: | Upstream: Fixed upstream, in a later stable
release.
Reviewer: | Author:
Merged: | Dependencies:
--------------------------+-------------------------------------------------
Changes (by kcrisman):
* status: needs_review => needs_work
Comment:
I may have misstated whether this is "fixed".
{{{
sage: integrate(sin(x)/x,x,-1e-6,1e-6)
I*Ei(-1/1000000*I) - I*Ei(1/1000000*I)
sage: integrate(sin(x)/x,x,-1e-6,1e-6).n()
3.14159465358979
sage: numerical_integral(sin(x)/x,-1e-6,1e-6)
(1.9999999999998889e-06, nan)
}}}
The graph makes it very obvious the second (numerical) answer is correct.
Unsurprisingly, the other answer is off by exactly `pi`...
Presumably the first answer is "correct" in the sense that it is an
alternate representation of the `Si` sine integral function. But I think
there are some branch issues - `Ei(I*x)` only has an alternate formula for
`x>0`.
So we still need to do something with this. Or at the very least warn
about branches. But really, `sin(x)/x` shouldn't have to worry about
this!
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11164#comment:3>
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.