Padé Approximant

Author

Eric W. Weisstein
February 12, 2009

This notebook downloaded from http://mathworld.wolfram.com/notebooks/Calculus/PadeApproximant.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/PadeApproximant.html.

©2009 Wolfram Research, Inc. except for portions noted otherwise

Code

MyPadeCoefficients[c_,{xx_,xx0_,{LL_,MM_}}]:=Module[{i,j,aa,MSum,ax,x,a},
aa[L_,M_]:=Table[c[L+j+i],{j,-M+1,0},{i,0,M}];ax[L_,M_]:=Table[Sum[c[j-M+i] xx^j,{j,M-i,L}],{i,0,M}];x[L_,M_]:=Table[xx^j,{j,M,0,-1}];
Det[Append[aa[LL,MM],ax[LL,MM]]]/Det[Append[aa[LL,MM],x[LL,MM]]]
]
MyPadeApproximant[f_,{x_,x0_,{l_,m_}}]:=Module[{a},
MyPadeCoefficients[a,{x,x0,{l,m}}]/.Thread[Array[a,l+m+1,0]->CoefficientList[Series[f,{x,x0,l+m}],x]]
]

MichaelPadeApproximant[as_,M_,x_]:=(Hold@@{Hold[Det][Table[If[j≠M,as[[i+j+2]],Sum[as[[k-M+i+1]] x^k,{k,M-i,M}]],{j,0,M},{i,0,M}]]/Hold[Det][Table[If[j≠M,as[[i+j+2]],x^(M-i)],{j,0,M},{i,0,M}]]})/.Hold[Det]->Det

Algorithm

Exp

ExpandNumerator/@ExpandNumerator/@Factor/@Flatten[Table[exp[l,m]==PadeApproximant[Exp[x],{x,0,{l,m}}],{l,0,3},{m,0,3}]]//Column//TraditionalForm

MyPadeCoefficients[a,{x,0,{1,2}}]

MyPadeApproximant[Exp[x],{x,0,{1,2}}]//Factor

MyPadeApproximant[1,2]/.{a[0]->1,a[1]->1,a[2]->1/2,a[3]->1/6}//Factor

Series[Exp[x],{x,0,3}]

Cos

MyPadeCoefficients[a,{x,0,{2,2}}]

MyPadeApproximant[Cos[x],{x,0,4{1,1}}]//Factor

MichaelPadeApproximant[CoefficientList[Series[Cos[x],{x,0,8}],x],4,x]//TraditionalForm

ReleaseHold[%]//Factor

Examples

Exp

Table[PadeApproximant[Exp[x],{x,0,{j,i}}],{j,0,3},{i,0,3}]//Simplify//TableForm//TraditionalForm

Show[GraphicsArray[Partition[Table[Plot[Evaluate[Table[PadeApproximant[Exp[x],{x,0,{j,i}}],{i,0,3}]],{x,-2,2},
DisplayFunction->Identity,PlotStyle->{Red,Yellow,Green,Blue,Purple}],{j,0,3}],2]]]