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

Solution 3 (b).

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



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

 

 

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



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

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

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

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

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

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

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

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

 

 

We are done.

Let us investigate the linear system involved in this example.

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



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

 

 

We are really done.  

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

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



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

This is the same as we obtained previously.  

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(c) John H. Mathews 2005