Академический Документы
Профессиональный Документы
Культура Документы
Faculty of Engineering
Civil Engineering Department
Numerical Analysis
ECIV 3306
Chapter 5
Bracketing Methods
PART II ROOTS OF EQUATIONS
Bisection method
Bracketing Methods
False Position Method
Muller Method
STUDY OBJECTIVES FOR PART TWO
b b 2 4ac
ax 2 bx c 0 x
2a
• But
ax 5 bx 4 cx 3 dx 2 ex f 0 x ?
sin x x 0 x ?
ROOTS OF EQUATIONS
• Non-computer methods:
- Closed form solution (not always available)
- Graphical solution (inaccurate)
f(x)
roots
x
f(x)=0 f(x)=0
• Two initial guesses (xl and xu) are required for the
root which bracket the root (s).
• If one root of a real and continuous function, f(x)=0,
is bounded by values xl , xu then f(xl).f(xu) <0.
(The function changes sign on opposite sides of the root)
Bracketing Methods
1. Bisection Method
Then the interval is divided in half with the root lies in the
midpoint of the subinterval. This process is repeated to
obtained refined estimates.
f(x)
Step 1: Choose lower xl and upper xu xr = ( xl + xu )/2
guesses for the root such that:
f(xl )
f(xl).f(xu)<0
Step 2: The root estimate is:
xr = ( xl + xu )/2 xl xr1 xu
x
f(xr1) f(xu)
Step 3: Subdivide the interval according to:
– If (f(xl).f(xr)<0) the root lies in the f(x)
(f(xl).f(xr)<0): xu = xr
lower subinterval; xu = xr and go to xr = ( xl + xu )/2
step 2.
f(xu)
– If (f(xl).f(xr)>0) the root lies in the
upper subinterval; xl = xr and go to f(xr2)
step 2. xl xu
x
– If (f(xl).f(xr)=0) the root is xr and stop xr2
f(xu)
Bisection Method - Termination Criteria
t 100% r
X true Xu Xl
a 100% (Bisection)
Xu Xl
f(c)
c
mg m
t
f (c ) (1 e ) v
c
667.38
f (c ) (1 e 0.146843c ) 40
c
c
f(x)
1. Assume xl =12 and xu=16
f(xl)=6.067 and f(xu)=-2.269
6.067
Iter. Xl Xu Xr a% t%
1 12 16 14 ----- 5.279
2 14 16 15 6.667 1.487
3 14 15 14.5 3.448 1.896
4 14.5 15 14.75 1.695 1.204
5 14.75 15 14.875 0.84 0.641
6 14.74 14.875 14.813 0.422 0.291
Bisection method
Bracketing Methods
Bisection
Example;
Use bisection method to find the root of
3 2
f ( x) x 4x 10
Continue the iterations until the approximate error falls
below a stopping criteria ( s ) = 0.5%
Flow Chart –Bisection
Start
Input: xl , xu , s, maxi
i=0
a=1.1 s
while False
a> s &
i <maxi
Print: xr , f(xr ) , a , i
xl xu
xr
2 Stop
i i 1
xu+xl =0
True xu xl
a 100%
xu xl
Test=f(xl).
f(xr)
Test= True
0 a=0.0
Test< True
0 xu=xr
False
xl=xr
Bracketing Methods
2. False-position Method
• The bisection method divides the interval xl to xu in
half not accounting for the magnitudes of f(xl) and
f(xu). For example if f(xl) is closer to zero than f(xu),
then it is more likely that the root will be closer to
f(xl).
2. False-position Method
f(xu)
xl xr xu
x
f(xl) f(xr)
f ( xl ) f ( xu )
xr xl xr xu
f ( xu )( xl xu )
xr xu
f ( xl ) f ( xu )
False-position Method -Procedure
Step 1: Choose lower xl and upper xu guesses for the
root such that: f(xl).f(xu)<0
Step 2: The root estimate is:
f ( xu )( xl xu )
xr xu
f ( xl ) f ( xu )
Input: xl , x0 , s, maxi
i=0
a=1.1 s
while False
a> s &
i <maxi
Print: xr , f(xr ) , a , i
f (x u )(x l x u )
xr xu
f (x l ) f (x u )
Stop
i i 1
i=1
or
xr=0
True xr x r0
a 100%
xr
Test=f(xl). f(xr)
True
Test=0 a=0.0
True
Test<0 xu=xr
xr0=xr
False
xl=xr
xr0=xr
False Position Method-Example 2
False Position Method - Example 2
Roots of Polynomials: Using Software
Packages
MS Excel:Goal seek
f(x)=x-cos x