Docsity

The Bisection Method (or Interval Halving Method), Exercises of Engineering

Toggle sidebar
bg1
Class: 3 rd Stage
Course I Lee. (3)
The Bisection Method (or Interval Halving Method):
The bisection method, which is alternatively called binary chopping, interval halving, is
one type of incremental search method in which the interval is always divided in half. If a
function changes sign over an interval, the function value at the midpoint is evaluated. The
location of the root is then determined as lying at the midpoint of the subinterval within
which the sign change occurs. The process is repeated to obtain refined estimates.
When applying the graphical technique, you have observed that / (x) changed sign on
opposite sides of the root. In general, if/ (x) is real and continuous in the interval from xL
to xR and/( .xL) and/ ( xR) have opposite signs, that is, f ( x L) f( x R) < 0, then there is at
least one real root between xL and xR. Incremental search methods capitalize on this
observation by locating an interval where the function changes sign. Then the location of
the sign change (and consequently, the root) is identified more precisely by dividing the
interval into a number of subintervals.
Algorithm of Bisection Method:
Stepl. Choose left xL and right xR guesses for the root such that the function changes sign
over the interval. This can be checked by ensuring that /( x L)/(x ^) < 0.
Step2. An estimate of the root x i+1 is determined by xR
Step3. Make the following evaluations to determine in which subinterval the root lies:
(a) If f(x L) f ( xR) < 0, the root lies in the left subinterval. Set xi+1 = xL and return to
step 2.
(b) If f( x i) f(x R) > 0, the root lies in the right subinterval. Therefore, set x i+1 = xR
and return to step 2.
(c) If f(x i) f(x R) = 0, the root equals xi+1; terminate the computation.
Example 1: Find the positive root of the following equation by (Bisection) method,
f(x) = s in (^ ) — cos2(x) to 3 dec. ?
Solution
f(x) = sin (” ) — cos2(x)
X01 2
F(x) -1 -0.13 0.14
Univ ersity of AL-Mustansirriya
College of Engineering
Computer & Software Eng. Dep.
pf3
pf4
pf5

Partial preview of the text

Download The Bisection Method (or Interval Halving Method) and more Exercises Engineering in PDF only on Docsity!

Class: 3rd Stage Course I Lee. ( 3 )

The Bisection Method (or Interval Halving Method): The bisection method, which is alternatively called binary chopping, interval halving, is one type o f incremental search method in which the interval is always divided in half. If a function changes sign over an interval, the function value at the midpoint is evaluated. The location o f the root is then determined as lying at the midpoint of the subinterval within which the sign change occurs. The process is repeated to obtain refined estimates. When applying the graphical technique, you have observed that / ( x ) changed sign on opposite sides of the root. In general, if/ (x) is real and continuous in the interval from x L to x R and/ (. x L) and/ ( x R) have opposite signs, that is, f ( x L) f ( x R) < 0, then there is at least one real root between x L and x R. Incremental search methods capitalize on this observation by locating an interval where the function changes sign. Then the location of the sign change (and consequently, the root) is identified more precisely by dividing the interval into a number of subintervals.

Algorithm of Bisection Method: S tep l. Choose left x L and right x R guesses for the root such that the function changes sign over the interval. This can be checked by ensuring that / ( x L) /( x ^ ) < 0. Step2. An estimate of the root x i+1 is determined by x R Step3. Make the following evaluations to determine in which subinterval the root lies: (a) If f ( x L) f ( x R) < 0, the root lies in the left subinterval. Set x i+1 = x L and return to step 2. (b) If f ( x i ) f ( x R) > 0, the root lies in the right subinterval. Therefore, set x i+1 = x R and return to step 2. (c) If f ( x i ) f ( x R) = 0, the root equals x i+1; terminate the computation.

Example 1: Find the positive root of the following equation by (Bisection) method, f(x) = s i n ( ^ ) — cos2(x) to 3 dec.?

Solution

f(x) = s in ( ” ) — co s2( x ) X 0 1 2 F(x) -1^ -0.13^ 0.

U n iversity o f AL-Mustansirriya College of EngineeringCom puter & Softw are Eng. Dep.

U n iversity o f AL*MustansirriyaCollege o f Engineering

Com puter & Softw are Eng. Dep.^ II• •^0^44 * *

 - The root lies between 1& Class: 3rd StageCourse l Lee. (3) - f(0) = sin (^ ) - cos2( x ) = sin (^ ) — cos2(0) = — - f(l) = sin (^ ) —cos2(x)= sin (^ ) — cos2( 1) = —0. - f(2) = s i n ( ^ ) - cos2(x)= s i n ( ^ ) — cos2( 2)= 0. - — —^1 +^2 = 1. Bisection = —-— a + b - f ( l .5) = s i n ( ^ ) - cos2(x)= s i n ( ^ ) — cos2(1.5)= 0. - The root lies between 1 & 1. 
  • — - —1 + 1.5 = 1.
  • f(1.25) = s i n ( ^ ) — co s 2(x)= - cos2( 1.25)= 0.
  • The root lies between 1 & 1.
    • 1 + 1.25 = 1.
  • f ( l.125) = s i n ( ^ ) - co s2(x)= s i n ( ^ ^ ) - co s2(1.125)= -0.
  • The root lies between 1.125 & 1.
  • --------1.125 - - + 1.25 -------- = 1.

U niversity o f AL-MustansirriyaCollege o f Engineering Computer & Softw are Eng. Dep. Course l Lec. (^ Classt 3 rd Stage 3 )

I *a /( * a ) b /(&) between a,bRoot lies *i+i

f ( l .5) = s i n ( ^ ) - cos2(x)= s i n ( ^ ) — cos2(1.5)= 0.

The Approximation root is = 1.

Example 2: Find the positive root of the following equation by (Bisection) method, f ( x ) = 6 x 3 + 3 x 2 — 16 to 2 dec.?

Solution f i x ) = 6 x 3 + 3 x 2 - 16 X 0 1 2 F(x) -16^ -7^44

The root lies between 1 &

U n iversity of AL-MustansirriyaCollege of Engineering Computer & Softw are Eng. Dep.

Bisection = —-—^ a + b

—^1 +^2 = 1. Z /( 1 .5 ) = 6 * 1.53 + 3 * 1.52 - 16 = 11

The root lies between 1 & 1.

The root lies between 1 & 1. 1 + 1.25 (^) = 1.

The root lies between 1.12 & 1. 1.12 + 1.25- = 1.

The root lies between 1.18 & 1. 1.18 + 1.25 - = 1.

The root lies between 1.21 & 1. 1.21 + 1.25- = 1.

The root lies between 1.23 & 1. 1.23 + 1.25 = 1. 2 /(1 .2 4 ) = 6 * 1.243 + 3 * 1.242 - 16 = 0. The root lies between 1.23 & 1.

Class: 3rd StageCourse 1 Lee. (3 )