# 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.

References

Examples

>>> from sympy import difference_delta as dd
>>> from sympy.abc 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.

Examples

>>> from sympy import Sum
>>> from sympy.series.limitseq import dominant
>>> from sympy.abc import n, k
>>> dominant(5*n**3 + 4*n**2 + n + 1, n)
5*n**3
>>> dominant(2**n + Sum(k, (k, 0, n)), n)
2**n

sympy.series.limitseq.limit_seq(expr, n=None, trials=5)[source]

Finds limits of terms having sequences at infinity.

Parameters: 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.

References

 [R454] Computing Limits of Sequences - Manuel Kauers

Examples

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


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.