Example 3.  Compare the "discrete least squares approximation" and "continuous least squares approximation," on the interval  [Graphics:Images/LegendrePolyMod_gr_88.gif].  
3 (a).  Use the function  [Graphics:Images/LegendrePolyMod_gr_89.gif].  

Solution 3 (a).

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



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

 

 

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



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

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

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

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

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

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

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

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

 

 

We are done.

Let us investigate the linear system involved in this example.

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



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

 

 

We are really done.  

Aside.  We can calculate the coefficients  [Graphics:../Images/LegendrePolyMod_gr_104.gif]  by directly setting up the matrix  [Graphics:../Images/LegendrePolyMod_gr_105.gif] vector [Graphics:../Images/LegendrePolyMod_gr_106.gif].  This is just for fun !  

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



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

This is the same as we obtained previously.  

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(c) John H. Mathews 2005