Week02 Bracketing Methods
Week02 Bracketing Methods
WEEK 2
LESSON OUTCOMES
At the end of this topic, the students will be able:
To identify and apply the bracketing methods to
solve roots of equations
9/14/2012
Roots of Equation
Root of equation is obtained at value of x when the f(x)=0
Before digital computers, root of algebraic and transcendental
equations could be found by
direct method that can be solved analytically, but not easy for complex
function
plot function and determine where it crosses the x axis, but it lacks of
precision
Why?
ax 2 bx c 0 x
But
b b 2 4ac
2a
ax 5 bx 4 cx 3 dx 2 ex f 0 x ?
sin x x 0 x ?
4
Roots of Equations
Bracketing methods
Methods start with two
initial guesses that bracket
(or contain) the root and
then systematically reduce
the width of the bracket.
Open methods
Methods involve systematic
trial-and-error iterations but
no need for the initial
guesses to bracket the root.
Graphical Methods
This is a simple method to get an estimate of the root of the
equation f(x) =0.
The function f(x) is plotted against x and the location(s)
where it crosses the x axis (i.e. f(x) = 0) provides a rough
approximation of the root(s).
Graphical techniques are limited practical value (not precise).
It can be utilized to obtain rough estimates of roots.
These estimates can be used as initial guesses for advanced
numerical methods.
9/14/2012
Example
Use the graphical approach to determine the drag coefficient c needed
for a parachutist of mass m = 68.1kg to have a velocity of 40m/s after free
falling for time t=10s. Note: acceleration due to gravity is 9.8 m/s2.
Solution
From equation that derived
from Newtons second law
for the parachutists velocity:
Inserting all
parameters:
f (c )
the
known
667.38
(1 e 0.146843c ) 40
c
f(c)
34.115
17.653
12
6.067
16
-2.269
20
-8.401
Upper bound,
f(xu)
Lower bound,
f(xl)
f(x)
f(x)
Xl
Xu
x
Xl
Xu
Xu
*
*
Xl
*
x
Xl
Xu
9/14/2012
Bisection Method
From the graphical method, we found that when a function f(x) is continuous
and real in the interval from xl to xu , and f(xl) and f(xu) have opposite signs,
10
If f(xl) f(xr) <0 the root lies in the lower subinterval, then
set xr as xu, and repeat to find new xr
If f(xl) f(xr) >0 the root lies in the upper subinterval, then
xrnew xrold
100 %
xrnew
Example
Use the bisection method to determine the drag coefficient c needed for a
parachutist of mass m = 68.1kg to have a velocity of 40m/s after free falling
for time t=10s. Note: acceleration due to gravity is 9.8 m/s2. Given s=0.5%
and true value = 14.7802.
667.38
f (c )
(1 e 0.146843c ) 40
c
Solution
Guess two values of the unknown that give values for f(c) with different signs.
From previous example, f(c) changes sign between 12 and 16. Therefore,
set xl = 12 and xu = 16.
Estimate the root,
xr
xl xu 12 16
14
2
2
9/14/2012
xr
xl xu 14 16
15
2
2
Compare a with s.
xrnew xrold
15 14
100 %
100 % 6.667% s
xrnew
15
xr
xl xu 14 15
14.5
2
2
Compare a with s.
xrnew xrold
14.5 15
100 %
100 % 3.448% s
xrnew
14.5
13
t(%)
Iteration
xl
xu
xr
12
16
14
14
16
15
6.667
1.487
14
15
14.5
3.448
1.896
14.5
15
14.75
1.695
0.204
14.75
15
14.875
0.840
0.641
14.75
14.875
14.8125
0.422
0.219
5.279
14
Exercise
Find the root of the 3rd-order polynomial using bisection
f ( x) x3 x 2 10 x 8 0
15
9/14/2012
16
l(xr)
f ( xl )
f ( xu )
xr xl xr xu
Solving for xr ,
xr xu
f ( xu )( xl xu )
f ( xl ) f ( xu )
xr xu
f ( xu )( xl xu )
f ( xl ) f ( xu )
9/14/2012
Example
Use the false position method with guess of xl = 12 and xu = 16 to determine
the drag coefficient c needed for a parachutist of mass m = 68.1kg to have a
velocity of 40m/s after free falling for time t=10s. Note: acceleration due to
gravity is 9.8 m/s2. Given s=0.5% and true value = 14.7802.
f (c )
667.38
(1 e 0.146843c ) 40
c
First iteration
xl 12
f ( xl ) 6.0669
xu 16
f ( xu ) 2.2688
x r 16
2.2688(12 16)
6.0669 ( 2.2688)
14.9113
19
Second iteration
f ( xl ) 6.0669
xu 14.9113 f ( xu ) 0.2543
x r 14.9113
[ xu replace by x r ]
0.2543(12 14.9113)
6.0669 ( 0.2543)
14.7942 14.9113
14.7942
14.7942
100% 0.79%
20
Third iteration
f ( xl ) 6.0669
xu 14.7942 f ( xu ) 0.0273
x r 14.7942
[ xu replace by x r ]
0.0273(12 14.7942)
6.0669 ( 0.0273)
14.7817 14.7942
14.7817
14.7817
100% 0.0846%
21
9/14/2012
Exercise
Find the root of the 3rd-order polynomial using FP
f ( x) x3 x 2 10 x 8 0
22
Lets try
Use both the bisection and false-position method to find the
root of
f ( x) x 4 2 0
23
Exercise
(5.4) Determine the roots of f(x) = -12 21x +18x2 2.75x3
with
a) Bisection
b) False position
Using initial guess of xl = -1 and xu = 0 and stopping criterion
of 1%.
(5.6) Determine the positive real root of ln(x4)=0.7
a) Using three iterations of the bisection method with
initial guesses of xl = 0.5 and xu = 2,
b) Using three iterations of the false position method with
same initial guesses as in (a).
24