You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
>>> print(limit_seq(Sum(1/k, (k, n, 2*n)), n))
None
>>> pprint(limit_seq(Sum(1/k, (k, n, 2*n)), n))
None
Default (Latex?) printing of limit_seq(Sum(1/k, (k, n, 2*n)), n) executes and returns nothing (I think returning nothing is better than returning the original expression)
>>> a, k = symbols('a, k', positive=True, integer=True)
>>> print(limit_seq(Sum(a**k, (k, 0, n - 1)).doit()/(a**n), n))
None
>>> print(limit_seq(Sum(a**k, (k, 0, n - 1))/(a**n), n))
1/(a - 1)
>>> pprint(limit_seq(Sum(a**k, (k, 0, n - 1)).doit()/(a**n), n))
None
>>> pprint(limit_seq(Sum(a**k, (k, 0, n - 1))/(a**n), n))
1
─────
a - 1
Default printing of limit_seq(Sum(a**k, (k, 0, n - 1)).doit()/(a**n), n) executes and returns nothing
Default printing of limit_seq(Sum(a**k, (k, 0, n - 1))/(a**n), n) gives
1
─────
a - 1
a can be 1 in the above
>>> a, k = symbols('a, k', positive=True, integer=True)
>>> limit_seq(Sum(1/n, (k, 1, n)).doit()/log(n), n)
0
>>> limit_seq(Sum(1/n, (k, 1, n))/log(n), n)
1
>>> limit_seq(Sum(Rational(1,k), (k, 1, n)).doit()/log(n), n)
Traceback (most recent call last):
File "<ipython-input-70-8de63e34fe96>", line 1, in <module>
limit_seq(Sum(Rational(1,k), (k, 1, n)).doit()/log(n), n)
File ".\sympy\core\numbers.py", line 1490, in __new__
q = Rational(q)
File ".\sympy\core\numbers.py", line 1485, in __new__
raise TypeError('invalid input: %s' % p)
TypeError: invalid input: k
The text was updated successfully, but these errors were encountered:
These deserve a simple heuristic which I'll be adding . The reason basically is that something like Sum(1/k, (k, a, b) ), doesn't return harmonic(b) - harmonic(a) when a is positive and returns self .
>>> print(limit_seq(Sum(1/k, (k, n, 2*n)), n))
None
Rest all faulty cases are working as expected on master as of now , (might have been fixed somewhere ) and only tests need to be added for the same
Default (Latex?) printing of
limit_seq(Sum(1/k, (k, n, 2*n)), n)
executes and returns nothing (I think returning nothing is better than returning the original expression)Default printing of
limit_seq(Sum(a**k, (k, 0, n - 1)).doit()/(a**n), n)
executes and returns nothingDefault printing of
limit_seq(Sum(a**k, (k, 0, n - 1))/(a**n), n)
givesa
can be 1 in the aboveThe text was updated successfully, but these errors were encountered: