Function Repository Resource:

# RichardsonExtrapolate

Calculate an accelerated version of a symbolic sequence

Contributed by: József Konczer
 ResourceFunction["RichardsonExtrapolate"][expr,m,k,n] gives the mth order Richardson extrapolation of expr with respect to k using n as the independent variable of the transformed sequence. ResourceFunction["RichardsonExtrapolate"][expr,{g1,…,gm},k,n] uses auxiliary sequences g1,…,gm. ResourceFunction["RichardsonExtrapolate"][list, m] gives the mth order Richardson extrapolation of list. ResourceFunction["RichardsonExtrapolate"][list,{g1,…,gm}] uses auxiliary lists g1,…,gm.

## Details and Options

Richardson extrapolation is a linear sequence transfomation. In the simplest case, it projects out constituents from the sequence A[n], which can expressed by Cramer’s rule, or by the explicit formula below:
The method can be generalized by introducing auxiliary sequences g1[n],g2[n],,gM[n], which can be projected out by using Cramer's rule (or using the so-called BrezinskiE) shown below:
ResourceFunction["RichardsonExtrapolate"] can take following options:
 Method "BrezinskiE" method to use "MinWorkingPrecision" 0 minimum precision to use
Supported options for Method are "BrezinskiE", "LinearSolve" and "Cramer".
If an entry has less precision than the value of "MinWorkingPrecision", then its precision is set to "MinWorkingPrecision" by SetPrecision.
ResourceFunction["RichardsonExtrapolate"] uses Block to localize values or variables.

## Examples

### Basic Examples (4)

Find a sequence which converges to the same limit faster than the input sequence:

 In[1]:=
 Out[1]=

Given the first few terms of a sequence, find terms of another sequence with accelerated convergence:

 In[2]:=
 Out[2]=

Accelerate the convergence of the sequence by specifying the auxiliary sequences:

 In[3]:=
 Out[3]=

Give a finite list and specify auxiliary lists:

 In[4]:=
 Out[4]=

### Options (5)

#### Method (3)

The default Method is "BrezinskiE", which uses a recursive definition:

 In[5]:=
 Out[5]=

The Method "Cramer" calculates determinants:

 In[6]:=
 Out[6]=

Use "LinearSolve":

 In[7]:=
 Out[7]=

Compare the method outputs in a table:

 In[8]:=
 Out[8]=

They are all equivalent:

 In[9]:=
 Out[9]=

"BrezinskiE" is generally faster than the "LinearSolve" and "Cramer" methods for sequences and lists:

 In[10]:=
 Out[10]=

"BrezinskiE" and "LinearSolve" perform similarly on lists, while the "Cramer" Method is slower:

 In[11]:=
 Out[11]=

#### MinWorkingPrecision (2)

Set "MinWorkingPrecision", which applies SetPrecision on entries that have smaller Precision than the specified value:

 In[12]:=
 In[13]:=
 Out[13]=

In numeric calculations, the "Cramer" Method preserves higher Precision:

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

### Applications (6)

Calculate the convergence of the Basel series:

 In[17]:=
 Out[17]=

Accelerate the convergence with RichardsonExtrapolate and plot a comparison:

 In[18]:=
 Out[20]=

Calculate the convergence of the Leibniz formula for :

 In[21]:=
 Out[21]=

Accelerate the convergence and plot a comparison:

 In[22]:=
 Out[24]=

Calculate the convergence of Stirling's formula:

 In[25]:=
 Out[25]=

Numerically verify the convergence using different orders:

 In[26]:=
 Out[26]=

Numerically approximate the Zeta[1.2] function:

 In[27]:=
 Out[27]=

Use RichardsonExtrapolate with different orders to attempt to accelerate the convergence:

 In[28]:=
 Out[30]=

Plot a comparison when the sequence has more terms:

 In[31]:=
 Out[33]=

Compute :

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

Accelerate a (left) Riemann sum approximating :

 In[36]:=
 In[37]:=
 Out[37]=

Approximate the PolyLog[2,z] function from only 3 terms in its Taylor expansion:

 In[38]:=
 In[39]:=
 Out[39]=

Use an auxiliary sequence:

 In[40]:=
 Out[40]=

Compare the approximations with the original function in a plot:

 In[41]:=
 Out[41]=

### Properties and Relations (5)

RichardsonExtrapolate is linear:

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

RichardsonExtrapolate reduces the length of a List:

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

If a sequence a[k] is convergent, then a[k] and its transformed version both converge to the same limit:

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

RichardsonExtrapolate can accelerate the convergence of logarithmic sequences:

 In[79]:=
 Out[80]=
 In[81]:=
 Out[81]=

RichardsonExtrapolate can eliminate series coefficients from the asymptotic expansion of a sequence:

 In[82]:=
 Out[82]=
 In[83]:=
 Out[83]=

### Possible Issues (2)

A failure to find the appropriate auxiliary sequence can cause divergent behavior:

 In[84]:=
 Out[84]=
 In[85]:=
 Out[85]=

Use an appropriate auxiliary sequence:

 In[86]:=
 Out[86]=

Numeric errors can have a dramatic effect on the results:

 In[87]:=
 Out[88]=

### Neat Examples (2)

Consider the PrimeZetaP[2] partial sums:

 In[89]:=
 Out[89]=
 In[90]:=
 Out[90]=

Approximate with RichardsonExtrapolate and compare the results:

 In[91]:=
 Out[92]=

Compare the limits in a table:

 In[93]:=
 Out[93]=

Approximate the Eigenvalues of an operator by a sequence of truncated matrix representations:

 In[94]:=
 Out[95]=
 In[96]:=
 Out[97]=

Accelerate the convergence using RichardsonExtrapolate:

 In[98]:=
 Out[98]=

#### Approximating the ground state of the antiferromagnetic Heisenberg spin chain (4)

Construct the Hamiltonian of the model, which is a 2n×2n dimensional matrix, where n is the length of the spin chain:

 In[99]:=

Calculate the ground state energy density by exact diagonalization:

 In[100]:=
 Out[101]=

Use Richardson Extrapolation to estimate the thermodynamic limit as n:

 In[102]:=
 Out[103]=
 In[104]:=
 Out[104]=

Compare the results with the exact ground state:

 In[105]:=
 Out[105]=
 In[106]:=
 Out[106]=

Jozsef Konczer

## Version History

• 1.0.0 – 28 January 2021