Interpolation Extrapolation
Interpolation Extrapolation
5
+
+122
INTERPOLATION & EXTRAPOLATION
x 2 6 8
Find f(9) using the given table Y=f(x) 46 102 122
9
+
+122
INTERPOLATION & EXTRAPOLATION
x X0 x1 X2
Lagrange’s interpolation formula Y=f(x) y0 y1 y2
For y
y
x = (y-y1)(y-y2)x0 +
(y0-y1)(y0-y2)
+ (y-y0)(y-y2)x1
(y1-y0)(y1-y2)
+ (y-y0)(y-y1)x2
(y2-y0)(y2-y1)
INTERPOLATION & EXTRAPOLATION
x 2 6 8
Find x for which f(x) = 130 Y=f(x) 46 102 122
130
x
+
+
x 8.88421
1)Given the values
x 5 7 11 13 17
F(x) 150 392 1452 2366 5202
+
++
++
++
+
1)Given the values
x 5 7 11 13 17
F(x) 150 392 1452 2366 5202
Find f(x)
2 + 9x
-4 x
=
f(x)
swer
An
#
3/ 3
)= 4
0
y(1
swer
An
#
#
x 1 3 4 6
y(x) -3 9 30 132
#
f(x)=(1)(-1)(-2)(43)
(-2)(-4)(-5)
+(3)(-1)(-2)(65)
(2)(-2)(-3)
+(3)(1)(-2)(159)
(4)(2)(-1)
+(3)(1)(-1)(248)
(5)(3)(1)
f(x)=100
#
Newton’s forward interpolation formula
And
Newton’s backward interpolation formula
Forward difference table
x 2 4 6 8 10
F(x) 4.8 8.4 14.5 23.6 36.2
Forward difference table
x 2 4 6 8 10
F(x) 4.8 8.4 14.5 23.6 36.2
X0
Forward difference table is
x f(x) ∆f(x) ∆2f(x) ∆3f(x) ∆4f(x)
2 4.8 3.6 2.5 0.5 0
4 8.4 6.1 3.0 0.5
6 14.5 9.1 3.5
8 23.6 12.6
10 36.2
Backward difference table
x 2 4 6 8 10
F(x) 4.8 8.4 14.5 23.6 36.2
xn
Backward difference table is
x f(x) Vf(x) V2f(x) V3f(x) V4f(x)
2 4.8
4 8.4 3.6
6 14.5 6.1 2.5
8 23.6 9.1 3.0 0.5
10 36.2 12.6 3.5 0.5 0
Newton forward difference formula
p = x-x0
h
Where h = constant interval of x
i.e. h= x1-x0,h=x2-x1-----------
Newton forward difference formula
p = x-x0
h
F(x) = f(x0)+p∆f(x0)+p(p-1) ∆ f(x0)
2
2!
+p(p-1)(p-2) ∆3f(x0)+ -------
3!
Newton backward difference formula
p = x-xn
h
F(x) = f(xn)+pVf(xn)+p(p+1) V f(xn)
2
2!
+p(p+1)(p+2) V3f(xn)+ -------
3!
Find f(3) from the following table
X 2 4 6 8 10
F(x) 4.8 8.4 14.5 23.6 36.2
Find f(3) from the following table
X 2 4 6 8 10
F(x) 4.8 8.4 14.5 23.6 36.2
p=(x-x0)/h = (x-0)/1 = x
f(x)=f(x)+p∆f(x)+p(p-1) ∆2f(x)/2!+p(p-1)(p-2) ∆3f(x)/3!
= 1+x(1)+x(x-1)(-2)/2 + x(x-1)(x-2)(12)/6
= 1+x+(x2-x)(-1)+x(x2-3x+2)(2)
= 1+x-x2+x+2x3-6x2+4x
f(x) = 2x3-7x2+6x+1
#
Answer is f(1.6)=5.44
#
#
f(100)=382.
Linear Interpolation
X1 Y1
X2 Y2
To find
X3 Y3
Linear Interpolation
X1 Y1
X2 Y2
To find
X3 Y3
( y3 y1)( x 2 x1)
By Linear Interpolation y 2 y1
( x3 x1)
y 2 y1
y 2 y1 ( y3 y1)
y 2 y1 ( y3 y1)( x 2 x1)
( y3 y1)( x 2 x1)
y 2 y1
( x3 x1)
From the following table find displacement when draught is 4.25 m.
Displaceme M.C.T.C. K.M. (T) K.M. (L)
Draught - nt (Metric T.P.C.I. (Moment L.C.B. L.C.F. V.C.B. Transverse Longl.
(Tonnes F.W.D. of F.W.D. of
B.K. Tonnes) i.e. to change Above Base Meta- Meta-
per cm. AP AP
(Meters) 1000 Trim one (Metres) center A.B. centre A.B.
Kilograms Immersion) cm) (Meters) (Meters) (Meters) (Meters)
2.8 5063 20.72 145.2 72.946 73.117 1.496 12.152 415.4
3.6 6746 21.38 155.2 72.992 73.145 1.93 10.478 332.5 metric tonnes
3.8 7174 21.5 157.1 73 73.145 2.038 10.154 317
4.25
4.4 ?
8473 21.82 162.4 73.017 73.06 2.366 9.386 278.4