

















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


















J. Robert Buchanan
Department of Mathematics
Fall 2006
Often choose polynomials to approximate other classes of functions. Theorem (Weierstrass Approximation Theorem) If f ∈ C[ a , b ] and ǫ > 0 then there exists a polynomial P such that | f ( x ) − P ( x )| < ǫ, ∀ x ∈ [ a , b ].
We have used Taylor polynomials to approximate functions. P ( x ) =
∑^ n
k = 0
f ( k )( x 0 ) k! ( x − x 0 ) k
Away from x 0 the approximation may be very poor.
Example
If xi = i for i = 0 , 1 , 2 then we can create three different Lagrange Basis Polynomials.
L 2 , 0 ( x ) = x − 1 0 − 1
x − 2 0 − 2
( x − 1 )( x − 2 )
L 2 , 1 ( x ) = x − 0 1 − 0
x − 2 1 − 2
= x ( 2 − x )
L 2 , 2 ( x ) =
x − 0 2 − 0
x − 1 2 − 1
x ( x − 1 )
-1 1 2 3 x
1
2
3
y
Let f ( x ) = sin x , n = 3, and xk = k π/3 for k = 0 , 1 , 2 , 3. The four Lagrange Basis Polynomials are listed below.
L 3 , 0 ( x ) =
2 π^3
(π − 3 x )( 2 π − 3 x )(π − x )
L 3 , 1 ( x ) =
2 π^3
x ( 2 π − 3 x )(π − x )
L 3 , 2 ( x ) = −
2 π^3
x (π − 3 x )(π − x )
L 3 , 3 ( x ) =
2 π^3 x (π − 3 x )( 2 π − 3 x )
The Lagrange Interpolating Polynomial of degree 3 for f ( x ) = sin x and xk = k π/3 for k = 0 , 1 , 2 , 3 is
P ( x ) = (sin 0) L 3 , 0 ( x ) +
sin π 3
L 3 , 1 ( x ) +
sin 2 π 3
L 3 , 2 ( x )
=
4 π^2 x (π − x )
Theorem Suppose x 0 , x 1 ,... , xn are distinct numbers in the interval [ a , b ] and suppose f ∈ C n +^1 [ a , b ]. Then for each x ∈ [ a , b ] there exists a number z ≡ z ( x ) ∈ ( a , b ) for which
f ( x ) = P ( x ) + f ( n +^1 )( z ( x )) ( n + 1 )!
( x − x 0 )( x − x 1 ) · · · ( x − xn ),
where P ( x ) is the Lagrange Interpolating Polynomial.
Example Suppose we are preparing a table of values for cos x on [ 0 , π]. The entries in the table will have eight accurate decimal places and we will linearly interpolate between adjacent entries to determine intermediate values. What should the spacing between adjacent x -values be to preserve the eight-decimal-place accuracy in the interpolation?
Suppose we had only the following table of data for f ( x ):
x f ( x )
Approximate f ( 27. 5 ) using polynomial interpolation. Linear approximation:
f ( 22. 2 )+
f ( 32. 0 ) ≈ 0. 46009
Quadratic approximation: (two choices)
P 2 ( 27. 5 ) =
f ( 10. 1 )
f ( 22. 2 )
f ( 32. 0 ) ≈ 0. 46141
f ( 22. 2 )
f ( 32. 0 )
f ( 41. 6 )+ ≈ 0. 46200
There are also two potential cubic interpolating polynomials and a single quartic polynomial.
Definition
If f is a function defined at x 0 , x 1 ,... , xn distinct real numbers and m 1 , m 2 ,... , mk are k distinct integers with 0 ≤ mi ≤ n , then the Lagrange polynomial that agrees with f at the k points xm 1 , xm 2 ,... , xmk is denoted Pm 1 , m 2 ,··· , mk.
Theorem
Let f be defined at x 0 , x 1 ,... , xk and xi and xj be two distinct real numbers in this set. Then the kth^ degree Lagrange polynomial that interpolates f at x 0 , x 1 ,... , xk is
P ( x ) =
( x − xj ) ( xi − xj )
P 0 , 1 ,..., j − 1 , j + 1 ,..., k ( x )− ( x − xi ) ( xi − xj )
P 0 , 1 ,..., i − 1 , i + 1 ,..., k ( x ).
Proof.
Let Q ( x ) = P 0 , 1 ,..., j − 1 , j + 1 ,..., k ( x ) and Q ˆ( x ) = P 0 , 1 ,..., i − 1 , i + 1 ,..., k ( x ), then
P ( x ) =
( x − xj ) Q ( x ) − ( x − xi ) Q ˆ( x ) ( xi − xj )
If x = xi , then P ( xi ) = Q ( xi ) = f ( xi ). If x = xj , then
P ( xj ) = Q ˆ( xj ) = f ( xj ). If l ∈ { 0 , 1 ,... , k } with i 6 = l 6 = j then
P ( xl ) =
( xl − xj ) Q ( xl ) − ( xl − xi ) Q ˆ( xl ) ( xi − xj )
=
( xl − xj ) f ( xl ) − ( xl − xi ) f ( xl ) ( xi − xj )
= f ( xl ).
Thus P ( x ) is a polynomial of degree at most k + 1 which interpolates f ( x ) at xi for i = 0 , 1 ,... , k and thus
P ( x ) = P 0 , 1 ,..., k ( x ).
Given x 0 , x 1 ,... , xn and f ( x 0 ), f ( x 1 ),... f ( xn ) we can arrange the Lagrange interpolating polynomials in the following table. x 0 f ( x 0 ) = P 0 = Q 0 , 0 x 1 f ( x 1 ) = P 1 = Q 1 , 0 P 0 , 1 = Q 1 , 1 x 2 f ( x 2 ) = P 2 = Q 2 , 0 P 1 , 2 = Q 2 , 1 P 0 , 1 , 2 = Q 2 , 2 ... ... ... ... xn f ( xn ) = Pn = Qn , 0 Pn − 1 , n = Qn , 1 Pn − 2 , n − 1 , n = Qn , 2 · · · P 0 , 1 ,..., n = Qn , n
Approximate f ( 27. 5 ) from the following data.
xi f ( xi )