lagrange's interpolation formula

2
LAGRANGE'S INTERPOLATION FORMULA This is again an N th degree polynomial approximation formula to the function f(x), which is known at discrete points x i , i = 0, 1, 2 . . . N th . The formula can be derived from the Vandermonds determinant but a much simpler way of deriving this is from Newton's divided difference formula. If f(x) is approximated with an N th degree polynomial then the N th divided difference of f(x) constant and (N+1) th divided difference is zero. That is f [x 0 , x 1 , . . . x n , x] = 0 From the second property of divided difference we can write f 0 + f n f x = 0 + . . . + (x 0 - x 1 ) . . . (x 0 - x n )(x 0 - x) (x n - x 0 ) . . . (x n - x n-1 )(x n - x) (x - x 0 ) . . . (x - x n ) or (x - x 1 ) . . . (x - x n ) (x - x 0 ) . . . (x - x n-1 ) f(x) = f 0 + . . . + f n (x 0 - x 1 ) . . . (x 0 - x n ) (x n - x 0 ) . . . (x n - x n-1 ) n ( n )f i S | | x - x j j = 0 (x i - x j ) i = 0 j ¹ 1 Since Lagrange's interpolation is also an N th degree polynomial approximation to f(x) and the N th degree polynomial passing through (N+1) points is unique hence the Lagrange's and Newton's divided difference approximations are one and the same. However, Lagrange's formula is more convinent to use in computer programming and Newton's divided difference formula is more suited for hand calculations. Example : Compute f(0.3) for the data x 0 1 3 4 7 f 1 3 49 129 813 using Lagrange's interpolation formula (Analytic value is 1.831) (x - x 1 ) (x - x 2 )(x- x 3 )(x - x 4 ) (x - x 0 )(x - x 1 ) (x - x 2 )(x - x 3 ) f(x) = f 0 + . . . + f 4 (x 0 - x 1 ) (x 0 - x 2 )(x 0 - x 3 )(x 0 - x 4 ) (x 4 - x 0 )(x 4 - x 1 )(x 4 - x 2 )(x 4 - x 3 )

Upload: mani-kumar

Post on 22-Oct-2015

10 views

Category:

Documents


0 download

DESCRIPTION

l

TRANSCRIPT

Page 1: Lagrange's Interpolation Formula

LAGRANGE'S INTERPOLATION FORMULA

This is again an Nth degree polynomial approximation formula to the function f(x), which is known

at discrete points xi, i = 0, 1, 2 . . . Nth. The formula can be derived from the Vandermonds

determinant but a much simpler way of deriving this is from Newton's divided difference formula. If

f(x) is approximated with an Nth degree polynomial then the Nth divided difference of f(x)

constant and (N+1)th divided difference is zero. That is

f [x0, x1, . . . xn, x] = 0

From the second property of divided difference we can write

f0 +

fn fx = 0+ . . . +

(x0 - x1) . . . (x0 - xn)(x0 - x) (xn - x0) . . . (xn - xn-1)(xn - x) (x - x0) . . . (x - xn)

or

(x - x1) . . . (x - xn) (x - x0) . . . (x - xn-1)

f(x) = f0 + . . . + fn (x0 - x1) . . . (x0 - xn) (xn - x0) . . . (xn - xn-1)

n

( n

)fi

S| | x - xj

j = 0 (xi - xj)

i = 0 j ¹ 1

Since Lagrange's interpolation is also an Nth degree polynomial approximation to f(x) and the Nth

degree polynomial passing through (N+1) points is unique hence the Lagrange's and Newton'sdivided difference approximations are one and the same. However, Lagrange's formula is moreconvinent to use in computer programming and Newton's divided difference formula is more suitedfor hand calculations.

Example : Compute f(0.3) for the data

x 0 1 3 4 7

f 1 3 49 129 813

using Lagrange's interpolation formula (Analytic value is 1.831)

(x - x1) (x - x2)(x- x3)(x - x4) (x - x0)(x - x1) (x - x2)(x - x3)

f(x) = f0+ . . . + f4 (x0 - x1) (x0 - x2)(x0 - x3)(x0 - x4) (x4 - x0)(x4 - x1)(x4 - x2)(x4 - x3)

Page 2: Lagrange's Interpolation Formula

(0.3 - 1)(0.3 - 3)(0.3 - 4)(0.3 - 7) (0.3 - 0)(0.3 - 3)(0.3 - 4)(0.3 - 7) = 1+ 3 + (-1) (-3)(-4)(-7) 1 x (-2)(-3)(-6)

(0.3 - 0)(0.3 - 1)(0.3 - 4)(0.3 - 7) (0.3 - 0)(0.3 - 1)(0.3 - 3)(0.3 - 7)

49 + 129 + 3 x 2 x (-1)(-4) 4 x 3 x 1 (-3)

(0.3 - 0)(0.3 - 1)(0.3 - 3)(0.3 - 4)

8137 x 6 x 4 x 3

= 1.831

Solution of Transcendental Equations | Solution of Linear System of Algebraic Equations | Interpolation & Curve Fitting Numerical Differentiation & Integration | Numerical Solution of Ordinary Differential Equations

Numerical Solution of Partial Differential Equations

search