|
(x - x1)(x - x2)....(x
- xn)
|
|
(x - x0)(x - x2)....(x
- xn)
|
|
f(x) = |
|
f(x0)
+ |
|
f(x1)
+ |
|
(x0 - x1)(x0
- x2).....(x0 -
xn)
|
|
(x1 - x0)(x1
- x2).....(x1 -
xn)
|
|
|
|
|
|
|
|
|
|
(x - x0)(x - x1)....(x
- xn-1)
|
|
|
|
............ |
|
f(xn)
|
|
|
|
(xn - x0)(xn
- x1)......(xn -
xn-1)
|
|
f(x) = f(x0) + (x - x0)Df(x0)
+ (x - x0)(x - x1)D2f(x0)
+ (x - x0)(x - x1)(x - x2)D3f(x0)
+ ..........
Q. 9. A table of x versus f(x) is given below.
Using any one of the interpolation formulae (Lagrange's/Newton's
etc.), find the value of f(x) at x = 4 : (June
1999)
x |
1.5 |
3 |
6 |
f(x) |
-0.25 |
2 |
20 |
Solution. Given, x = 4, x0 = 1.5,
x1 = 3, x2 = 6, f(x0)
= -0.25, f(x1) = 2, f(x2) =
20
Using Lagrange’s Formula
|
(x - x1)(x - x2)
|
|
(x - x0)(x - x2)
|
|
(x - x0)(x - x1)
|
|
f(x) = |
|
f(x0)
+ |
|
f(x1)
+ |
|
f(x2) |
|
(x0 - x1)(x0
- x2)
|
|
(x1 - x0)(x1
- x2)
|
|
(x2 - x0)(x2
- x1)
|
|
|
(4 - 3)(4 - 6)
|
|
(4 - 1.5)(4 - 6)
|
|
(4 - 1.5)(4 - 3)
|
|
f(4) = |
|
X (-0.25)
+ |
|
X (2) + |
|
X (20) |
|
(1.5 - 3)(1.5 - 6)
|
|
(3 - 1.5)(3 - 6)
|
|
(6 - 1.5)(6 - 3)
|
|
or f(4) = 6 (approx.)
Using Newton's Divided Difference Formula
The difference table is shown below:
x |
f(x) |
Df(x) |
D2f(x) |
1.5 |
-0.25 |
[2 - (-0.25)]/(3
- 1.5) = 1.5
(20 - 2)/(6 - 3) = 6 |
(6 - 1.5)/(6
- 1.5) = 1 |
3 |
2 |
6 |
20 |
Here, Df(x0)
= 1.5, D2f(x0)
= 1
f(x) = f(x0) + (x - x0)Df(x0)
+ (x - x0)(x - x1)D2f(x0)
f(4) = (-0.25) + [(4 - 1.5) X 1.5] + [(4 - 1.5) X
(4 - 3) X 1]
or f(4) = 6
|