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

Bisection Method

The bisection method is used to find the roots of a polynomial equation. It separates the interval and subdivides the interval in which the root of the equation lies. The principle behind this method is the intermediate value theorem for continuous functions, which states that if a function is continuous on a closed interval, and a value is between the function values at the endpoints, then there exists a point in the interval where the function value is equal to the given value. The bisection method narrows the gap between the positive and negative intervals by taking the average until it converges on the correct root.

Uploaded by

Rovelyn Nazareno
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views

Bisection Method

The bisection method is used to find the roots of a polynomial equation. It separates the interval and subdivides the interval in which the root of the equation lies. The principle behind this method is the intermediate value theorem for continuous functions, which states that if a function is continuous on a closed interval, and a value is between the function values at the endpoints, then there exists a point in the interval where the function value is equal to the given value. The bisection method narrows the gap between the positive and negative intervals by taking the average until it converges on the correct root.

Uploaded by

Rovelyn Nazareno
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Bisection Method

In Mathematics, the bisection method is a straightforward technique to find numerical solutions of an


equation with one unknown. Among all the numerical methods, the bisection method is the simplest
one to solve the transcendental equation. In this article, we will discuss the bisection method with
solved problems in detail.

Bisection Method Definition

The bisection method is used to find the roots of a polynomial equation. It separates the interval and
subdivides the interval in which the root of the equation lies. The principle behind this method is the
intermediate theorem for continuous functions. It works by narrowing the gap between the positive and
negative intervals until it closes in on the correct answer. This method narrows the gap by taking the
average of the positive and negative intervals. It is a simple method and it is relatively slow. The
bisection method is also known as interval halving method, root-finding method, binary search method
or dichotomy method.

clc;
clear;

function []=Bisection(rl, ru, es, imax)


ea = 100
nr = (ru+rl)/2
cr = evstr(w)
while (ea>es)
test = cl * cr;
mprintf(" %d %10f %10f %10f %12.7f %12.f %12.f %10.7f\n", iter, rl, ru, nr, cl, cu, cr, ea);
if (test < 0) then
ru = nr;
elseif(test > 0)then
rl = nr
elseif(test == 0)then
mprintf("Root of the equation is %f", nr)
abort
end
x = rl
cl = evstr(w)
x = ru
du = evstr(w)
xrold = nr
nr = (rl+ru)/2;
x = nr
cr = evstr(w)
ea = abs((nr-xrold)/ nr)*100;
iter = iter + 1 ;
test = cl*cr;
if (ea < es) then
mprintf(" %d %10f %10f %10f %12.7f %12.f %12.f %10.7f\n", iter, rl, ru, nr, cl, cu, cr, ea);
mprintf("\n\nApproximate root of the function is %f",nr)
abort
end
end
endfunction
//main

disp("Program will be solve/give the approximate root of any")


mprintf("Given the following equations using the Bisection Method. ")
w = input("Input the equation: ", 'string')
rl = input("Enter lower limit: ")
x = rl
cl = evstr(w)
if(cl==0) then
mprintf("Root is the lower limit.");
abort
end
ru = input("Enter upper limit: ")
x = ru
cu = evstr(w)
if (cu==0) then
mprintf("Root is the upper limit. ")
abort
end
es = input("Value of accepted tolerance of error(es): ")
imax = input("Number of iterations: ");
iter = 1
mprintf(" iter rl ru xr w(rl) w(ru) w(nr) ea\n");
b = cl*cu;
if (b > 0) then
mprintf("Initial guess are invalid. w(ru) should be less than 0");
abort
end
//output table
Bisection(rl, ru, es, imax)

a. 2x2+x-5 in [5,0]
b. X3+4x2-3x-1 in [-5,-1]

c. 3x42x3+x2-2x-1 in [0,3]
The Intermediate Value Theorem Definitions

Generally speaking, the Intermediate Value Theorem applies to continuous functions and is used to
prove that equations, both algebraic and transcendental, are solvable. Note that this theorem will be
used to prove the EXISTENCE of solutions, but will not actually solve the equations.

The bisection method is used to find the roots of a polynomial equation. It separates the interval and
subdivides the interval in which the root of the equation lies. The principle behind this method is
the intermediate theorem for continuous functions.

The Intermediate Value Theorem has many applications. A classical application of the IVT is the Bisection
Method. The Bisection Method is an algorithm for finding an approximation to a zero of a continuous
function.

In mathematical analysis, the intermediate value theorem states that if is a continuous function whose
domain contains the interval [a, b], then it takes on any given value between and. at some point within
the interval. The tolerance ε is the absolute value of the difference between the actual root of the
function x and the approximation c. This is the conclusion of the theorem. “If f is continuous on a closed
interval [a, b], and c is any number between f(a) and f(b), then there is at least one number x in the
closed interval such that f(x) = c”.

Intermediate means “in-between”. In this case, intermediate means between two

Known y-values. The word value refers to “y” values.

A theorem: “…is a statement that can be demonstrated to be true by accepted

Mathematical operations and arguments”1

So the Intermediate Value Theorem is a theorem that will be dealing with all of

The y-values between two known y-values.

You might also like