0% found this document useful (0 votes)
32 views

Start Metode Bisection: Input x1, x2, Tol

The document describes three numerical methods for finding the root of a function: bisection method, linear interpolation method, and secant method. Each method takes inputs of x1, x2, and a tolerance value Tol. They then calculate the function values at x1 and x2, check if they have opposite signs, iterate until the error is less than Tol, calculate a new x3 value, and output x3 once convergence is reached.

Uploaded by

thoriqnovia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views

Start Metode Bisection: Input x1, x2, Tol

The document describes three numerical methods for finding the root of a function: bisection method, linear interpolation method, and secant method. Each method takes inputs of x1, x2, and a tolerance value Tol. They then calculate the function values at x1 and x2, check if they have opposite signs, iterate until the error is less than Tol, calculate a new x3 value, and output x3 once convergence is reached.

Uploaded by

thoriqnovia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Start

Metode
Bisection
input x1, x2, Tol

f1 = f(x1)
f2 = f(x2)

f1 * f2 ≥ 0

input x1, x2, Tol

f1 = f(x1)
f2 = f(x2)

e =1, iter = 0

e ≥ tol

x3 = ½ (x1 + x2)
f3 = f(x3)
iter = iter + 1
e = ½ abs (x1 – x2)

f1 * f3 ≥ 0

x2 = x3
f(x2) = f(x3) x1 = x3
f(x1) = f(x3)

output x3

End
Start
Metode
Interpolasi Linier
input x1, x2, Tol

f1 = f(x1)
f2 = f(x2)

f1 * f2 ≥ 0

input x1, x2, Tol

f1 = f(x1)
f2 = f(x2)

e =1, iter = 0

e ≥ tol

x3 = x2 – ( f(x2) / f(x2) - f(x1) ) * (x2 – x1)


f3 = f(x3)
iter = iter + 1
e = abs (f(x3))

f1 * f3 ≥ 0

x2 = x3
f(x2) = f(x3) x1 = x3
f(x1) = f(x3)

output x3

End
Metode
Start
Secant

input x1, x2, Tol

f1 = f(x1)
f2 = f(x2)

e =1, iter = 0

e ≥ tol

x3 = x2 – ( f(x2) / f(x2) - f(x1) ) * (x2 – x1)


f3 = f(x3)
iter = iter + 1
e = abs (f(x3))

|f1| ≥ |f2|

x1 = x1, x2 = x3
F1 = f1, f2 = f3
x1 = x2, x2 = x3
f1 = f2, f2 = f3

output x3

End

You might also like