INTEGRASI NUMERIK
LAPORAN PENDAHULUAN
PRAKTIKUM FISIKA KOMPUTASI I
V. Algoritma
Program Utama
Step 1 : Mulai
Step 2 : Inisialisasi fungsi trapezoida, fungsi simpson dengan parameter masukan f dan
parameter keluaran y, f, x, y
Step 3 : Pembentukan fungsi f (x) = x2
Step 4 : Cetak fungsi f(x)
Step 5 : Pemanggilan fungsi trapezoida dengan parameter masukan f dan parameter
keluaran x
Step 6 : Cetak x
Step 7 : Pemanggilan fungsi simpson dengan parameter masukan f dan parameter
keluaran y
Step 8 : Cetak y
Step 9 : Selesai
Subprogram Trapezoida
Step 1 : Mulai
Step 2 : Inisialisasi fungsi trapezoida dengan parameter masukan f dan parameter
keluaran x
Step 3 : Inisialisasi a, b, x0, x1, h, x, f, a = 0, b = 2x0=a, x1=b
Step 4 : Proses h = b - a
Step 5 : Proses x= h/2 dikali (f(x0) + f(x1))
Step 6 : Selesai
Subprogram Simpson
Step 1 : Mulai
Step 2 : Inisialisasi fungsi simpson dengan parameter masukan f dan parameter
keluaran x
Step 3 : Inisialisasi a, b, x1, x2, x3, h, x, f, a = 0, b = 2
Step 4 : Proses h=b-a
Step 5 : Proses x1=a, Proses x2=a+h, Proses x3=b
Step 6 : Proses x= h/3 dikali (f(x1) + 4 dikali f (x2) + f (x3))
Step 7 : Selesai
VI. Flowchart
Subprogram Trapezoida
Mulai
Proses h = b – a, Proses
x0=a, Proses x1=b
Selesai
Program Utama
Mulai
Cetak x
Cetak y
Selesai
Subprogram Simpson
Mulai
Selesai
VII. Listing
1. Program Utama
clc
f = inline('x^2')
x = trapezoida(f)
y = simpson(f)
2. Subprogram Traoezoida
function x = trapezoida (f)
a=0; %batas bawah integral
b=2; %batas atas integral
h = b-a;
x0 = a;
x1 = b;
% -- metode trapezoida --
x = h/2*(f(x0) + f(x1));
3. Subprogram Simpson
function x = simpson(f)
a=0; %batas bawah integrasi
b=2; %batas atas integrasi;
h=(b-a)/2;
x1=a;
x2=a+h;
x3=b;
% -- metode simpson --
x = h/3*(f(x1) +4*f(x2)+ f(x3))
DAFTAR PUSTAKA
Aswin, M., 2008. Penggunaan Metode Aswin Pada Integral Numerik. Jurnal of Sistem
Teknik Industri, 9(1): 1-2.
Ermawati, Rahayu, P. dan Zuhairoh, F., 2017. Perbandingan Solusi Numerik Integral
Lipat Dua Pada Fungsi Fuzzy Dengan Metode Romberg Dan Simulasi Monte
Carlo. Jurnal MSA, 2(5): 15.
Herfina, N, Amrullah. Dan Junaidi. 2019. Efektifitas Metode Trapesium Dan Simpson
Dalam Penentuan Luas Menggunakan Pemrograman Pascal. Jurnal Mandalika,
1(1): 60-62.
Irfan, M. dkk., 2018. Modul Praktikum Fisika Komputasi I. Indralaya: Universitas
Sriwijaya.
Ramadanti, D. S., 2019. Penggunaan Metode Titik Tengah (Midpoint), Metode
Trapesium, Metode Simpson Dan Metode Gauss Untuk Menghitung Integrasi
Numerik Fungsi-Fungsi Tertentu Tanpa Error. Bandar Lampung: Universitas
Lampung.
LAMPIRAN