Chapter 3 Interpolation ana Polynomial Approximation 4.3 Lagrange Approximation
Chapter 3 Interpolation and Polynomial Approximation 4.3 Lagrange Approximation
Example 1.6. Consider the graph y=f(a)=cos(=)over[0.0, 1.2) (a) Use the nodes 20=0.0 and r1=1. 2 to construct a linear interpolating polynomia ial P1(r) (b) Use the nodes 0=0. 2 and = 1.0 to construct a linear approximating polynomial Q1(a) USing(1.22) with the abscissas zo=0.0 and 21=1.2 and the ordinates yo co8(0.0)=10000d01=co8(.2)=0.362358 produces P1(x)=100 x-0.0 00-15+0.362358 1.2-0.0 =-0.8333-1.2)+0.301965(x-0.0) When the nodes 0=0.2 and 21=1.0 with yo = cos(0.2)=0.980067 and =co8(1 (1.0 )=0.540302 are used, the result is x-1.0 x-0.2 Q(x)=09067 +0.540302 0.2-1.0 1.0-0.2 =-1.225083(x-1.0)+0675378(x-0.2)
y=f(x) 3 Figure 1.11(a) Figure1.11(b) Figure 1.11(a) The linear approximation of y= P1(r)where th he nodes 0=0.0 and 1.2 are the end points of the interval [a, b].( b)The linear approximation of y=Q1(a) where the nodes xo=0.2 and 11= 1.0 lie inside the interval [a, b
Table 1.6 Comparison of f(r)=cos(a )and the Linear Approximations Pi(a)and Q1() Tk f(ak)=cos(ak) Pl(ak) f(ak)-Pi(ck) Q1(k) f(ak)-Q1(ak) 0.0 1.000000 10000000.00000 1.090008 0.090008 0.1 0.995004 0.946863 0.048141 1.035037 0.040033 0.2 0.980067 0.893726 0.086340 0.980067 0.000000 0.3 0.955336 0.840589 0.114747 0.925096 0.030240 0.4 0.921061 0.787453 0.133608 0.870126 0.050935 0.5 0.877583 0.734316 0.143267 0.815155 0.062428 0.60.825336 0.681179 0.144157 0.760184 0.065151 0.7 0.764842 0.628042 0.136800 0.705214 0.059628 00 0.696707 0.544905 0.121802 0.650243 0.046463 0.621610 0.521768 0.099842 0.595273 0.026337 100.5403020.4686310.0716710.5403020.0000 110.45359604154950038102048322031736 1.2 0.362358 0.362358 0.0000004303610.068003
The generalization of(1. 25) is the construction of a polynomial of a polynomial PN(a)of degree at most N that passes through the N+1 points(co, yo), (=1, y1) (aN, JN)and has the form P()=∑LNk() where ln h is the lagrange coefficient polynomial based on these nodes x-0)…(-k-1)(-k+1)…(T-TN) IN (xk-x0)…(xk-xk-1)(xk-xk+1)…(xk-xN (1.27) It is understood that the terms (r-Tk) and(ak-ak do not appear on the right side of equation(1.27). It is approximate to introduce the product notation for(1.27) and we write N =0,≠k(-x LN k=0, #(=k-2 (1.28