Getting comfortable with objects.

The function form for a subscripted variable  [Graphics:../Images/LagrangePolyMod_gr_73.gif],  and the summation object  [Graphics:../Images/LagrangePolyMod_gr_74.gif]  can be used to construct a power series function.
For example, the coefficients for the exponential series are reciprocals of factorials.

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

[Graphics:../Images/LagrangePolyMod_gr_76.gif]
[Graphics:../Images/LagrangePolyMod_gr_77.gif]

They can be used together to make a familiar polynomial approximation to [Graphics:../Images/LagrangePolyMod_gr_78.gif].

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

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

[Graphics:../Images/LagrangePolyMod_gr_81.gif]
[Graphics:../Images/LagrangePolyMod_gr_82.gif]

Our use of the function for a subscripted variable precludes some awkward subscripts in the list of data points which we want to label with the starting subscript zero, for example [Graphics:../Images/LagrangePolyMod_gr_83.gif] for  [Graphics:../Images/LagrangePolyMod_gr_84.gif].

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

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

Note that the "points" require a data structure that is a list of "pairs" of numbers. The mathematics we use uses individual values such as [Graphics:../Images/LagrangePolyMod_gr_87.gif].  

The abscissas and ordinates are extracted with the assistance of the "Transpose" operator

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

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

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

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

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

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

Using the selection operation for matrices we can get the  [Graphics:../Images/LagrangePolyMod_gr_94.gif]  out of the "list" with the command

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

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

That's o.k. but you need to add one to the "matrix subscript" to get the desired "abscissa."  To make things nicer we used a function for a subscripted variable.

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

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

Compare this with the commands for working with "matrix subscripts."  Notice the difference in the range: 0,1,2,3,4 for the subscripted variable and 1,2,3,4,5 for the "table" which is stored in a "list."

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

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

The product object [Graphics:../Images/LagrangePolyMod_gr_101.gif]  is probably new to you.  It can be used to construct a polynomial with known roots.

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

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

[Graphics:../Images/LagrangePolyMod_gr_104.gif]
[Graphics:../Images/LagrangePolyMod_gr_105.gif]

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(c) John H. Mathews 2004