Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect evaluation of definite integral #42

Open
DaineDanielson opened this issue Feb 4, 2021 · 2 comments
Open

Incorrect evaluation of definite integral #42

DaineDanielson opened this issue Feb 4, 2021 · 2 comments

Comments

@DaineDanielson
Copy link

DaineDanielson commented Feb 4, 2021

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
Copy link
Collaborator

stblake commented Feb 13, 2024

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

Int[u_, {x_Symbol, 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
Copy link
Collaborator

stblake commented Feb 14, 2024

Added a (hopefully temporary) patch for definite integration:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants