-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Improper integral does not evaluate #10445 #10515
Conversation
Modified the code to compute the limit of antiderivative when upper-limit is Infinity.
@@ -520,8 +521,14 @@ def try_meijerg(function, xab): | |||
function = antideriv._eval_interval(x, a, b) | |||
function = Poly(function, *gens) | |||
elif isinstance(antideriv, Add): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this alternative should be entirely removed. The whole antideriv
could be passed to _eval_interval
as is done after the next else:
statement.
Some test are failing. I can't figure it out, @jksuom can you take a look at it? |
else: | ||
try: | ||
function = antideriv._eval_interval(x, a, b) | ||
if b is S.Infinity: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test and the following lines are not necessary as the limit is taken into account in _eval_interval
. They seem to change the result in a way that makes some tests fail.
The failures seem to be caused by the lines containing |
What should i use instead of |
The issue is not the symbol name. All those lines can be removed. It is not necessary to consider limits at this point. |
I did that but now the integral gives |
Hmm.. That is odd. I get this with your latest PR.
Could there be a difference in our systems. |
Now this test is failing |
That is true. But that is just an inconvenience, not a real bug. The assert test can be modified, though I may have to look more closely into the associated issue before doing that. |
I am still curious why those lines having |
Some integrals cannot be evaluated and raise a NotImplementedError exception. In that case the unevaluated integral containing the local variable |
Thanks! I'll merge this in a few hours if there are no objections. |
Thanks for all the help. |
Improper integral does not evaluate #10445
Issue sympy#2708 was (partially) fixed in commit 6fe73a1 by evaluating separately the terms of the antiderivative. That gave rise to another issue sympy#10445, which was fixed in sympy#10515 by removing the separation. This commit aims to combine the merits of the two PRs by treating separately those terms of the antiderivative that contain unevaluated integral factors and evaluating the rest together in one sum. Add tests for issue 2708
Issue sympy/sympy#2708 was (partially) fixed in commit 6fe73a1 by evaluating separately the terms of the antiderivative. That gave rise to another issue sympy/sympy#10445, which was fixed in sympy/sympy#10515 by removing the separation. This commit aims to combine the merits of the two PRs by treating separately those terms of the antiderivative that contain unevaluated integral factors and evaluating the rest together in one sum. // edited by skirpichev Also handle case empty factors in dup_factor_list()
Issue sympy/sympy#2708 was (partially) fixed in commit 6fe73a1 by evaluating separately the terms of the antiderivative. That gave rise to another issue sympy/sympy#10445, which was fixed in sympy/sympy#10515 by removing the separation. This commit aims to combine the merits of the two PRs by treating separately those terms of the antiderivative that contain unevaluated integral factors and evaluating the rest together in one sum. // edited by skirpichev Also handle case empty factors in dup_factor_list()
Issue sympy/sympy#2708 was (partially) fixed in commit 6fe73a1 by evaluating separately the terms of the antiderivative. That gave rise to another issue sympy/sympy#10445, which was fixed in sympy/sympy#10515 by removing the separation. This commit aims to combine the merits of the two PRs by treating separately those terms of the antiderivative that contain unevaluated integral factors and evaluating the rest together in one sum. // edited by skirpichev Also handle case of empty factors in dup_factor_list() Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
Modified the code to compute the limit of antiderivative when upper-limit is Infinity. #10445