Limits of Sequences

Provides methods to compute limit of terms having sequences at infinity.

sympy.series.limitseq.difference_delta(expr, n=None, step=1)[source]

Difference Operator.

Discrete analogous to differential operator.




>>> from sympy import difference_delta as dd
>>> from import n
>>> dd(n*(n + 1), n)
2*n + 2
>>> dd(n*(n + 1), n, 2)
4*n + 6
sympy.series.limitseq.dominant(expr, n)[source]

Finds the most dominating term in an expression.

if limit(a/b, n, oo) is oo then a dominates b. if limit(a/b, n, oo) is 0 then b dominates a. else a and b are comparable.

returns the most dominant term. If no unique domiant term, then returns None.


>>> from sympy import Sum
>>> from sympy.series.limitseq import dominant
>>> from import n, k
>>> dominant(5*n**3 + 4*n**2 + n + 1, n)
>>> dominant(2**n + Sum(k, (k, 0, n)), n)
sympy.series.limitseq.limit_seq(expr, n=None, trials=5)[source]

Finds limits of terms having sequences at infinity.


expr : Expr

SymPy expression that is admissible (see section below).

n : Symbol

Find the limit wrt to n at infinity.

trials: int, optional

The algorithm is highly recursive. trials is a safeguard from infinite recursion incase limit is not easily computed by the algorithm. Try increasing trials if the algorithm returns None.


[R455]Computing Limits of Sequences - Manuel Kauers


>>> from sympy import limit_seq, Sum, binomial
>>> from import n, k, m
>>> limit_seq((5*n**3 + 3*n**2 + 4) / (3*n**3 + 4*n - 5), n)
>>> limit_seq(binomial(2*n, n) / Sum(binomial(2*k, k), (k, 1, n)), n)
>>> limit_seq(Sum(k**2 * Sum(2**m/m, (m, 1, k)), (k, 1, n)) / (2**n*n), n)

Admissible Terms

The terms should be built from rational functions, indefinite sums, and indefinite products over an indeterminate n. A term is admissible if the scope of all product quantifiers are asymptotically positive. Every admissible term is asymptoticically monotonous.