Download presentation
Presentation is loading. Please wait.
Published byEmory Chapman Modified over 9 years ago
1
Lecture 22 Numerical Analysis
2
Chapter 5 Interpolation
3
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
5
Thus Similarly
6
Shift operator, E
7
The inverse operator E -1 is defined as Similarly,
8
Average Operator,
9
Differential Operator, D
10
Important Results
11
Newton’s Forward Difference Interpolation Formula
12
Let y = f (x) be a function which takes values f (x 0 ), f (x 0 + h), f (x 0 +2h), …, corresponding to various equi- spaced values of x with spacing h, say x 0, x 0 + h, x 0 + 2h, …. Suppose, we wish to evaluate the function f (x) for a value x 0 + ph, where p is any real number, then for any real number p, we have the operator E such that
14
This is known as Newton’s forward difference formula for interpolation, which gives the value of f (x 0 + ph) in terms of f (x 0 ) and its leading differences.
15
This formula is also known as Newton-Gregory forward difference interpolation formula. Here p=(x-x 0 )/h. An alternate expression is
16
Exercise Find a cubic polynomial in x which takes on the values -3, 3, 11, 27, 57 and 107, when x = 0, 1, 2, 3, 4 and 5 respectively.
17
Solution Here, the observations are given at equal intervals of unit width. To determine the required polynomial, we first construct the difference table
18
Difference Table
19
Since the 4 th and higher order differences are zero, the required Newton’s interpolation formula
20
Here,
21
Substituting these values into the formula, we have The required cubic polynomial.
22
NEWTON’S BACKWARD DIFFERENCE INTERPOLATION FORMULA
23
For interpolating the value of the function y = f (x) near the end of table of values, and to extrapolate value of the function a short distance forward from y n, Newton’s backward interpolation formula is used
24
Derivation Let y = f (x) be a function which takes on values f (x n ), f (x n -h), f (x n -2h), …, f (x 0 ) corresponding to equispaced values x n, x n -h, x n -2h, …, x 0. Suppose, we wish to evaluate the function f (x) at (x n + ph),
25
where p is any real number, then we have the shift operator E, such that Binomial expansion yields,
26
That is,
27
This formula is known as Newton’s backward interpolation formula. This formula is also known as Newton’s-Gregory backward difference interpolation formula.
28
If we retain (r + 1)terms, we obtain a polynomial of degree r agreeing with f (x) at x n, x n-1, …, x n-r. Alternatively, this formula can also be written as Here
29
Example For the following table of values, estimate f (7.5).
30
Solution The value to be interpolated is at the end of the table. Hence, it is appropriate to use Newton’s backward interpolation formula. Let us first construct the backward difference table for the given data
31
Difference Table
32
Since the 4 th and higher order differences are zero, the required Newton’s backward interpolation formula is
33
In this problem,
34
Example The sales for the last five years is given in the table below. Estimate the sales for the year 1979
35
Solution Newton’s backward difference table for the given data as -3
36
In this example, and
37
Newton’s interpolation formula gives Therefore,
38
LAGRANGE’S INTERPOLATION FORMULA
39
Newton’s interpolation formulae developed earlier can be used only when the values of the independent variable x are equally spaced. Also the differences of y must ultimately become small.
40
If the values of the independent variable are not given at equidistant intervals, then we have the basic formula associated with the name of Lagrange which will be derived now.
41
Lecture 22 Numerical Analysis
42
Let y = f (x) be a function which takes the values, y 0, y 1,…y n corresponding to x 0, x 1, …x n. Since there are (n + 1) values of y corresponding to (n + 1) values of x, we can represent the function f (x) by a polynomial of degree n.
43
Suppose we write this polynomial in the form. or in the form
44
Here, the coefficients a k are so chosen as to satisfy this equation by the (n + 1) pairs (x i, y i ). Thus we get Therefore,
45
Similarly, we obtain and
46
Substituting the values of a 0, a 1, …, a n we get The Lagrange’s formula for interpolation
47
This formula can be used whetherthe values x 0, x 2, …, x n are equally spaced or not. Alternatively, this can also be written in compact form as This formula can be used whether the values x 0, x 2, …, x n are equally spaced or not. Alternatively, this can also be written in compact form as
48
Where, We can easily observe that, and Thus introducing Kronecker delta notation
49
Further, if we introduce the notation That is is a product of (n + 1) factors. Clearly, its derivative contains a sum of (n + 1) terms in each of which one of the factors of will be absent.
50
We also define, which is same as except that the factor (x–x k ) is absent. Then But, when x = x k, all terms in the above sum vanishes except P k (x k )
51
Hence,
52
Finally, the Lagrange’s interpolation polynomial of degree n can be written as
53
Example Find Lagrange’s interpolation polynomial fitting the points y(1) = -3, y(3) = 0, y(4) = 30, y(6) = 132. Hence find y(5).
54
Solution The given data can be arranged as
55
Using Lagrange’s interpolation formula, we have
56
On simplification, we get which is required Lagrange’s interpolation polynomial. Now, y(5) = 75.
57
Example Given the following data, evaluate f (3) using Lagrange’s interpolating polynomial.
58
Solution Using Lagrange’s formula,
59
Therefore
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.