Download presentation
Presentation is loading. Please wait.
1
Numerical Analysis Lecture 26
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
DIVIDED DIFFERENCES
5
The zero-th order divided difference
6
The first order divided difference is defined as
7
Second order divided difference
8
Generally
9
NEWTON’S DIVIDED DIFFERENCE INTERPOLATION FORMULA
10
Newton’s divided difference interpolation formula
11
Newton’s divided differences can also be expressed in terms of forward, backward and central differences.
12
In terms of forward differences
13
In terms of backward differences
14
In terms of central differences
15
Newton’s Divided Difference Formula with Error Term
16
Following the basic definition of divided differences, we have for any x
17
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
18
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
19
Error Term in Interpolation Formulae
We know, if y (x) is approximated by a polynomial Pn (x) of degree n then the error is given by where,
20
Alternatively it is also expressed as
Now, consider a function F (x), such that Determine the constant K in such a way that F(x) vanishes for x = x0, x1, …, xn and also for an arbitrarily chosen point , which is different from the given (n + 1) points.
21
Let I denotes the closed interval spanned by the values
Let I denotes the closed interval spanned by the values Then F (x) vanishes (n + 2) times in the interval I. By Rolle’s theorem vanishes at least (n + 1) times in the interval I, at least n times, and so on.
22
Eventually, we can show that
Eventually, we can show that vanishes at least once in the interval I, say at Thus, we obtain Since Pn(x) is a polynomial of degree n, its (n + 1)th derivative is zero. Also, from the definition of
23
Therefore, we get Hence for some in the interval I.
24
Further more, we observe that
Thus the error committed in replacing y (x) by either Newton’s divided difference formula or by an identical Lagrange’s formula is
25
INTERPOLATION IN TWO DIMENSIONS
26
Let u be a polynomial function in two variables, say x and y, in particular quadratic in x and cubic in y, which in general can be written as
27
This relation involves many terms
This relation involves many terms. If we have to write a relation involving three or more variables, even low degree polynomials give rise to long expressions. If necessary, we can certainly write, but such complications can be avoided by handling each variable separately.
28
If we let x, a constant, say x = c, the equation simplifies to the form
Now we adopt the following procedure to interpolate at a point (1, m) in a table of two variables, by treating one variable a constant say x = x1. The problem reduces to that of a single variable interpolation.
29
Any one of the methods discussed in preceding sections can then be applied to get f (x1, m). Then we repeat this procedure for various values of x say x = x2, x3, …, xn keeping y constant. Thus, we get a new table with y constant at the value y = m and with x varying. We can then interpolate at x = 1.
30
Example Tabulate the values of the function f (x) = x2+y2-y
for x = 0,1,2,3,4 and y = 0,1,2,3,4. Using the table of the values, compute f(2.5, 3.5) by numerical double interpolation
31
Solution The values of the function for the given values of the given values of x and y are given in the following table X …… y…. 1 2 3 4 6 12 7 13 10 16 9 11 15 21 18 22 28
32
Cont! Using quadratic interpolation in both x and y directions we need to consider three points in x and y directions. To start with we have to treat one variable as constant, say x. Keeping x = 2.5, y = 3.5 as near the center of the set, we choose the table of values corresponding to x = 1,2, 3 and y = 2, 3, 4.
33
Cont ! The region of fit for the construction of our interpolation polynomial is shown in different color in the table X …… y…. 1 2 3 4 6 12 7 13 10 16 9 11 15 21 18 22 28
34
Cont ! Thus using Newton’s forward difference formula, we have
At x = 1 Y f 2 3 7 4 13 6
35
Cont ! Similarly At x = 2 Y f 2 6 3 10 4 16
36
Cont ! Similarly At x = 3 Y f 2 11 3 15 4 21 6
37
Cont !
38
Cont !
39
Cont ! Therefore we arrive at the following result At y=3.5 X f 1 9.75
2 12.75 3 17.75 5
40
Cont !
41
Cont ! And hence no error in interpolation !!!
From the functional relation, we also find that And hence no error in interpolation !!!
42
Numerical Analysis Lecture 26
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.