MetNum7-Interpolasi Baru
MetNum7-Interpolasi Baru
Nana Ramadijanti
Interpolasi
Interpolasi Linier
f(x)
L(x)
x0
x1
Interpolasi Kudrat
L(x)
f(x)
x0
x1
x2
Interpolasi Qubic
L(x)
x0
f(x)
x1
x2
x3
Interpolasi dg
Polinomial
Table : Six equidistantly spaced points in [-1, 1]
x
1
1 25 x 2
-1.0
0.038461
-0.6
0.1
-0.2
0.5
0.2
0.5
0.6
0.1
1.0
0.038461
Interpolasi dg
Polinomial
16th Order
Polynomial
Original
Function
4th Order
Polynomial
8th Order
Polynomial
Uji Coba
Interpolasi Kuadratik
-0.52 0.128866
0.52 0.128866
01
F(x) =-3.22165x2 + 1
01
0.2 0.5
-0.2 0.5
0.8 0.058824
-0.8 0.058824
F(x) =18.3824x4-13.2353x2+ 1
Contoh 2 :
Contoh 2 :
Persamaan
-27a + 9b 3c + d = -63
7a + 9b + 3c + d = -9
-8a + 4b 2c + d = -24
d=0
Penyelesaian
X3 4x2 + 1.59872e-15X
Hasil
Interpolasi Linier
Interpolasi Linier
Contoh :
Contoh :
Example
The upward velocity of a rocket is given as a
function of time in Table 1. Find the velocity
at t=16 seconds using linear splines.
t
v(t)
m/s
10
227.04
15
362.78
20
517.35
22.5
602.97
30
901.67
Table : Velocity as a
function of time
Linear Interpolation
t 0 15,
v (t 0 ) 362.78
t1 20,
v (t1 ) 517.35
v(t ) v (t 0 )
v (t ) v(t 0 ) 1
(t t 0 )
t1 t 0
517.35 362.78
362.78
(t 15)
20 15
517.35
500
ys
f ( range)
f x desired
393.7
m/s
450
400
362.78
550
350
10
12
x s 10
0
14
16
18
x s range x desired
20
22
24
x s 10
1
Interpolasi Kuadrat
F(x) = ax2 + bx + c
Interpolasi Kuadrat
( x x 2 )( x x3 )
( x x1 )( x x3 )
( x x1 )( x x 2 )
y y1
y2
y3
( x1 x 2 )( x1 x3 )
( x 2 x1 )( x 2 x3 )
( x3 x1 )( x3 x 2 )
Contoh :
64 a + 8 b + c = 2.0794
81 a + 9 b + c = 2.1972
90.25 a + 9.5 b + c = 2.2513
Interpolasi Qubic
L(x)
x0
f(x)
x1
x2
x3
Interpolasi Qubic
Hitung a0 , a1 , a2 , dan a3
Metode Lain
Polinom Lagrange
Polinom Newton
Polinom Newton Gregory
Polinom Lagrange
( y1 y 0 )
( x x0 )
( x1 x0 )
p1 ( x) a 0 L0 ( x) a1 L1 ( x)
Dimana
a0 y 0
L0 ( x)
( x x1 )
( x0 x1 )
a1 y1
L1 ( x)
( x x0 )
( x1 x0 )
Polinom Lagrange
p n ( x) ai Li ( x) a 0 L0 ( x) a1 L1 ( x) ... a n Ln ( x)
i 0
(x x j )
( xi x j )
ai yi
Contoh :
Xi
0.0
0.4
0.8
1.2
yi
Contoh :
( x x1 )( x x 2 )( x x3 )
( x x0 )( x x 2 )( x x3 )
y1
( x0 x1 )( x0 x 2 )( x0 x3 )
( x1 x0 )( x1 x 2 )( x1 x3 )
( x x0 )( x x1 )( x x3 )
( x x0 )( x x1 )( x x 2 )
y3
( x 2 x0 )( x 2 x1 )( x 2 x3 )
( x3 x0 )( x3 x1 )( x3 x 2 )
p3 (0.5) 0.877221
y cos(0.5) 0.877583
Polinom Newton
Polinom Newton
( y1 y 0 )
p1 ( x) y 0
( x x0 )
( x1 x0 )
( x1 x0 )
( x1 x 0 )
a0 y(1)
0 f ( x0 )
(2)
Polinom Newton
p 2 ( x) a 0 a1 ( x x0 ) a 2 ( x x0 )( x x1 )
Polinom kuadratik
Atau
p 2 ( x) p1 ( x) a 2 ( x x0 )( x x1 )
f ( x 2 ) a0 a1 ( x 2 x 0 )
a2
( x 2 x 0 )( x 2 x1 )
(3)
( x 2 ) pers
f ( x10 )danf 2( xdimasukkan
Nilai a0 dan a1 fpada
pada pers 3
1 ) f ( x0 )
a2
x 2 x0
x 2 x1
x1 x 0
Polinom Newton
x 2 x1
x1 x0
f [ x 2 , x1 ] f [ x1 , x0 ]
a2
x2 x0
x 2 x0
Polinom Newton
p1 ( x) a 0 a1 ( x x0 )
p 2 ( x) p1 ( x) a 2 ( x x0 )( x x1 )
p 2 ( x) a 0 a1 ( x x0 ) a 2 ( x x0 )( x x1 )
p3 ( x) p 2 ( x) a3 ( x x 0 )( x x1 )( x x 2 )
p3 ( x) a0 a1 ( x x0 ) a2 ( x x0 )( x x1 ) a3 ( x x0 )( x x1 )( x x2 )
Polinom Newton
a1 f [ x1 , x0 ]
a 2 f [ x 2 , x1 , x0 ]
a n f [ x n , x n 1 ,..., x1 , x0 ]
f ( xi ) f ( x j )
f [ xi , x j , x k ]
xi x j
f [ xi , x j ] f [ x j , x k ]
f [ x n , x n 1 ,..., x1 , x0 ]
xi x k
f [ x n , x n 1 ,..., x1 ] f [ x n 1 , x n 2 ,..., x1 , x0 )
x n x0
Polinom Newton
Rekurens
p n ( x) p n 1 ( x) ( x x0 )( x x1 )...( x x n 1 ) f [ x n , x n 1 ,..., x1 , x0 ]
basis
p0 ( x) f ( x0 )
n
0
0
1
0
0
1
2
1
0
( x x0 )( x x1 )...( x x n 1 ) f [ x n , x n 1 ,..., x1 , x0 ]
Contoh Soal :
yi
ST-1
ST-2
ST-3
0.0
-0.4597
-0.2484 0.1466
1.0
0.5403
-0.9564
0.1913
2.0
0.4161
-0.5739
0.4551
3.0
-0.99
0.3363
4.0
0.6536
0.0880
ST-4
-0.0147
Contoh Soal :
f ( x1 ) f ( x0 ) 0.5403 1
f [ x1 , x0 ]
0.4597
( x1 x0 )
1 0
f [ x 2 , x1 ]
f ( x 2 ) f ( x1 ) 0.4161 0.5403
0.9564
( x 2 x1 )
2 1
f [ x 2 , x1 ] f [ x1 , x0 ] 0.9564 0.4597
f [ x 2 , x1 , x0 ]
0.2484
( x 2 x0 )
20
Contoh Soal :
F(2.5) = cos(2.5)=-0.8011