Page 1 of 1

Develop a simple M-File to implement bisection method to determine a single root of the equation f(x) = 0 within a given

Posted: Fri May 06, 2022 6:20 am
by answerhappygod
Develop a simple M-File to implement bisection method to
determine a single root of the equation f(x) = 0 within a given
interval of x and stopping criterion ϵ_s
Format: the name of the function must be eulermethod with the
form:
[root, funcatroot] = method_bisect (func, x1, xu, es)
Input Variables: (a) func is the function f(x) is a real and
continuous function in the interval from x1 to xu; and (b) es is
the stopping criterion which can come from scaborough
Output Variables: (a) root is the real root of the function; and
(b) funcatroot is the function value at the root.
The root may or may not located between x1 and xu. That is,
display must indicate first is a root was found or not. Then
display the value of the root and the value of the function at the
root, if there is a root found.
Assume no multiple roots between x1 and xu.