Next by using lagrange interpolation formula with n 3

This preview shows page 32 - 37 out of 37 pages.

Next by using Lagrange interpolation formula with n = 3 we compute the third Chebyshev interpolant to f ( x ) in [0 , π/ 2]: P 3 ( x ) = - 0 . 1142626757x 3 - 0 . 0664780874x 2 + 1 . 022703023x - 0 . 0011308801 . (b) Obviously f (4) ( x ) = sin( x ) M 4 , [0 ,π/ 2] = 1. Then ( n = 3) max x [0 ,π/ 2] | f ( x ) - P 3 ( x ) | ≤ 1 4! ( π/ 2 - 0) 4 2 7 = 0 . 001981793031 . On the first plot below are the graphs of f ( x ) = sin( x ) and P 3 ( x ) in [0 , π/ 5]. We see that the Chebyshev Polynomial Interpolation Approximant P 3 ( x ) and f ( x ) almost co- incide. On the second plot is the graph of the absolute approximation error: | f ( x ) - P 3 ( x ) | .
32
Plot of f ( x ) and P 3 ( x ) on [0 , π/ 2] . Plot of the absolute approximation error | f ( x ) - P 3 ( x ) | . 33
Runge’s Example. The Magic of the Chebyshev Interpolants. Here is a famous example due to Runge. Consider the function f ( x ) = 1 1 + 25 x 2 , x [ - 1 , 1] . Denote by P n ( x ) the n -th polynomial interpolant to f ( x ) based on the ( n +1) equally spaced nodes in [ - 1 , 1]: x k = - 1 + (2 k ) /n, k = 0 , 1 , . . . , n . Denote by ˜ P n ( x ) the n -th Chebyshev polynomial interpolant in [ - 1 , 1] to f ( x ) based on the ( n + 1) Chebyshev nodes in [ - 1 , 1]: x k = cos [(2 k + 1) π/ (2 n + 2)] , k = 0 , 1 , . . . , n . Then: lim n →∞ max x [ - 1 , 1] | f ( x ) - P n ( x ) | = but lim n →∞ max x [ - 1 , 1] | f ( x ) - ˜ P n ( x ) | = 0 . Verify experimentally the above limits by plotting the actual absolute errors: | f ( x ) - P n ( x ) | , | f ( x ) - ˜ P n ( x ) | , x [ - 1 , 1] for n = 5 , 10 , 15 , 20 , 25 , 30. Use CAS Maple in your computations. 34
Piece-wise linear interpolant S n ( x ) to approximate a function f ( x ) on a given interval [ a, b ] ). Take the ( n + 1) equally spaced interpolation nodes: x k = a + k ( b - a ) n , k = 0 , 1 , . . . , n on the interval [ a, b ]. In the interval [ x k , x k +1 ], S n ( x ) is equal to the first La- grange interpolating polynomial to f ( x ) based on the 2 data ( x k , f ( x k )) , ( x k +1 , f ( x k +1 )), where k = 0 , 1 , . . . , n - 1. Graphically, in the interval [ x k , x k +1 ], S n ( x ) is the line-segment connecting the points ( x k , f ( x k )) , ( x k +1 , f ( x k +1 )). Problem 5.12. Show that, max x [ a,b ] | f ( x ) - S n ( x ) | ≤ M 2 2! ( b - a ) 2 4 n 2 = M 2 ( b - a ) 2 8 n 2 . Problem 5.13. Suppose that a table of functional values { f ( x k ) } n k =0 for the function f ( x ) = e - x 2 and x in the interval [ - 1 , 1] is to be prepared by using 4-digit rounding arithmetic. Determine a positive integer n that permits to compute approximately f ( x ) by using the piecewise linear interpolant S n ( x ) for all x [ - 1 , 1]: f ( x ) S n ( x ) with an absolute approximation error less than 10 - 5 .
35
Legendre Polynomials. Minimization of the Interpolation Error with respect to the Euclidean Distance. Legendre Polynomials. Legendre polynomials ˜ L n ( x ) = [( x 2 - 1) n ] ( n ) n !2 n , n = 0 , 1 , 2 , 3 , . . .

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture