10:21 AM
To avoid ambiguity. compare
`With[
{a= 1},
Precision@Integrate[Sin[x], {x, a,a}]
]`
and
`With[
{a= 1},
Precision@Integrate[Sin[x], {x, a,N@a}]
]`
`With[
{a= 1},
Precision@Integrate[Sin[x], {x, a,a}]
]`
and
`With[
{a= 1},
Precision@Integrate[Sin[x], {x, a,N@a}]
]`
8 hours later…
6:57 PM
@rhermans I disagree that the 3rd
With[{a = N@1}...]
should have infinite precision and cited the documentation to support it. I understood your mathematical argument why 0
might be considered the desired result, but that is not how Mathematica is supposed to perform. (I disagree with one of your hypotheses in that argument, that all instances of floating-point 1.
represent exactly the same number and should be so treated.)
@rhermans Re the complex result: Mathematically the real numbers are a subset of the complexes. So the answer has the correct value even if we agree that the form is incorrect. However,
Integrate[]
computes complex integrals by default (that is, integrals over the complex domain). There are lots of questions, even complaints, about that in Q&As on the site. The following constrains x
to be real: « first day (4626 days earlier) ← previous day next day → last day (20 days later) »