RuleBasedIntegration / Rubi

Rubi for Mathematica
http://rulebasedintegration.org
MIT License
228 stars 23 forks source link

Incorrect evaluation of definite integral #42

Open DaineDanielson opened 3 years ago

DaineDanielson commented 3 years ago

The following definite integral evaluates to zero: Int[1/(a + Cos[x]), {x, 0, 2 Pi}]

However, the correct evaluation is, in general, nonzero. If a is replaced with an explicit number, the evaluation proceeds correctly. For instance,

Int[1/(2 + Cos[x]), {x, 0, 2 Pi}]

gives the correct value: 2 Pi/Sqrt[3].

stblake commented 7 months ago

I suggest we remove definite integral capability. Albert has implemented Newton-Leibniz without checking for continuity

Int[u_, {xSymbol, a, b_}] := With[{result = Int[u, x]}, Limit[result, x -> b] - Limit[result, x -> a]]

It's kind of hard to believe Albert did this...

stblake commented 7 months ago

Added a (hopefully temporary) patch for definite integration:

Int::definite = "Rubi does not check that the domain of integration is continuous."; Int[u_, {xSymbol, a, b_}] := With[{result = Int[u, x]}, Message[Int::definite]; Limit[result, x -> b] - Limit[result, x -> a]];