Presentation is loading. Please wait.

Presentation is loading. Please wait.

Numerical Analysis Lecture 25.

Similar presentations


Presentation on theme: "Numerical Analysis Lecture 25."— Presentation transcript:

1 Numerical Analysis Lecture 25

2 Chapter 5 Interpolation

3 Finite Difference Operators Newton’s Forward Difference
Finite Difference Operators Newton’s Forward Difference Interpolation Formula Newton’s Backward Difference Interpolation Formula Lagrange’s Interpolation Formula Divided Differences Interpolation in Two Dimensions Cubic Spline Interpolation

4 Newton’s Forward Difference Interpolation Formula

5

6 An alternate expression is

7 NEWTON’S BACKWARD DIFFERENCE INTERPOLATION FORMULA

8 The formula is,

9 Alternatively form Here

10 LAGRANGE’S INTERPOLATION FORMULA

11 The Lagrange Formula for Interpolation

12 Alternatively compact form

13 Also

14 Finally, the Lagrange’s interpolation polynomial of degree n can be written as

15 DIVIDED DIFFERENCES

16 Let us assume that the function y = f (x) is known for several values of x, (xi, yi), for i=0,1,..n. The divided differences of orders 0, 1, 2, …, n are now defined recursively as:

17 The zero-th order divided difference

18 The first order divided difference is defined as

19 Second order divided difference

20 Generally

21 Standard format of the Divided Differences

22 NEWTON’S DIVIDED DIFFERENCE INTERPOLATION FORMULA

23 Let y = f (x) be a function which takes values y0, y1, …, yn corresponding to x = xi, i = 0, 1,…, n. We choose an interpolating polynomial, interpolating at x = xi, i = 0, 1, …, n in the following form

24 Here, the coefficients ak are so chosen as to satisfy above equation by the (n + 1) pairs (xi, yi). Thus, we have

25 The first equation gives
The second equation gives

26 Third equation yields which can be rewritten as that is

27 Thus, in terms of second order divided differences, we have
Similarly, we can show that

28 Newton’s divided difference interpolation formula

29 Newton’s divided differences can also be expressed in terms of forward, backward and central differences.

30 Assuming equi-spaced values of abscissa, we have

31 By induction, we can in general arrive at the result

32 Similarly

33 In general, we have

34 Also, in terms of central differences, we have

35 In general, we have the following pattern

36 Example Find the interpolating polynomial by (i) Lagrange’s formula and (ii) Newton’s divided difference formula for the following data. Hence show that they represent the same interpolating polynomial. X 1 2 4 Y 5

37 Solution The divided difference table for the given data is constructed as follows:
X Y 1st divided difference 2nd divided difference 3rd divided difference 1 2 1/2 -1/2 4 5 3/2 1/6

38 (i) Lagrange’s interpolation formula gives

39 (ii) Newton’s divided difference formula gives
We observe that the interpolating polynomial by both Lagrange’s and Newton’s divided difference formulae is one and the same.

40 Note! Newton’s formula involves less number of arithmetic operations than that of Lagrange’s.

41 Example Using Newton’s divided difference formula, find the quadratic equation for the following data. Hence find y (2). X 1 4 y 2

42 Solution: The divided difference table for the given data is constructed as:
x y 1st divided difference 2nd divided difference 2 1 -1 1/2 4

43 Now, using Newton’s divided difference formula, we have
Hence, y (2) = 1.

44 Example A function y = f (x) is given at the sample points x = x0, x1 and x2. Show that the Newton’s divided difference interpolation formula and the corresponding Lagrange’s interpolation formula are identical.

45 Solution For the function y = f (x), we have the data

46 The interpolation polynomial using Newton’ divided difference formula is given as

47 Using the definition of divided differences, we can rewrite the equation in the form

48 On simplification, it reduces to
which is the Lagrange’s form of interpolation polynomial. Hence two forms are identical.

49 Newton’s Divided Difference Formula with Error Term

50 Following the basic definition of divided differences, we have for any x

51 Multiplying the second Equation by (x – x0), third by (x – x0)(x – x1) and so on, and the last by (x – x0)(x – x1) … (x – xn-1) and adding the resulting equations, we obtain

52 Please note that for x = x0, x1, …, xn, the error term vanishes
Where Please note that for x = x0, x1, …, xn, the error term vanishes

53 Numerical Analysis Lecture 25


Download ppt "Numerical Analysis Lecture 25."

Similar presentations


Ads by Google