Presentation is loading. Please wait.

Presentation is loading. Please wait.

Interpolation with unequal intervals

Similar presentations


Presentation on theme: "Interpolation with unequal intervals"— Presentation transcript:

1 Interpolation with unequal intervals
The disadvantage for the previous interpolation formulas is that, they are used only for equal intervals. The following are the interpolation with unequal intervals. (i) Lagrange’s formula for unequal intervals (ii) Newton’s divided difference formula 10/4/2019 Dr.G.Suresh University

2 Lagranges Interpolation formula
If y = f(x) takes the values y0, y1, y2, …, yn corresponding to x0, x1, x2, …, xn, then Which is known as Lagrange’s formula. 10/4/2019 Dr.G.Suresh University

3 Divided Differences If (x0, y0), (x1, y1), …, (xn, yn) are given points, then the first divided differences for the argument x0, x1 is defined by [x0, x1] = (y1 – y0)/ (x1 – x0) Similarly [x1, x2] = (y2 – y1)/ (x2 – x1) [x2, x3] = (y3 – y2)/ (x3 – x2) … [xn-1, xn] = (yn – yn-1)/ (xn – xn-1). 10/4/2019 Dr.G.Suresh University

4 Divided differences The second divided differences for x0, x1, x2 [x0, x1, x2]= ([x1, x2] - [x0, x1])/(x2-x0) The third divided differences x0, x1, x2 , x3 [x0, x1, x2, x3]= ([x1, x2, x3] - [x0, x1, x2])/(x3-x0) And so on … All the divided differences systematically set out in a table called divided difference table. 10/4/2019 Dr.G.Suresh University

5 Divided difference table
x f(x) 1st DD 2nd DD 3rd DD 4th DD x0 y0 [x0, x1] x1 y1 [x0, x1,x2] [x1, x2] [x0, x1,x2, x3] x2 y2 [x1, x2,x3] [x0, x1,x2, x3,x4] [x2, x3] [x1, x2,x3, x4] x3 y3 [x2, x3,x4] [x3, x4] x4 y4 10/4/2019 Dr.G.Suresh University

6 Newton’s divided difference formula
If y = f(x) takes the values y0, y1, y2, …, yn corresponding to x0, x1, x2, …, xn, then f(x) = y0+(x-x0)[x0, x1] + (x-x0)(x-x1)[x0, x1, x2] + …+(x-x0)(x-x1)…(x-xn-1)[x0, x1, x2, …, xn]. Which is known as Newton’s general interpolation formula with divided differences. 10/4/2019 Dr.G.Suresh University

7 Problem#1 Given the values Evaluate f(9), using Lagranges formula
Newton’s divided difference formula Ans : 810 X : 5 7 11 13 17 f(x): 150 392 1452 2366 5202 10/4/2019 Dr.G.Suresh University

8 Divided difference formula
x f(x) 1st DD 2nd DD 3rd DD 4th DD 5 150 121 7 392 24 265 1 11 1452 32 457 13 2366 42 709 17 5202 10/4/2019 Dr.G.Suresh University

9 Problem#2 Determine f(x) as a polynomial in x for the following data, using Newton’s divided difference formula Ans: f(x)=3x4-5x3+6x2-14x+5. x -4 -1 2 5 f(x) 1245 33 9 1335 10/4/2019 Dr.G.Suresh University

10 Divided difference table
x f(x) 1st DD 2nd DD 3rd DD 4th DD -4 1245 -404 -1 33 94 -28 -14 5 10 3 2 13 9 88 442 1335 10/4/2019 Dr.G.Suresh University

11 Problem#3 The following table gives the viscosity of an oil as a function of temperature. Using Lagrange’s formula find viscosity of oil at a temperature of 140o. Ans : 7.03 TemperatureO: 110 130 160 190 Viscosity: 150 392 1452 2366 10/4/2019 Dr.G.Suresh University

12 Problem#4 Apply Newton’s divided difference formula, evaluate f(8) and f(15) . Ans : f(8) = 448, f(15) = 3150 x 4 5 7 10 11 13 f(x) 48 100 294 900 1210 2028 10/4/2019 Dr.G.Suresh University

13 Problem#5 Certain corresponding values of x and log10x are given below
Calculate log10310, using Lagrange’s formula Newton’s divided difference formula. Ans : by both formulae. x : 300 304 305 307 log10x : 2.4771 2.4829 2.4843 2.4871 10/4/2019 Dr.G.Suresh University

14 Inverse interpolation formula
The process of estimating the value of x for a value y is called the inverse interpolation. By interchanging x and y in Lagrange’s formula, is called inverse interpolation formula. 10/4/2019 Dr.G.Suresh University

15 Problem#1 The following table gives the values of x and y : Calculate the value of x corresponding to y=12, using Lagranges technique. Ans : 3.55 X : 1.2 2.1 2.8 4.1 4.9 6.2 f(x): 4.2 6.8 9.8 13.4 15.5 19.6 10/4/2019 Dr.G.Suresh University

16 Problem#2 Apply Lagrange’s formula inversely to obtain a root of the equation f(x)=0, given that f(30)=-30, f(34)=-13, f(38)=3, and f(42)=18. Ans : 37.23 10/4/2019 Dr.G.Suresh University


Download ppt "Interpolation with unequal intervals"

Similar presentations


Ads by Google