Ticket #12047 (closed defect: fixed)
numerical_integral(f, a, a) should always be zero
|Reported by:||jdemeyer||Owned by:||burcin|
|Cc:||karsten.naert@…, zimmerma, mjo||Work issues:|
|Report Upstream:||N/A||Reviewers:||Michael Orlitzky|
|Authors:||Jeroen Demeyer||Merged in:||sage-4.8.alpha3|
Description (last modified by jdemeyer) (diff)
Currently, in sage-4.7.2:
sage: integral_numerical(log(x), 0, 0) (nan, nan)
Mathematically, the integral should certainly be zero: there is a primitive function which is continuous and defined at 0. Symbolically, we can compute the integral correctly:
sage: integral(log(x), (x,0,0)) 0
So I would like to add a special-case check for integral_numerical(): if the interval of integration is a point, then always return 0.
I realize that this means that also the integral of 1/x from 0 to 0 would be 0, even though 1/x has no continuous primitive at 0. But according to the Lebesgue theory of integration, I think this is not even a problem.
Also: remove various unused things from the file sage/gsl/integration.pyx and clean up the documentation.
- Status changed from new to needs_review
- Authors set to Jeroen Demeyer
- Cc mjo added
- Status changed from needs_review to needs_work
comment:11 follow-up: ↓ 13 Changed 18 months ago by mjo
- Status changed from needs_review to positive_review