Pengantar Metode Numerik
Pengantar Metode Numerik
y= x2 – 6x + 8
3 6 Sb-X
a c0 c1
c2 b x
Metode analitik:
1
∫ ax n +1 + C
n
Rumus: ax dx =
n +1
1
1 3 x =1
∫−1(4 − x )dx = [4 x − 3x ]x=−1
2
1 1
= [4(1) − (1)] − [ 4( −1) − ( −1)] = 22 / 3 = 7.33
3 3
y = 4 - x2
p q r s
-2 1 -1/2 0 1/2 1 2 x
∫
−1
(4 − x 2 ) dx ≈ p + q + r + s ≈ {[f(-1) + f(-1/2)] × 0.5/2} + {[f(-1/2) + f(0)] × 0.5/2} +
{[f(0) + f(1/2)] × 0.5/2} + {[f(1/2) + f(1)] × 0.5/2}
≈ 0.5/2 {f(-1) + 2f(-1/2) + 2f(0) + 2f(1/2) + f(1)}
≈ 0.5/2 {3 + 7.5 + 8 + 7.5 + 3}
≈ 7.25
Rinaldi Munir - IF4058 Topik Khusus IF I 11
• Perbedaan solusi antara metode analitik dengan metode
numerik:
solusi dengan metode analitik: eksak (tepat tanpa ada
kesalahan)
y
y = f(x)
akar
x2
Rinaldi Munir - IF4058 Topik Khusus IF I 18
3. Interpolasi polinom
Diberikan titik-titik (x0,y0), (x1,y1), …, (xn,yn).
Tentukan polinom pn(x) yang melalui semua titik
tersebut
y = pn(x)
yi+1 y = f(x)
yi
xi xi+1 x
y
y = f(x)
b
I= ∫ f ( x)
a
a b x
yi
∆x
xi xi+1 x