#17328: incomplete gamma in integral is wrong
------------------------+----------------------------
Reporter: kcrisman | Owner:
Type: defect | Status: new
Priority: critical | Milestone: sage-6.4
Component: calculus | Keywords:
Merged in: | Authors:
Reviewers: | Report Upstream: N/A
Work issues: | Branch:
Commit: | Dependencies:
Stopgaps: |
------------------------+----------------------------
See [https://groups.google.com/forum/#!topic/sage-support/lGGO_q_NVzg this
sage-support thread] for details.
{{{
sage: N(integral(1/log(x)^2,(x,2,3)))
0.536566859259958 # quite wrong
sage: integral(1/(ln(x))^2, x,2,3)
gamma(-1, -log(3)) - gamma(-1, -log(2))
}}}
We get the antiderivative and answer from Maxima, which evaluates this
correctly numerically.
{{{
(%i1) display2d : false $
(%i2) foo : 1/log(x)^2 $
(%i3) integrate (foo, x, 2, 3);
(%o3) gamma_incomplete(-1,-log(3))-gamma_incomplete(-1,-log(2))
(%i4) %, numer;
(%o4) 1.273097216447114
(%i5) integrate (foo, x);
(%o5) gamma_incomplete(-1,-log(x))
(%i6) ev (%, x=3) - ev (%, x=2);
(%o6) gamma_incomplete(-1,-log(3))-gamma_incomplete(-1,-log(2))
(%i7) %, numer;
(%o7) 1.273097216447114
}}}
See in particular this ugly plot.
{{{
sage: plot(lambda t: numerical_integral(1/ln(x)^2,2,t)[0],2,3)+plot(lambda
t: gamma(-1, -log(t)).real(),2,3,color='red')
}}}
And even that we have to call `real()` to remove the numerical noise is
not good...
See possibly also [https://groups.google.com/forum/#!topic/sage-
support/RrveCpPgoKU here] and [https://groups.google.com/forum/#!topic
/sage-support/RD3YH3jb3qo here] and possibly even #16697.
--
Ticket URL: <http://trac.sagemath.org/ticket/17328>
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.