You are on page 1of 4

Nama : Mudarris

NIM : 21/489152/PTK/14242
TUGAS 1 KOMPUTASI NUMERIS
2
Hitung 𝐼 = ∫0 −𝑥 3 − 𝑥 2 − 5𝑥 − 3 𝑑𝑥 , dengan menggunakan:

1. Analitis
2. Metode trapezoidal 1 segmen
3. Metode trapezoidal multi segmen
4. Metode simpsons 1/3 rule
5. Metode simpsons 3/8 rule
6. Metode romberg
7. Metode gauss quadrature
Bandingkan ketelitian tiap-tiap metode dengan hasil perhitungan analitisnya.
Jawab :
1. Analitis
2
𝐼 = ∫ −𝑥 3 − 𝑥 2 − 5𝑥 − 3 𝑑𝑥
0
2
𝑥 4 𝑥 3 5𝑥 2
𝐼 = [− − − − 3𝑥]
4 3 2 0
24 23 5 × 22
𝐼 = [− − − − 3 × 2] − [0]
4 3 2
16 8 20 68
𝐼=− − − −6=− = −22.66 ̅ ≈ −22.67
4 3 2 3
2. Metode trapezoidal 1 segmen

𝑓(𝑎)+𝑓(𝑏)
𝐼 = (𝑏 − 𝑎) f(a) = f(0) = -03 - 02 - 5x0 - 3 = -3
2
f(b) = f(2) = -23 - 22 - 5x2 - 3 = -25
−3−25
𝐼 = (2 − 0) 2 = −28
−22.67 − (−28)
𝑒=| | × 100% = 23.51125%
−22.67
3. Metode trapezoidal multi segmen (4 pias)
𝑛−1
∆𝑥
𝐼= [𝑓 (𝑎) + 𝑓 (𝑏) + 2 ∑ 𝑓(𝑥𝑖 )]
2
𝑖=1
𝑏−𝑎 2−0
∆𝑥 = = = 1/2 , maka interval dari 0 s/d 2 dalam kelipatan 0.5
𝑛 4
f(a) = f(0) = -0 - 02 - 5x0 - 3 = -3
3

2f(x1) = 2f(0.5) = 2(-0.53 – 0.52 - 5x0.5 – 3) = -11.75


2f(x2) = 2f(1) = 2(-13 – 12 - 5x1 – 3) = -20
2f(x3) = 2f(1.5) = 2(-1.53 – 1.52 - 5x1.5 – 3) = -32.25
f(b) = f(2) = -23 - 22 - 5x2 - 3 = -25
1/2
𝐼= [−3 − 11.75 − 20 − 32.25 − 25] = −23
2
−22.67 − (−23)
𝑒=| | × 100% = 1.45567%
−22.67

4. Metode simpsons 1/3 rule (4 pias)


𝑛−1 𝑛−2
∆𝑥
𝐼= [𝑓 (𝑎) + 𝑓 (𝑏) + 4 ∑ 𝑓(𝑥𝑖 ) + 2 ∑ 𝑓(𝑥𝑖 )]
3
𝑖=1 𝑖=2
𝑏−𝑎 2−0
∆𝑥 = = = 1/2 , maka interval dari 0 s/d 2 dalam kelipatan 0.5
𝑛 4
f(a) = f(0) = -03 - 02 - 5x0 - 3 = -3
4f(x1) = 4f(0.5) = 4(-0.53 – 0.52 - 5x0.5 – 3) = -23.5
2f(x2) = 2f(1) = 2(-13 – 12 - 5x1 – 3) = -20
4f(x3) = 4f(1.5) = 4(-1.53 – 1.52 - 5x1.5 – 3) = -64.5
f(b) = f(2) = -23 - 22 - 5x2 - 3 = -25
1/2
𝐼= [−3 − 23.5 − 20 − 64.5 − 25] = −22.67
3
−22.67 − (−22.67)
𝑒=| | × 100% = 0%
−22.67

5. Metode simpsons 3/8 rule


3∆𝑥
𝐼= [𝑓(𝑥0 ) + 3𝑓 (𝑥1 ) + 3𝑓 (𝑥2 ) + 𝑓 (𝑥3 )]
8
𝑏−𝑎 2−0
∆𝑥 = 3 = 3 = 2/3 , maka interval dari 0 s/d 2 dalam kelipatan 2/3
f(x0) = f(0) = -03 - 02 - 5x0 - 3 = -3
3f(x1) = 3f(2/3) = 2[-(2/3)3 – (2/3)2 - 5x(2/3) – 3] = -21.22
3f(x2) = 3f(4/3) = 2[-(4/3)3 – (4/3)2 - 5x(4/3) – 3] = -41.44
f(x3) = f(2) = -23 - 22 - 5x2 - 3 = -25
3 × (2/3)
𝐼= [−3 − 21.22 ̅ − 41.44 ̅ − 25] = −22.67
8
−22.67 − (−22.67)
𝑒=| | × 100% = 0%
−22.67
6. Metode romberg (dengan 3 iterasi menggunakan trapezoidal rule hingga 8 pias)
• 1 pias (sudah dihitung pada nomor 2)
• 2 pias
𝑏−𝑎 2−0
∆𝑥 = 𝑛 = 2 = 1 , maka interval dari 0 s/d 2 dalam kelipatan 1
f(a) = f(0) = -03 - 02 - 5x0 - 3 = -3
2f(x1) = 2f(1) = 2(-13 – 12 - 5x1 – 3) = -20
f(b) = f(2) = -23 - 22 - 5x2 - 3 = -25
1
𝐼 = [−3 − 20 − 25] = −24
2
−22.67 − (−24)
𝑒=| | × 100% = 5.86678%
−22.67
• 4 pias (sudah dihitung pada nomor 3)
• 8 pias
𝑏−𝑎 2−0
∆𝑥 = 𝑛 = 8 = 1/4 , maka interval dari 0 s/d 2 dalam kelipatan 0.25
f(a) = f(0) = -03 - 02 - 5x0 - 3 = -3
2f(x1) = 2f(0.25) = 2(-0.253 – 0.252 - 5x0.25 – 3) = -8.65625
2f(x2) = 2f(0.5) = 2(-0.53 – 0.52 - 5x0.5 – 3) = -11.75
2f(x3) = 2f(0.75) = 2(-0.753 – 0.752 - 5x0.75 – 3) = -15.46875
2f(x4) = 2f(1) = 2(-13 – 12 - 5x1 – 3) = -20
2f(x5) = 2f(1.25) = 2(-1.253 – 1.252 - 5x1.25 – 3) = -25.53125
2f(x6) = 2f(1.5) = 2(-1.53 – 1.52 - 5x1.5 – 3) = -32.25
2f(x7) = 2f(1.75) = 2(-1.753 – 1.752 - 5x1.75 – 3) = -40.34375
f(b) = f(2) = -23 - 22 - 5x2 - 3 = -25
1/4
𝐼= [−3 − 8.65625 − 11.75 − 15.46875 − 20 − 25.53125 − 32.25 − 40.34375
2
− 25] = −22.75
−22.67 − (−22.75)
𝑒=| | × 100% = 0.35289%
−22.67
Pias h Integral e%
1 2 -28 23.51125
2 1 -24 5.86678
4 0.5 -23 1.45567
8 0.25 -22.75 0.35289
4 1
Gunakan informasi ini bersama dengan persamaan 𝐼 ≅ 3 𝐼 (ℎ2 ) − 3 𝐼(ℎ1 ) untuk menghitung
taksiran yang ditingkatkan dari integral. Solusi perkiraan untuk satu dan dua pias dapat
digabungkan untuk menghasilkan
4 1
𝐼≅ (−24) − (−28) = −22.67
3 3
4 1
𝐼≅ (−23) − (−24) = −22.67
3 3
4 1
𝐼 ≅ (−22.75) − (−23) = −22.67
3 3
Bentuk umum yang dikenal sebagai integrasi romberg diwakili oleh gambar dibawah ini
O(h2) O(h4)
(a) -28 -22.67
-24
(b) -28 -22.67
-24 -22.67
-23

7. Metode gauss quadrature (menggunakan 2 titik)


(𝑏 + 𝑎) + (𝑏 − 𝑎)𝑥𝑑 (2 + 0) + (2 − 0)𝑥𝑑
𝑥= = = 1 + 𝑥𝑑
2 2
Turunan dari persamaan tersebut adalah dx = 1 dxd
Kedua bentuk diatas disubstitusikan ke dalam persamaan asli,
2 1
∫ −𝑥 3 − 𝑥 2 − 5𝑥 − 3 𝑑𝑥 = ∫ −(1 + 𝑥𝑑 )3 − (1 + 𝑥𝑑 )2 − 5(1 + 𝑥𝑑 ) − 3 𝑑𝑥𝑑
0 −1
Kemudian masukkan nilai xd = x1 = -0.577350269 dan xd = x2 = 0.577350269
Untuk x1 → -(1-0.577350269)3-(1-0.577350269)2-5(1-0.577350269)-3 = -5.367380553
Untuk x2 → -(1+0.577350269)3-(1+0.577350269)2-5(1+0.577350269)-3 = -17.29928611
𝐼 = −5.367380553 − 17.29928611 = −22.6667
−22.67 − (−22.6667)
𝑒=| | × 100% = 0.01456%
−22.67

You might also like