Vous êtes sur la page 1sur 6

A MODUL 1

A.1 Flowchart 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
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

Disp x3 ;tol ; ite ; E

end
A.2 Flowchart 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=abs(f3)

B A
B A

N x1=x3
f1*f3<0
f1=f3

x2=x3
f2=f3

disp x3,tol,ite,e

end
A.3 Flowchart 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
B A

N
l f1 l > l f2 l x2=x3;f2=f3
x1=x1;f1=f1
Y

x1=x2
x2=x3
f1=f2
f2=f3

disp x3 ; tol ; ite ; E

end

Vous aimerez peut-être aussi