metode fixed point iteration
TRANSCRIPT
-
7/25/2019 metode fixed point iteration
1/4
TUGAS PERTEMUAN KE-5
MATEMATIKA KOMPUTASI
Dosen Pengampu: Anggyi Trisnawan Putra, S.Si., M.Si.
Oleh :
Hadi Susanto (4111412049)
JURUSAN MATEMATIKA
FAKULTAS MATEMATIKA DAN ILMU PENGETAHUAN ALAM
UNIVERSITAS NEGERI SEMARANG
2015
-
7/25/2019 metode fixed point iteration
2/4
Tugas Pertemuan ke-5 (Tugas Individu)
Diketahui persamaan:
Dengan:
x0=2
err=0,00001
Cari solusinya dengan metode fixed point iteration dalam program scilab.
Penyelesaian:
Langkah-langkah:
Ubah persamaan f(x)=0 menjadi x=g(x)x3-2x+1=0 menjadi
SciNote-nya sebagai berikut:
function y=g(x);
y=(2*x-1)^(1/3);
endfunction
n=100 ;
i=0;
x0=1;
x1=4;
err =0.00001 ;
while abs (x1-x0)>err
x2=g(x1);
x0=x1;x1=x2;
i=i+1;
disp ("iterasi " +string (i)+ " => " +string (x0)+" "+string (x1));
if i>= n then
disp ("max iteration exceed" );
end;
end disp ("solusi = " +string (x2));
-
7/25/2019 metode fixed point iteration
3/4
Setelah kode dijalankan, didapatkan solusi x = 1.0000139.
Startup execution:
loading initial environment
-->exec('E:\MATERI KULIAH\MATERI SMT 6\MATKOM\Tugas Pertemuan ke
5\Pertemuan 5.sce', -1)
iterasi 1 => 4 1.9129312
iterasi 2 => 1.9129312 1.413786
iterasi 3 => 1.413786 1.22262
iterasi 4 => 1.22262 1.1306113
iterasi 5 => 1.1306113 1.0804315
iterasi 6 => 1.0804315 1.0509781
iterasi 7 => 1.0509781 1.0328917
iterasi 8 => 1.0328917 1.0214638
iterasi 9 => 1.0214638 1.0141092
iterasi 10 => 1.0141092 1.009319
iterasi 11 => 1.009319 1.0061745
iterasi 12 => 1.0061745 1.0040995
iterasi 13 => 1.0040995 1.0027256
-
7/25/2019 metode fixed point iteration
4/4
iterasi 14 => 1.0027256 1.0018137
iterasi 15 => 1.0018137 1.0012077
iterasi 16 => 1.0012077 1.0008045
iterasi 17 => 1.0008045 1.000536
iterasi 18 => 1.000536 1.0003572
iterasi 19 => 1.0003572 1.0002381
iterasi 20 => 1.0002381 1.0001587
iterasi 21 => 1.0001587 1.0001058
iterasi 22 => 1.0001058 1.0000705
iterasi 23 => 1.0000705 1.000047
iterasi 24 => 1.000047 1.0000313
iterasi 25 => 1.0000313 1.0000209
iterasi 26 => 1.0000209 1.0000139
solusi = 1.0000139
Kesimpulan:
Dengan perhitungan melalui metode fixed point iteration, dengan mengubah persamaan x 3-
2x+1=0 menjadi x= (2x-1), didapatkan solusi x = 1.0000139=1.