6. hampiran numerik fungsi
TRANSCRIPT
![Page 1: 6. Hampiran Numerik Fungsi](https://reader035.vdocuments.site/reader035/viewer/2022062300/5571f39949795947648e4ca5/html5/thumbnails/1.jpg)
![Page 2: 6. Hampiran Numerik Fungsi](https://reader035.vdocuments.site/reader035/viewer/2022062300/5571f39949795947648e4ca5/html5/thumbnails/2.jpg)
HAMPIRAN NUMERIK FUNGSI(PENGEPASAN KURVA)
PERTEMUAN 6
Matakuliah : METODE NUMERIK ITahun : 2008
![Page 3: 6. Hampiran Numerik Fungsi](https://reader035.vdocuments.site/reader035/viewer/2022062300/5571f39949795947648e4ca5/html5/thumbnails/3.jpg)
Bina Nusantara
Hampiran numerik fungsi Hampiran numerik fungsi (Interpolasi dan Regressi)(Interpolasi dan Regressi)
Pengepasan Kurva (Curva Fitting)Pengepasan Kurva (Curva Fitting)
Tujuan: Tujuan: • Mencari pola hubungan variabel x dan Mencari pola hubungan variabel x dan
variabel y berupa kurva mulus y=f(x) yang variabel y berupa kurva mulus y=f(x) yang paling tepatpaling tepat
• Memperkirakan nilai y* jika ditentukan x* Memperkirakan nilai y* jika ditentukan x* sebagai pasangan dari y* sebagai pasangan dari y*
![Page 4: 6. Hampiran Numerik Fungsi](https://reader035.vdocuments.site/reader035/viewer/2022062300/5571f39949795947648e4ca5/html5/thumbnails/4.jpg)
Bina Nusantara
Metode Pengepasan Kurva
![Page 5: 6. Hampiran Numerik Fungsi](https://reader035.vdocuments.site/reader035/viewer/2022062300/5571f39949795947648e4ca5/html5/thumbnails/5.jpg)
Bina Nusantara
Interpolasi Linier. Mencari interpolasi antara dua titik xi dan xi+1 dibuat
sebuah garis lurus di antara kedua titik tersebut seperti pada gambar berikut
Bentuk Umum polinomial derajat n adalah f(x) = a0 + a1x + a2x2 + . . . + a2xn
![Page 6: 6. Hampiran Numerik Fungsi](https://reader035.vdocuments.site/reader035/viewer/2022062300/5571f39949795947648e4ca5/html5/thumbnails/6.jpg)
Bina Nusantara
Persamaan garis ditentukan dengan formula berikut:
Contoh:Persamaan garis yang melalui titik P(1,2) dan Q (4,4) adalah
atau y = 2/3x + 4/3
iiiii
i yyyxx
xxy
)()(
)(1
1
2)24()14(
)1(
x
y
![Page 7: 6. Hampiran Numerik Fungsi](https://reader035.vdocuments.site/reader035/viewer/2022062300/5571f39949795947648e4ca5/html5/thumbnails/7.jpg)
Bina Nusantara
Menentukan polinomial melalui 3 titikContoh:Tentukan persamaan garis melalui
Bentuk 3 polinomial f(x) menggunakan polinomial derajat 2
2,5 = a0 + a1 (1,0) + a2 (1,0)
10 = a0 + a1 (2,0) + a2 (2,0)
25 = a0 + a1 (3,0) + a2 (3,0)
x 1,0 2,0 3,0
f(x) 2,5 10 25
a0, a1 dan a2 tidak diketahui
SPL dengan 3 persamaan
![Page 8: 6. Hampiran Numerik Fungsi](https://reader035.vdocuments.site/reader035/viewer/2022062300/5571f39949795947648e4ca5/html5/thumbnails/8.jpg)
Bina Nusantara
Selesaikan SPL
Dalam bentuk matrik
Menggunakan salah satu metode yang adaDiperoleh persamaan f(x) = 2,5 - 3,75X +
3,75X2
![Page 9: 6. Hampiran Numerik Fungsi](https://reader035.vdocuments.site/reader035/viewer/2022062300/5571f39949795947648e4ca5/html5/thumbnails/9.jpg)
Bina Nusantara
![Page 10: 6. Hampiran Numerik Fungsi](https://reader035.vdocuments.site/reader035/viewer/2022062300/5571f39949795947648e4ca5/html5/thumbnails/10.jpg)
Bina Nusantara
Interpolasi Lagrange
Dibentuk fungsi
dimana
![Page 11: 6. Hampiran Numerik Fungsi](https://reader035.vdocuments.site/reader035/viewer/2022062300/5571f39949795947648e4ca5/html5/thumbnails/11.jpg)
Bina Nusantara
Menggunakan data sebelumnya diperoleh persamaan polinomial lagrange
![Page 12: 6. Hampiran Numerik Fungsi](https://reader035.vdocuments.site/reader035/viewer/2022062300/5571f39949795947648e4ca5/html5/thumbnails/12.jpg)
Bina Nusantara
![Page 13: 6. Hampiran Numerik Fungsi](https://reader035.vdocuments.site/reader035/viewer/2022062300/5571f39949795947648e4ca5/html5/thumbnails/13.jpg)
Bina Nusantara
![Page 14: 6. Hampiran Numerik Fungsi](https://reader035.vdocuments.site/reader035/viewer/2022062300/5571f39949795947648e4ca5/html5/thumbnails/14.jpg)
Bina Nusantara
![Page 15: 6. Hampiran Numerik Fungsi](https://reader035.vdocuments.site/reader035/viewer/2022062300/5571f39949795947648e4ca5/html5/thumbnails/15.jpg)
Bina Nusantara
![Page 16: 6. Hampiran Numerik Fungsi](https://reader035.vdocuments.site/reader035/viewer/2022062300/5571f39949795947648e4ca5/html5/thumbnails/16.jpg)
Bina Nusantara
Bentuk Umum: y(x)=f(xi)= a0 + a1x + a2x2 + . . . + anxn
Koefisien a0, a1, a2, …,an dapat dihitung dengan menentukan
dimana,...0,0,0210
a
J
a
J
a
J
![Page 17: 6. Hampiran Numerik Fungsi](https://reader035.vdocuments.site/reader035/viewer/2022062300/5571f39949795947648e4ca5/html5/thumbnails/17.jpg)
Bina Nusantara
Sehingga SPL berikut dapat diselesaikan untuk mendapatkan
koefisien a0, a1, a2, dst
imim
mi
mi
mi
mi
iimmiiii
immiii
yxaxaxaxax
yxaxaxaxax
yaxaxaxna
)(...)()()(
.....................
.....................
.....................
)(...)()()(
)(...)()(
23
21
10
13
31
20
22
10
![Page 18: 6. Hampiran Numerik Fungsi](https://reader035.vdocuments.site/reader035/viewer/2022062300/5571f39949795947648e4ca5/html5/thumbnails/18.jpg)
Bina Nusantara
Contoh : Nyatakan y sebagai fungsi dari x dari data-data berikut ini
![Page 19: 6. Hampiran Numerik Fungsi](https://reader035.vdocuments.site/reader035/viewer/2022062300/5571f39949795947648e4ca5/html5/thumbnails/19.jpg)
Bina Nusantara
![Page 20: 6. Hampiran Numerik Fungsi](https://reader035.vdocuments.site/reader035/viewer/2022062300/5571f39949795947648e4ca5/html5/thumbnails/20.jpg)
Bina Nusantara
![Page 21: 6. Hampiran Numerik Fungsi](https://reader035.vdocuments.site/reader035/viewer/2022062300/5571f39949795947648e4ca5/html5/thumbnails/21.jpg)
Bina Nusantara
y2 = a0 + a1(x2 – x0) + a2(x2 – x0)(x2 – x1)
))((
)(
))((
)(
1202
0201
0102
1202
021022 xxxx
xxxxyy
yy
xxxx
xxaaya
Koefisien diperoleh dari data
Hitung ak menggunakan tabel Divided Difference
Polynomial Newton
![Page 22: 6. Hampiran Numerik Fungsi](https://reader035.vdocuments.site/reader035/viewer/2022062300/5571f39949795947648e4ca5/html5/thumbnails/22.jpg)
Bina Nusantara
Tabel Divided Differencex0 y0 a0
a1
x1 y1 a2
x2 y2 a3
x3 y3
01
010 xx
yyF
12
121 xx
yyF
23
232 xx
yyF
02
010 xx
FFS
13
121 xx
FFS
03
010 xx
SST
![Page 23: 6. Hampiran Numerik Fungsi](https://reader035.vdocuments.site/reader035/viewer/2022062300/5571f39949795947648e4ca5/html5/thumbnails/23.jpg)
Bina Nusantara
Contoh Divided Difference0 0 a0
a1
10 10 a2
20 40 a3
30 100
1010
0100
F
31020
10401
F
62030
401002
F
1.020
130
S
15.1030
361
S
600
1
030
15.2.0
T
![Page 24: 6. Hampiran Numerik Fungsi](https://reader035.vdocuments.site/reader035/viewer/2022062300/5571f39949795947648e4ca5/html5/thumbnails/24.jpg)
Bina Nusantara
Contoh Divided Difference• Divided difference table gives a0 = 0, a1 = 1, a2
= .1, and a3 = 1/600
• Polynomial p(x) = a0 + a1(x – x0) + a2(x – x0)(x – x1) + a3(x – x0)(x – x1)(x – x2) = 0 + 1(x – 0) + 0.1(x – 0)(x – 10) + (1/600)(x – 0)(x – 10)(x – 20) = x + 0.1x(x – 10) + (1/600)x(x – 10)(x – 20)
• Check p(30) = 30 + .1(30)(20) + (1/600) (30)(20)(10) = 30 + 60 + 10 = 100 (correct)
![Page 25: 6. Hampiran Numerik Fungsi](https://reader035.vdocuments.site/reader035/viewer/2022062300/5571f39949795947648e4ca5/html5/thumbnails/25.jpg)
Bina Nusantara
Constant Step Size
• Divided differences work for equal or unequal step size in x
• If x = h is a constant we have simpler results
– Fk = Dyk/h = (yk+1 – yk)/h– Sk = D2yk/h2 = (yk+2 – 2yk-1 + yk)/h2
– Tk = D3yk/h3 = (yk+3 – 3yk+2 + 3yk+1 – yk)/h3
– Dnyk is called the nth forward difference– Can also define backwards and central differences
![Page 26: 6. Hampiran Numerik Fungsi](https://reader035.vdocuments.site/reader035/viewer/2022062300/5571f39949795947648e4ca5/html5/thumbnails/26.jpg)
Bina Nusantara
Newton Interpolating Polynomial
-1
0
1
2
3
4
5
0 1 2 3 4 5 6
X Values
Y V
alues
Polynomial
Data
![Page 27: 6. Hampiran Numerik Fungsi](https://reader035.vdocuments.site/reader035/viewer/2022062300/5571f39949795947648e4ca5/html5/thumbnails/27.jpg)
Bina Nusantara
Soal Latihan