Anda di halaman 1dari 7

1.

Pengertian Interpolasi- Interpolasi Polinomial


Inte rpolasi adalah suatu cara untuk mencari nilai di antara beberapa titik data yang
telah diketahui. Dalam kehidupan sehari- hari ,interpolasi dapat digunakan untuk
memperkirakan suatu fungsi dimana fungsi tersebut tidak terdefinisi dengan suatu
formula, tetapi didefinisikan hanya dengan data- data atau table yang tersedia.
Ada berbagai macam interpolasi berdasarkan fungsinya, di antaranya adalah
interpolasi linier, interpolasi kuadrat, interpolasi newton da n inte rpolasi
lagrange. Dengan berbagai macam metode antara lain metode Newton dan metode
Lagrange , namun disini kita akan membahas dengan metode Newton.
a. Inte rpolasi Linier
Sebuah bentuk interpolasi yang paling sederhana dengan menghubungkan dua buah
titik data dengan garis lurus. Lihat gambar berikut

Gambar 1.Interpolasi Polinomial

Gambar 2. Interpolasi Linier


Diketahui nilai suatu fungsi di titik x 0 dan x 1 , yaitu f (x 0 ) dan f (x 1 ). Dengan
metode interpolasi linier akan dicari nilai fungsi di titik x, yaitu f 1 (x). Indeks 1
pada f 1 (x) menunjukkan bahwa interpolasi dilakukan dengan interpolasi
polinomial order satu.
Dari dua segitiga sebangun ABC dan ADE seperti tampak dalam Gambar 2,
BC DE
terdapat hubungan berikut: 
AB AD

f1 ( x)  f ( x0 ) f ( x1 )  f ( x0 )

x  x0 x1  x0

f (x1 )  f (x 0 )
f1 ( x )  f ( x 0 )  (x  x 0 )
x1  x 0

f 1 (x) = a0 + a1 (x – x0 ) ....................................... (1.1)


Persamaan (1.1) adalah rumus interpolasi linier, yang merupakan bentuk
interpolasi polinomial order satu. Suku [f (x 1 )  f (x0 )] / (x 1  x0 ) adalah
kemiringan garis yang menghubungkan dua titik data dan merupakan perkiraan
beda hingga dari turunan pertama. Semakin kecil interval antara titik data, hasil
perkiraan akan semakin baik.

b. Inte rpolasi Kuadratik

Terdapat strategi untuk memperbaiki taksiran dengan memperkenalkan suatu


kelengkungan ke garis yang menghubungkan titik- titik tersebut. Dengan
tersedianya tiga buah titik data, maka dapat dilaksanakannya dengan polinom
orde kedua (polinom kuadrat).
f 2 (x) = a0 + a1 (x – x0 ) + a2 (x – x 0 )(x – x1 ) .....................................
(1.2)

Dari persamaan 1.2 diatas kita substitusikan titik-titik (x0 , f (x0 )), (x1 , f (x1 )), dan (x2 ,
f (x2 )) ke persamaan tersebut, di mana 𝑥 0 ≠ 𝑥 1 ≠ 𝑥 2 .

𝑓2 𝑥 = 𝑎0 + 𝑎1 𝑥 − 𝑥 0 + 𝑎2 (𝑥 − 𝑥 0 )(𝑥 − 𝑥 1 )

𝑓 𝑥 0 = 𝑎0 + 𝑎1 𝑥 0 − 𝑥 0 + 𝑎2 𝑥 0 − 𝑥 0 𝑥0 − 𝑥 1

𝑓 𝑥 0 = 𝑎0 + 𝑎1 0 + 𝑎2 0 𝑥0 − 𝑥 1

𝑎0 = 𝑓 𝑥 0

= 𝑓[𝑥 0 ]
𝑓 𝑥 1 = 𝑎0 + 𝑎1 𝑥1 − 𝑥 0 + 𝑎2 𝑥 1 − 𝑥 0 𝑥1 − 𝑥 1

𝑓 𝑥 1 = 𝑓 𝑥 0 + 𝑎1 𝑥1 − 𝑥 0 + 𝑎2 𝑥 1 − 𝑥 0 0

𝑎1 𝑥1 − 𝑥 0 = 𝑓 𝑥 1 − 𝑓 𝑥 0

𝑓 𝑥 1 − 𝑓(𝑥 0 )
𝑎1 = = 𝑓[𝑥 0 , 𝑥 1 ]
𝑥1 − 𝑥0

𝑓 𝑥 2 = 𝑎0 + 𝑎1 𝑥 2 − 𝑥 0 + 𝑎2 𝑥 2 − 𝑥 0 𝑥2 − 𝑥 1

𝑓 𝑥1 − 𝑓 𝑥 0
𝑓 𝑥2 = 𝑓 𝑥0 + 𝑥 2 − 𝑥 0 + 𝑎2 𝑥 2 − 𝑥 0 𝑥2 − 𝑥 1
𝑥1 − 𝑥0

𝑎2 𝑥 2 − 𝑥 0 𝑥 2 − 𝑥 1
𝑓 𝑥1 − 𝑓 𝑥 0
= 𝑓 𝑥2 − 𝑓 𝑥0 + 𝑓 𝑥1 − 𝑓 𝑥1 − 𝑥2 − 𝑥0
𝑥1 − 𝑥0

𝑓 𝑥2 − 𝑓 𝑥1 𝑓 𝑥1 − 𝑓 𝑥0
𝑎2 𝑥 2 − 𝑥 0 = 𝑥2 − 𝑥1 + 𝑥1 − 𝑥 0
𝑥2 − 𝑥1 𝑥1 − 𝑥0
𝑓 𝑥1 − 𝑓 𝑥0
− 𝑥2 − 𝑥0
𝑥1 − 𝑥0

𝑓 𝑥2 − 𝑓 𝑥1 𝑓 𝑥1 − 𝑓 𝑥0 𝑥1 − 𝑓 𝑥 1 − 𝑓 𝑥 0 𝑥0
= 𝑥2 − 𝑥1 +
𝑥2 − 𝑥1 𝑥1 − 𝑥0
𝑓 𝑥1 − 𝑓 𝑥0 𝑥2 − 𝑓 𝑥 1 − 𝑓 𝑥 0 𝑥0

𝑥1 − 𝑥0

𝑓 𝑥2 − 𝑓 𝑥1 𝑓 𝑥1 − 𝑓 𝑥0
= 𝑥2 − 𝑥1 − 𝑥2 − 𝑥1
𝑥2 − 𝑥1 𝑥1 − 𝑥0

𝑓 𝑥2 − 𝑓 𝑥1 𝑓 𝑥1 − 𝑓 𝑥0
𝑎2 𝑥 2 − 𝑥 0 = −
𝑥2 − 𝑥1 𝑥1 − 𝑥0

𝑓 𝑥2 − 𝑓 𝑥1 𝑓 𝑥1 − 𝑓 𝑥0

𝑥2 − 𝑥1 𝑥1 − 𝑥0
𝑎2 =
𝑥2 − 𝑥0
𝑓[𝑥1 , 𝑥 2 ] − 𝑓[𝑥 0 , 𝑥 1 ]
=
𝑥2 − 𝑥0
Telah di jelaskan mengenai cara mencari 𝑓1 𝑥 𝑑𝑎𝑛 𝑓2 𝑥 dimana pola yang kita
ketahui dapat di susun seperti di bawah ini:
𝑓1 𝑥 = 𝑎0 + 𝑎1 𝑥 − 𝑥 0
𝑓2 𝑥 = 𝑎0 + 𝑎1 𝑥 − 𝑥 0 + 𝑎2 𝑥 − 𝑥 0 𝑥 − 𝑥 1
𝑓3 𝑥 = 𝑎0 + 𝑎1 𝑥 − 𝑥 0 + 𝑎2 𝑥 − 𝑥 0 𝑥 − 𝑥 1 +𝑎3 𝑥 − 𝑥 0 𝑥 − 𝑥 1 𝑥 − 𝑥 2
⋮ ⋮
𝑓𝑛 𝑥 = 𝑎0 + 𝑎1 𝑥 − 𝑥 0 + 𝑎2 𝑥 − 𝑥 0 𝑥 − 𝑥 1 + ⋯ + 𝑎𝑛 𝑥 − 𝑥 0 𝑥 − 𝑥 1 ⋯ (𝑥
− 𝑥 𝑛−1 )
Nilai konstanta 𝑎0 , 𝑎1 , 𝑎2 , 𝑎3 ⋯ , 𝑎𝑛 merupakan nilai selisih-terbagi, dengan nilai
masing- masing:
𝑎0 = 𝑓 𝑥 0
𝑎1 = 𝑓 𝑥 0 , 𝑥 1
𝑎2 = 𝑓 𝑥 0, 𝑥1 , 𝑥 2
𝑎3 = 𝑓 𝑥 0, 𝑥1 , 𝑥 2 , 𝑥 3

𝑎𝑛 = 𝑓 𝑥 0, 𝑥1 , 𝑥 2 , 𝑥 3 , ⋯ , 𝑥 𝑛
Dimana dalam hal ini:
𝑓 𝑥 1 − 𝑓(𝑥 0 )
𝑓 𝑥0 , 𝑥1 =
𝑥1 − 𝑥0
𝑓 𝑥1 , 𝑥 2 − 𝑓(𝑥 0 , 𝑥 1 )
𝑓 𝑥0 , 𝑥1 , 𝑥2 =
𝑥2 − 𝑥0

𝑓 𝑥 1 , 𝑥 2 , 𝑥 3 − 𝑓(𝑥 0 , 𝑥 1 , 𝑥 2 )
𝑓 𝑥0 , 𝑥1 , 𝑥2 , 𝑥3 =
𝑥3 − 𝑥0

𝑓 𝑥 1 , ⋯ , 𝑥 𝑛−1 , 𝑥 𝑛 − 𝑓(𝑥 0 , ⋯ , 𝑥 𝑛−2 , 𝑥 𝑛−1 )


𝑓 𝑥 0 , 𝑥 1 , ⋯ , 𝑥 𝑛−1 , 𝑥 𝑛 =
𝑥𝑛 − 𝑥0
Karena tetapan 𝑎0 , 𝑎1 , 𝑎2 , 𝑎3 ⋯ , 𝑎𝑛 merupakan nilai selisih terbagi, maka polinom
newton dinamakan juga polinom interpolasi selisih terbagi Newton. Nilai selisih
terbagi ini dapat dihitung dengan menggunakan tabel yang disebut tabel selisih
terbagi,misalnya tabel selisih terbagi untuk empat buah titik (n = 3) berikut:

i 𝑥𝑖 𝑓(𝑥 𝑖 ) ST-1 ST-2 ST-3

0 𝑥0 𝑓(𝑥 0 ) 𝑓 𝑥0 , 𝑥1 𝑓 𝑥0 , 𝑥1 , 𝑥2 𝑓 𝑥0 , 𝑥1 , 𝑥2 , 𝑥3

1 𝑥1 𝑓(𝑥1 ) 𝑓 𝑥1 , 𝑥 2 𝑓 𝑥1 , 𝑥2 , 𝑥3

2 𝑥2 𝑓(𝑥 2 ) 𝑓 𝑥2 , 𝑥3

3 𝑥3 𝑓(𝑥 3 )

Keterangan: ST = Selisih Terbagi


Contoh soal:

1. Tentukan fungsi polinom untuk f(x) = cos(x), jika X0 = 0,2 ; X1 = 0,3 ; X2 = 0,4
; X3 =0,5dengan menggunakan interpolasi polinomial newton, lalu hitung
f(3)!

n Xn F(xn) Pertama Kedua ketiga

0 0,2 0,999993 -0,000076 -0,000155 0,000017

1 0,3 0,999986 -0,000107 -0,00015

2 0,4 0,999976 -0,000137

3 0,5 0,999962
Dengan P1 = 0,99978

P2 = 0,998608

P3 = 0,998942

Semakin meningkatnya orde polinom, semakin teliti juga hasil yang diinginkan.

2. Tentukan fungsi polynomial untuk f(x) = ln(x) jika X0 = 2 ; X1 = 3 ; X2 = 4 ; X3 = 5


;X4 = 6 dengan menggunakan interpolasi polynomial newton, lalu hitung ln(8,5)!
Penyelesaian:

n Xn F(Xn) Pertama Kedua Ketiga Keempat


0 2 0,693147 0,405465 -0,058892 0,008874 -0,001231
1 3 1,098612 0,287682 -0,032269 0,003952
2 4 1,386294 0,223144 -0,020412
3 5 1,609438 0,182321
4 6 1,791759
Penyelesaian:
a0 = f(x0 ) = ln(2)=0,693147
𝑓 𝑥 1 −𝑓 𝑥 0 1,098612 −0,693147
a1 =f(x0 ,x 1 )= = = 0,405465
𝑥 1 −𝑥 0 3−2
𝑓 𝑥 2 −𝑓 𝑥 1 1,386294 −1,098612
f(x1 ,x 2 )= = =0,287682
𝑥 1 −𝑥 0 4−3
𝑓 𝑥 1 ,𝑥 2 −𝑓 𝑥 0, 𝑥 1 0,287682 −0,405465
a2 = f(x0 ,x 1 ,x2 )= = = -0,058892
𝑥 2 −𝑥 0 4−2
𝑓 𝑥 3 −𝑓 𝑥 2 1,609438 −1,386294
f 𝑥 2, 𝑥 3 = = = 0,223144
𝑥 3−𝑥 2 5−4
𝑓 𝑥 2 ,𝑥 3 −𝑓 𝑥 1,𝑥 2 0,223144 −0,287682
f(x1 ,x 2 ,x3 )= = = - 0,032269
𝑥 3−𝑥 1 5−3
𝑓 𝑥 1,𝑥 2,𝑥 3 −𝑓 𝑥 0,𝑥 1 ,𝑥 2 −0,032269 −(−0,058892 )
a3 = f(x0 ,x 1 ,x2,𝑥 3 )= = = 0,008874
𝑥 3−𝑥 0 5−2
𝑓 𝑥 4 −𝑓 𝑥 3 1,791759 −1,609438
f 𝑥 3, 𝑥 4 = = = 0,182321
𝑥 4−𝑥 3 6−5
𝑓 𝑥 3 ,𝑥 4 −𝑓 𝑥 2,𝑥 3 0,182321 −0,223144
f(x2 ,x 3 ,𝑥 4 )= = = - 0,020412
𝑥 4 −𝑥 2 6−4
𝑓 𝑥 2,𝑥 3,𝑥 4 −𝑓 𝑥 1 ,𝑥 2 ,𝑥 3 −0,020412 −(−0,032269 )
f(x1 ,x 2 ,x3 ,𝑥 4 )= = = 0,003952
𝑥 4 −𝑥 1 6−3
𝑓 𝑥 1,𝑥 2,𝑥 3 ,𝑥 4 −𝑓 𝑥 0,𝑥 1 ,𝑥 2 ,𝑥 3 0,003952 −0,008874
a4 = f(x0 ,x 1 ,x2,𝑥 3, 𝑥 4)= = =- 0,001231
𝑥 4 −𝑥 0 6−2
P4 (x) = 𝑎0 + 𝑎1 𝑥 − 𝑥 0 + 𝑎2 𝑥 − 𝑥 0 𝑥 − 𝑥 1 + 𝑎3 𝑥 − 𝑥 0 𝑥 − 𝑥 1 𝑥 −
𝑥 2 + 𝑎4 𝑥 − 𝑥 0 𝑥 − 𝑥 1 𝑥 − 𝑥 2 𝑥 − 𝑥 3
= 0,693147+0,287682 𝑥 − 2 -
0,058892 𝑥 − 2 𝑥 − 3 +0,008874 𝑥 − 2 𝑥 − 3 𝑥 − 4 −
0,001231 𝑥 − 2 𝑥 − 3 𝑥 − 4 𝑥 − 5
f(8,5)=𝑃4 2,8 = 0,693147 + 0,230146 -0,009423+0,001704+0,000519
𝑝 − 𝑝3 0,916093 − 0,915574
𝜀𝑝 = 4 × 100% = × 100% = 0,056654%
𝑝4 0,916093

Dengan P1 = 0,923293

P2 = 0,91387

P3 = 0,915574

P4 =0,916093

Semakin meningkatnya orde polinom, semakin teliti juga hasil yang diinginkan.

Anda mungkin juga menyukai