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

Sum is_convergent gives incorrect result #21315

Open
proy87 opened this issue Apr 13, 2021 · 2 comments · May be fixed by #22247
Open

Sum is_convergent gives incorrect result #21315

proy87 opened this issue Apr 13, 2021 · 2 comments · May be fixed by #22247

Comments

@proy87
Copy link

proy87 commented Apr 13, 2021

Sum(1-cos(1/x), (x,1,oo)).is_convergent() gives False, but this series is convergent.

@oscargus
Copy link
Contributor

The reason seems to be that the order of the expression is O(1, (_x, oo)), and, hence, the p_series_test (x**p) returns p = 0 and hence it is deemed to not be convergent. So more or less does SymPy think that the function behaves as a constant near oo and hence is not convergent.

So the O method should be changed to return something else.

@anutosh491
Copy link
Member

Well this is error is a really good catch , as we can't comment much on sum of two divergent series . But O(1-cos(1/x) , (_x, oo)) gives O(1, (_x, oo)) which doesn't seem wrong and may be the preferred test for this series would be the integral or any of the comparision tests. Not sure if we can go by the p_series_test here as not all methods can be used for a particular series !!!

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