Function Repository Resource:

# SequenceLimit

Numerically estimate the limit of a sequence of values

Contributed by: Jan Mangaldan
 ResourceFunction["SequenceLimit"][{n1,n2,…}] estimates the limit of the numerical sequence ni.

## Details and Options

ResourceFunction["SequenceLimit"] uses different sequence transformation algorithms for finding the numerical limit of a sequence.
Depending on the value of the option Method, the following implementions can be chosen:
 "WynnEpsilon" top-level implementation of the Wynn epsilon algorithm "NSequenceLimit" built-in implementation of the Wynn epsilon algorithm from NumericalMath` "BrezinskiTheta" Brezinski's theta algorithm "Euler" Euler transformation Automatic chooses the method depending on the precision and length of the sequence
ResourceFunction["SequenceLimit"][list,Method{"NSequenceLimit","Degree"1}] uses Aitken's delta-squared algorithm.
ResourceFunction["SequenceLimit"][list,Method{"NSequenceLimit","Degree"n}] specifies the degree of the transformation to be used by SequenceLimit.
In general, there must be at least 2n+2 terms in list for a degree-n transformation.
ResourceFunction["SequenceLimit"][list,Method{"WynnEpsilon","Parameter"h}] applies a generalization of the Wynn epsilon algorithm due to Vanden-Broeck and Schwartz, with adjustable parameter h.
h1 corresponds to the classical Wynn epsilon algorithm, while h0 corresponds to the iterated Aitken delta-squared process.
ResourceFunction["SequenceLimit"][list,Method{"Euler","EulerRatio"q}] applies Wynn's implementation of the Euler-Knopp transform. q is the fixed ratio used in the transformation.

## Examples

### Basic Examples (3)

Build a sequence approximating Pi:

 In[1]:=
 Out[1]=
 In[2]:=
 Out[2]=

Find an approximation of the limit of the sequence:

 In[3]:=
 Out[3]=

The approximation is much closer to the limit than the last term of the sequence:

 In[4]:=
 Out[4]=

### Scope (3)

Symbolic sequences:

 In[5]:=
 Out[5]=

Rational sequences:

 In[6]:=
 Out[6]=
 In[7]:=
 Out[7]=
 In[8]:=
 Out[8]=

Real-valued sequences:

 In[9]:=
 Out[9]=

Complex-valued sequences:

 In[10]:=
 Out[10]=
 In[11]:=
 Out[11]=

### Options (19)

#### Method (19)

##### WynnEpsilon (6)

Use the top-level implementation of the Wynn epsilon method:

 In[12]:=
 Out[12]=

The top-level "WynnEpsilon" method can be more accurate:

 In[13]:=
 In[14]:=
 In[15]:=
 Out[15]=

Generate partial sums of the Basel series:

 In[16]:=
 Out[16]=

With the default settings, "WynnEpsilon" does not give a good result:

 In[17]:=
 Out[17]=

Adjust the parameter of the transformation to give a better result:

 In[18]:=
 Out[18]=
 In[19]:=
 Out[19]=

Plot the relative accuracy of the transformation for various values of the parameter:

 In[20]:=
 Out[20]=
##### NSequenceLimit (4)

Use the built-in implementation of the Wynn epsilon method:

 In[21]:=
 Out[21]=

Find approximations of the limit of a sequence using different Wynn degrees:

 In[22]:=
 In[23]:=
 Out[23]=
 In[24]:=
 Out[24]=

Compare the errors:

 In[25]:=
 Out[25]=
 In[26]:=
 Out[26]=

The built-in "NSequenceLimit" method can be faster than the top-level implementation:

 In[27]:=
 In[28]:=
 Out[28]=
##### BrezinskiTheta (3)

Partial sums of the :

 In[29]:=
 Out[29]=

Apply Brezinski's ϑ-algorithm to accelerate the convergence:

 In[30]:=
 Out[30]=

Compare with the exact result:

 In[31]:=
 Out[31]=
##### Euler (6)

Partial sums of a Dirichlet series:

 In[32]:=
 Out[32]=

The Euler transformation gives better results than the default:

 In[33]:=
 Out[33]=
 In[34]:=
 Out[34]=
 In[35]:=
 Out[35]=

Partial sums of an alternating series:

 In[36]:=
 Out[36]=

Apply the Euler transformation:

 In[37]:=
 Out[37]=

Apply the Euler transformation with a different setting of the fixed ratio:

 In[38]:=
 Out[38]=

Compare both results with the exact result:

 In[39]:=
 Out[39]=

### Properties and Relations (2)

Applying SequenceLimit to the partial sums of a power series gives the same result as PadeApproximant:

 In[40]:=
 In[41]:=
 Out[41]=
 In[42]:=
 Out[42]=
 In[43]:=
 Out[43]=

SequenceLimit can be used to compute limits, just like NLimit from NumericalCalculus`:

 In[44]:=
 Out[44]=
 In[45]:=
 Out[45]=
 In[46]:=
 In[47]:=
 Out[47]=

### Possible Issues (3)

SequenceLimit can encounter numerical errors:

 In[48]:=
 Out[48]=
 In[49]:=
 Out[49]=

Sometimes the errors can be avoided by numerically disturbing the sequence or changing its precision:

 In[50]:=
 Out[50]=
 In[51]:=
 Out[51]=

SequenceLimit can give unexpected results for divergent sequences:

 In[52]:=
 Out[52]=
 In[53]:=
 Out[53]=
 In[54]:=
 Out[54]=

## Version History

• 2.1.0 – 22 December 2020
• 2.0.0 – 09 April 2020
• 1.0.0 – 03 April 2020