INTERPOLASI
Interpolasi digunakan untuk menentukan y pasangan suatu x jika diberikan beberapa
data, ilustrasinya pada gambar di bawah ini :
1. INTERPOLASI LINEAR
Diberikan 2 data yaitu (x , f(x )) dan (x , f(x )). Interpolasi linear digunakan untuk
menentukan nilai fungsi dari suatu x yaitu f(x) dimana x ∈ [x , x ] dengan
pendekatan suatu garis lurus . Dengan menggunakan persamaan garis yang melalui
2 titik yaitu (x , f(x )) dan (x , f(x )) maka diperoleh rumus interpolasi linear yaitu
f(x) − f(x ) x−x
=
f(x ) − f(x ) x − x
atau
f(x ) − f(x )
f (x) = f(x ) + (x − x )
x −x
Simbol f (x) digunakan untuk menandakan bahwa penentuan nilai f(x)
menggunakan interpolasi linear.
Contoh :
Diberikan data sbb :
x 0 1,5
f(x ) 1 3,945
Tentukan f(1,3) dengan interpolasi linear !
Jawab :
f(1,5) − f(0)
f(1,3) = f(0) + (1,3 − 0)
1,5 − 0
3,945 − 1
f(1,3) = 1 + (1,3 − 0)
1,5 − 0
sehingga diperoleh nilai f(1,3) = 3,5523.
2. INTERPOLASI KUADRAT
Diberikan 3 data yaitu (x , f(x )), (x , f(x )) dan (x , f(x )). Interpolasi kuadrat
digunakan untuk menentukan nilai fungsi dari suatu x yaitu f(x) dimana x ∈ [x ,x ]
dengan pendekatan suatu fungsi kuadrat. Dengan menggunakan persamaan fungsi
kuadrat yang melalui 3 titik yaitu (x , f(x )) , (x , f(x )) dan (x , f(x )) maka
diperoleh rumus interpolasi kuadrat yaitu
f(x ) − f(x )
f (x) = f(x ) + (x − x )
x −x
f(x ) − f(x ) f(x ) − f(x )
x −x − x −x
+ (x − x )(x − x )
x −x
Simbol f (x) digunakan untuk menandakan bahwa penentuan nilai f(x)
menggunakan interpolasi kuadrat atau interpolasi polinomial derajat 2.
Contoh :
Diberikan data sbb :
x 0 0,5 1,5
f(x ) 1 2,119 3,945
Tentukan f(1,3) dengan interpolasi kuadrat !
Jawab :
f(0,5) − f(0)
f(1,3) = f(0) + (1,3 − 0)
0,5 − 0
f(1,5) − f(0,5) f(0,5) − f(0)
−
1,5 − 0,5 0,5 − 0
+ (1,3 − 0)(1,3 − 0,5)
1,5 − 0
sehingga diperoleh nilai f(1,3) = 3,623746.
3. INTERPOLASI POLINOMIAL NEWTON
Diberikan n data yaitu (x , f(x )), (x , f(x )), …., dan (x , f(x )). Interpolasi
polinomial derajat n digunakan untuk menentukan nilai fungsi dari suatu x yaitu f(x)
dimana x ∈ [x ,x ] dengan pendekatan suatu fungsi polinomial derajat n. Rumus
interpolasi polinomial derajat n adalah sbb :
f (x) = b + b (x − x )
+ b (x − x )(x − x )+. . . +b (x − x )(x − x ) … (x − x )
Dengan :
b = f(x )
b = f[x , x ]
b = f[x , x , x ]
:
:
b = f[x , x , . . . . , x ]
Dan
f(x ) − f(x )
f[x , x ] =
x −x
f[x , x ] − f[x , x ]
f[x , x , x ] =
x −x
:
:
f[x , x , . . , x ] − f[x ,x ,..,x ]
f[x , x , . . . , x ] =
x −x
Contoh :
Diberikan data sbb :
x 0 0,5 1 1,5
f(x ) 1 2,119 2,910 3,945
Tentukan f(1,3) dengan interpolasi polinomial derajat 3!
Jawab :
f (1,3) = b + b (1,3 − 0) + b (1,3 − 0)(1,3 − 0,5)
+ b (1,3 − 0)(1,3 − 0,5)(1,3 − 1)
Dengan :
b = f(x ) = 1
f(x ) − f(x ) 2,119 − 1
b = f[x , x ] = = = 2,238
x −x 0,5 − 0
f(x ) − f(x ) f(x ) − f(x )
f[x , x ] − f[x , x ] x −x − x −x
b = f[x , x , x ] = =
x −x x −x
2,910 − 2,119 2,119 − 1
−
1 − 0,5 0,5 − 0
= = −0,656
1−0
f[x , x , x ] − f[x , x , x ]
b = f[x , x , x , x ] =
x −x
f[x , x ] − f[x , x ] f[x , x ] − f[x , x ]
x −x − x −x
=
x −x
f(1,5) − f(1) f(1) − f(0,5)
−
1,5 − 1 1 − 0,5
− (−0,656)
1,5 − 0,5
=
1,5 − 0
3,945 − 2,910 2,910 − 2,119
−
1,5 − 1 1 − 0,5
− (−0,656)
1,5 − 0,5
= = 0,7626
1,5 − 0
Sehingga
f (1,3) = 1 + 2,238(1,3 − 0) + (−0,656)(1,3 − 0)(1,3 − 0,5)
+ 0,7626(1,3 − 0)(1,3 − 0,5)(1,3 − 1) = 3,4651
4. INTERPOLASI LAGRANGE
Diberikan n data yaitu (x , f(x )), (x , f(x )), …., dan (x , f(x )). Interpolasi
Lagrange derajat n digunakan untuk menentukan nilai fungsi dari suatu x yaitu f(x)
dimana x ∈ [x ,x ] dengan pendekatan rumus sebagai berikut :
f (x) = L (x). f(x )
dengan
(x − x )
L (x) =
(x − x )
Contoh :
Diberikan data sbb :
x 0 0,5 1 1,5
f(x ) 1 2,119 2,910 3,945
Tentukan f(1,3) dengan interpolasi Lagrange derajat 3!
Jawab :
f (1,3) = L (1,3). f(x )
= L (1,3). f(x ) + L (1,3). f(x ) + L (1,3). f(x ) + L (1,3). f(x )
Dengan
(x − x )(x − x )(x − x )
L (x) =
(x − x )(x − x )(x − x )
(x − x )(x − x )(x − x )
L (x) =
(x − x )(x − x )(x − x )
(x − x )(x − x )(x − x )
L (x) =
(x − x )(x − x )(x − x )
(x − x )(x − x )(x − x )
L (x) =
(x − x )(x − x )(x − x )
Jika x=1,3 maka
(1,3 − 0,5)(1,3 − 1)(1,3 − 1,5)
L (1,3) = = 0,064
(0 − 0,5)(0 − 1)(0 − 1,5)
(1,3 − 0)(1,3 − 1)(1,3 − 1,5)
L (1,3) = = −0,312
(0,5 − 0)(0,5 − 1)(0,5 − 1,5)
(1,3 − 0)(1,3 − 0,5)(1,3 − 1,5)
L (1,3) = = 0,832
(1 − 0)(1 − 0,5)(1 − 1,5)
(1,3 − 0)(1,3 − 0,5)(1,3 − 1)
L (1,3) = = 0,416
(1,5 − 0)(1,5 − 0,5)(1,5 − 1)
Sehingga diperoleh
f (1,3) = L (1,3). f(x ) + L (1,3). f(x ) + L (1,3). f(x ) + L (1,3). f(x ) =
0,064. f(0) + (−0,312). f(0,5) + 0,832. f(1) + 0,416. f(1,5) = 0,064.1 +
(−0,312).2,119 + 0,832.2,91 + 0,416.3,945 = 0,064 −
0,661128+2,42112+1,64112=3,465112
LATIHAN
Diberikan data sbb :
x 0 0,5 1 1,5
f(x ) 1 2,119 2,910 3,945
Tentukan f(0,6) dengan menggunakan interpolasi :
1. Linear
2. Kuadrat
3. Polinomial derajat 3
4. Lagrange derajat 3