0

Hello I am writing a program that determines if a series is convergent or not, and discovered sympy. I have written almost all of the tests, just have a few hard ones to write, but I now wonder if their is a built in sympy method to solve it. I have done alot of research and only seem to find that it can only expand a series.

1 Answers1

0

Yes, sympy does have a this functionality: sympy-documentation Note that you will need a sufficiently recent version of sympy. Version 1.0 works, whereas 0.7.6 does not have this functionality yet.

Small example on how to use (copied from the sympy documentation):

from sympy import Sum, Symbol, sin, oo
n = Symbol('n', integer=True)
Sum((-1)**n, (n, 1, oo)).is_absolutely_convergent()
laolux
  • 1,445
  • 1
  • 17
  • 28