Example 4.  Find the rational approximation [Graphics:Images/RationalApproxMod_gr_295.gif]for [Graphics:Images/RationalApproxMod_gr_296.gif]  over the interval [-1,1].  
4 (a).  Use equally spaced interpolation nodes.

Solution 4 (a).

Set up the formula for  [Graphics:../Images/RationalApproxMod_gr_297.gif].

[Graphics:../Images/RationalApproxMod_gr_298.gif]



[Graphics:../Images/RationalApproxMod_gr_299.gif]


Calculate the equally spaced values for the  [Graphics:../Images/RationalApproxMod_gr_300.gif] interpolation nodes.   

[Graphics:../Images/RationalApproxMod_gr_301.gif]

[Graphics:../Images/RationalApproxMod_gr_302.gif]

Form the  [Graphics:../Images/RationalApproxMod_gr_303.gif] ordinates.  

[Graphics:../Images/RationalApproxMod_gr_304.gif]

[Graphics:../Images/RationalApproxMod_gr_305.gif]

Form the set of  [Graphics:../Images/RationalApproxMod_gr_306.gif] equations to solve and find the solution.
Remark.   Since  Tan[x]  is an odd function we will add the equation  [Graphics:../Images/RationalApproxMod_gr_307.gif] to the list.

[Graphics:../Images/RationalApproxMod_gr_308.gif]



[Graphics:../Images/RationalApproxMod_gr_309.gif]


Form the rational approximation.

[Graphics:../Images/RationalApproxMod_gr_310.gif]



[Graphics:../Images/RationalApproxMod_gr_311.gif]


Plot graphs of the function and its rational approximation over the interval  [-1,1].  

[Graphics:../Images/RationalApproxMod_gr_312.gif]


[Graphics:../Images/RationalApproxMod_gr_313.gif]

[Graphics:../Images/RationalApproxMod_gr_314.gif]


Find the error  over the interval  [-1,1].  

[Graphics:../Images/RationalApproxMod_gr_315.gif]


[Graphics:../Images/RationalApproxMod_gr_316.gif]

[Graphics:../Images/RationalApproxMod_gr_317.gif]


Comparison with the Taylor approximation.  

There were 9 coefficients to determine for the rational approximation, and a Maclaurin polynomial of degree 8 requires 9 coefficients.
Compare with the error in a [Graphics:../Images/RationalApproxMod_gr_318.gif] degree Maclaurin polynomial over the interval  [Graphics:../Images/RationalApproxMod_gr_319.gif].  

[Graphics:../Images/RationalApproxMod_gr_320.gif]


[Graphics:../Images/RationalApproxMod_gr_321.gif]

[Graphics:../Images/RationalApproxMod_gr_322.gif]



[Graphics:../Images/RationalApproxMod_gr_323.gif]


[Graphics:../Images/RationalApproxMod_gr_324.gif]

[Graphics:../Images/RationalApproxMod_gr_325.gif]


We can determine how much smaller the error is for the rational approximation.

[Graphics:../Images/RationalApproxMod_gr_326.gif]



[Graphics:../Images/RationalApproxMod_gr_327.gif]


Comparison with the Padé approximation.  

[Graphics:../Images/RationalApproxMod_gr_328.gif]


[Graphics:../Images/RationalApproxMod_gr_329.gif]

[Graphics:../Images/RationalApproxMod_gr_330.gif]



[Graphics:../Images/RationalApproxMod_gr_331.gif]


[Graphics:../Images/RationalApproxMod_gr_332.gif]

[Graphics:../Images/RationalApproxMod_gr_333.gif]


We can determine how much smaller the error is for the rational approximation.

[Graphics:../Images/RationalApproxMod_gr_334.gif]



[Graphics:../Images/RationalApproxMod_gr_335.gif]

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(c) John H. Mathews 2004