Page 286 - Numerical Analysis Using MATLAB and Excel
P. 286

Chapter 7  Finite Differences and Interpolation


                Continuing with the above procedure, we obtain a new quotient whose degree is one less than
                preceding quotient and therefore, the process of finding new quotients and remainders terminates
                after n +(  1 )  steps.
                The general form of a factorial polynomial is


                               p x() =  r +  r x()  1 () + r x()  2 ()  +  … +  r n –  1  x () (  n –  1 )  +  r x()  n ()  (7.28)
                                                     2
                                        0
                                            1
                                                                                 n
                                n
                and from (7.16) and (7.22),
                                                              j
                                                             Δ p 0()
                                                                n
                                                   r =  a =  -------------------                       (7.29)
                                                    j
                                                         j
                                                               j!
                or
                                                      j
                                                     Δ p 0() =  j!r j                                  (7.30)
                                                        n
                Example 7.3
                Express the algebraic polynomial
                                                              3
                                                         4
                                                px() =  x – 5x +  3x +  4                              (7.31)
                as a factorial polynomial. Then, construct the difference table with h =  . 1
                Solution:

                Since the highest power of the given polynomial px()   is  , we must evaluate the remainders
                                                                         4
                r r r r,,,  3  and  ; then, we will use (7.28) to determine p x() . We can compute the remainders
                               r
                                4
                 0
                                                                        n
                      2
                   1
                by long division, but for convenience, we will use the MATLAB deconv(p,q) function which
                divides the polynomial p by q.
                The MATLAB script is as follows:
                px=[1  −5  0  3  4];            % Coefficients of given polynomial
                d0=[1  0];                      % Coefficients of first divisor, i.e, x
                [q0,r0]=deconv(px,d0)           % Computation of first quotient and remainder
                d1=[1  −1];                     % Coefficients of second divisor, i.e, x−1
                [q1,r1]=deconv(q0,d1)           % Computation of second quotient and remainder
                d2=[1  −2];                     % Coefficients of third divisor, i.e, x−2
                [q2,r2]=deconv(q1,d2)           % Computation of third quotient and remainder
                d3=[1  −3];                     % Coefficients of fourth divisor, i.e, x−3
                [q3,r3]=deconv(q2,d3)           % Computation of fourth quotient and remainder
                d4=[1  −4];                     % Coefficients of fifth (last) divisor, i.e, x−4
                [q4,r4]=deconv(q3,d4)           % Computation of fifth (last) quotient and remainder
                q0 =



               7−8                              Numerical Analysis Using MATLAB® and Excel®, Third Edition
                                                                             Copyright © Orchard Publications
   281   282   283   284   285   286   287   288   289   290   291