Page 323 - Matrix Analysis & Applied Linear Algebra
P. 323

5.5 Gram–Schmidt Procedure                                                         319

                                   5.5.10. Depending on how the inner products r ij are defined, verify that the fol-
                                           lowing code implements both the classical and modified Gram–Schmidt
                                           algorithms applied to a set of vectors {x 1 , x 2 ,..., x n } .
                                               For j =1 to n
                                                 u j ←− x j
                                                       For i =1 to j − 1

                                                                   u i x j    (classical Gram–Schmidt)
                                                         r ij ←−
                                                                   u i u j    (modified Gram–Schmidt)
                                                         u j ←− u j − r ij u i
                                                       End
                                                 r jj ←−  u j
                                                       If r jj =0
                                                         quit  (because x j ∈ span {x 1 , x 2 ,..., x j−1 } )
                                                       Else u j ←− u j /r jj
                                               End
                                           If exact arithmetic is used, will the inner products r ij be the same for
                                           both implementations?

                                   5.5.11. Let V be the inner-product space of real-valued continuous functions
                                           defined on the interval [−1, 1], where the inner product is defined by

                                                                          1
                                                                f g  =    f(x)g(x)dx,
                                                                        −1
                                           and let S be the subspace of V that is spanned by the three linearly
                                                                                        2
                                           independent polynomials q 0 =1,  q 1 = x,  q 2 = x .
                                              (a) Use the Gram–Schmidt process to determine an orthonormal set
                                                  of polynomials {p 0 ,p 1 ,p 2 } that spans S. These polynomials
                                                                                     45
                                                  are the first three normalized Legendre  polynomials.
                                              (b) Verify that p n satisfies Legendre’s differential equation
                                                                    2
                                                               (1 − x )y − 2xy + n(n +1)y =0


                                                  for n =0, 1, 2. This equation and its solutions are of consider-
                                                  able importance in applied mathematics.
                                 45
                                    Adrien–Marie Legendre (1752–1833) was one of the most eminent French mathematicians of
                                    the eighteenth century. His primary work in higher mathematics concerned number theory
                                    and the study of elliptic functions. But he was also instrumental in the development of the
                                    theory of least squares, and some people believe that Legendre should receive the credit that
                                    is often afforded to Gauss for the introduction of the method of least squares. Like Gauss and
                                    many other successful mathematicians, Legendre spent substantial time engaged in diligent
                                    and painstaking computation. It is reported that in 1824 Legendre refused to vote for the
                                    government’s candidate for Institut National, so his pension was stopped, and he died in
                                    poverty.
   318   319   320   321   322   323   324   325   326   327   328