Page 271 - A Course in Linear Algebra with Applications
P. 271

7.4:  The  Method  of Least  Squares         255


              Here it is assumed  that  we are working  in the  inner  prod-
         uct  space  C[—1,  1] where  < , g  > = J_ x  f(x)g(x)dx.  Let S
                                       /
         denote the  subspace  consisting  of all quadratic  polynomials  in
         x.  An  orthonormal  basis  for  S was  found  in  Example  7.3.6:


                          1    ,      [3         3>/5,  2   1-


                                                         x
         By  7.4.7 the  least  squares  approximation  to e  in S is  simply
                             x
         the  projection  of e  on  S;  this  is  given  by the  formula
                      x
                                        x
                                                         x
              p =  < e , h  > h  + < e , h   > h   + < e , h   > h-
         Evaluating  the  integrals  by  integration  by  parts,  we  obtain

                                                  x
                 <e',/i>     =  ^  J.   \      <e J 2>=V6e-     1

         and
                              x
                                                     1
                          <e ,h>      =     J\{e-le- ).
         The  desired  approximation  to e x  is  therefore

                                  1                          2
               P=\(e-e-')+3e- x          +      ^(e-7e-')(x -±).

         Alternatively  one  can  calculate  the  projection  by using  the
                               2
         standard  basis  1, x,x .


         Exercises   7.4
         1.  Find  least  squares solutions  of the  following  linear  systems:

                                xi   + x 2          = 0

                                          2  +  X3  =
                          (a) I         °°            °
                              * xi   -  x 2  -  x 3  = 3
                                £i           +  ^3  = 0
   266   267   268   269   270   271   272   273   274   275   276