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

Can't solve Sum in sqrt #14579

Open
lilithxxx opened this issue Mar 30, 2018 · 9 comments · May be fixed by #22193
Open

Can't solve Sum in sqrt #14579

lilithxxx opened this issue Mar 30, 2018 · 9 comments · May be fixed by #22193
Labels

Comments

@lilithxxx
Copy link
Contributor

lilithxxx commented Mar 30, 2018

>>> from sympy import *
>>> x=symbols('x')
>>> Sum(sqrt(x), (x,1,oo)).doit()
Sum(sqrt(x), (x, 1, oo))

where the answer should have been oo(related to #14410)

@lilithxxx
Copy link
Contributor Author

This is the same for all powers of x which are decimals. For example, Sum(x**2.5, (x, 1, oo)) ,
Sum(x**0.5, (x, 1, oo)) they all won't work.

Even Sum(x**2.0, (x, 1, oo)) won't work while Sum(x**2, (x, 1, oo)) does.

@lilithxxx lilithxxx changed the title Can't solve limit in sqrt Can't solve Sum in sqrt Mar 31, 2018
@vishalg2235
Copy link
Contributor

@jksuom @normalhuman here for any positive number of result the sum will be oo, even for negative number of result like in #14410 new cases should be added.

@dnabanita7
Copy link
Contributor

Actually,here @lilithxxx says it correct.In the floating point integer,Sum doesn't work because of doit() While it works perfectly if we use evalf().So,I guess doit() module has to be checked.
Can I take up this issue? Ping @oscarbenjamin

@dnabanita7
Copy link
Contributor

dnabanita7 commented Mar 12, 2019

from sympy import *
x=symbols('x')
s=Sum(x**2.0,(x,1,oo)).evalf()
print(s)

The output is:
0.e+390

@dnabanita7
Copy link
Contributor

doit() is in PyPi.I can't find any refrence of PyPi in here.

@jksuom
Copy link
Member

jksuom commented Mar 13, 2019

Sum.doit is defined in summations.py. It seems that it could be improved to return oo for divergent series with positive terms like Sum(sqrt(n), (n, 1, oo)).

@dnabanita7
Copy link
Contributor

dnabanita7 commented Mar 13, 2019 via email

@asmeurer
Copy link
Member

If you use IPython/Jupyter Sum? will tell you in what file it is defined.

@anutosh491
Copy link
Member

I'll take this up , seems approachable for a relatively new contributor like me . Thanks!

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