Professional Documents
Culture Documents
Persamaan Nonlinier
I. Metode Bisection
START
x1,x2,tol
f1=f(x1)
f2=f(x2)
f1*f2 >=0
x1 , x2
f1=f(x1) ; f2=f(x2)
e=1 ; ite=0
e>=tol
A
B
1
A
ite=ite+1
x3=(x1+x2)/2
f3=f(x3)
e=abs (x1-x2)/2
N
x1=x3
f1*f3<=0
Y f1=f3
x2=x3
f2=f3
x3 ;tol ; ite ; e
end
2
II. Metode Interpolasi Linier
START
x1,x2,tol
f1*f2>=0
x1 , x2
f1=f(x1) ; f2=f(x2)
e=1 , ite=0
e>=tol
ite = ite+1
x3=x2-(f2*(x2-x1)/(f2-f1))
f3=f(x3)
e=absf(x3)
B A
3
B A
N x1=x3
f1*f3<=0
f1=f3
x2=x3
f2=f3
disp x3,tol,ite,e
end
4
III. Metode Secant
START
x1,x2,tol
f1=f(x1);
f2=f(x2);
e=1;
ite=0
e>=tol
x3=x2-{f2*(x2-x1)/(f2-f1)}
f3=f(x3)
ite=ite+1
e=abs(f3)
B A
5
B A
N
Abs(f1) >abs( f2) x1=x1;f1=f1
x2=x3;f2=f3
Y
x1=x2 ; f1=f2
x2=x3 ; f2=f3
end