Function Repository Resource:

ThieleExpansion

Source Notebook

Expand a function into a Thiele continued fraction

Contributed by: Jan Mangaldan

ResourceFunction["ThieleExpansion"][f,{x,x0,n}]

generates a Thiele continued fraction expansion for f about the point x=x0 up to the nth order convergent, where n is an explicit integer.

Details and Options

ResourceFunction["ThieleExpansion"] can find the Thiele continued fraction expansion about the point x=x0 only when it can evaluate power series at that point.
ResourceFunction["ThieleExpansion"] takes the following option:
MethodAutomaticmethod to use
Possible settings for Method include "Viscovatov" and "WynnOmega", with the default being Automatic.

Examples

Basic Examples (2) 

Compute the Thiele continued fraction for the exponential function around x=0:

In[1]:=
ResourceFunction["ThieleExpansion"][Exp[x], {x, 0, 10}]
Out[1]=

Thiele continued fraction of an arbitrary function around x=a:

In[2]:=
ResourceFunction["ThieleExpansion"][f[x], {x, a, 3}]
Out[2]=

Options (2) 

Method (2) 

Use different methods for generating the Thiele expansion:

In[3]:=
ResourceFunction["ThieleExpansion"][Log[x], {x, 1, 5}, Method -> "Viscovatov"]
Out[3]=
In[4]:=
ResourceFunction["ThieleExpansion"][Log[x], {x, 1, 5}, Method -> "WynnOmega"]
Out[4]=

The two methods will give results that are mathematically equivalent but may differ in form:

In[5]:=
ResourceFunction["ThieleExpansion"][f[x], {x, a, 3}, Method -> "Viscovatov"]
Out[5]=
In[6]:=
ResourceFunction["ThieleExpansion"][f[x], {x, a, 3}, Method -> "WynnOmega"]
Out[6]=

Applications (1) 

Plot successive Thiele continued fraction approximations to exp(x):

In[7]:=
Plot[Evaluate[
  Table[ResourceFunction["ThieleExpansion"][Exp[x], {x, 0, n}], {n, 5}]], {x, -2, 2}]
Out[7]=

Properties and Relations (1) 

The Thiele expansion of order n is equivalent to the result of PadeApproximant of order {Ceiling[n/2],Floor[n/2]}:

In[8]:=
r1 = ResourceFunction["ThieleExpansion"][Exp[x], {x, 0, 7}]
Out[8]=
In[9]:=
r2 = PadeApproximant[Exp[x], {x, 0, {Ceiling[7/2], Floor[7/2]}}]
Out[9]=
In[10]:=
r1 == r2 // FullSimplify
Out[10]=

Possible Issues (2) 

Thiele expansion is not defined for even or odd functions:

In[11]:=
ResourceFunction["ThieleExpansion"][Sinc[x], {x, 0, 5}]
Out[11]=

Transform the variable to get a continued fraction expansion:

In[12]:=
ResourceFunction["ThieleExpansion"][Sinc[Sqrt[t]], {t, 0, 5}] /. t -> x^2
Out[12]=

Version History

  • 1.0.0 – 13 January 2021

Source Metadata

Related Resources

License Information