100% found this document useful (1 vote)
193 views18 pages

Numerical

The document describes two bracketing methods for finding roots of equations numerically: the bisection method and the false position method. The bisection method iteratively selects the midpoint of a bracketing interval that contains the root, while the false position method uses the slope of a line between two points to update the root estimate. Both methods require initial bracketing points enclosing the root and converge toward the root by recursively narrowing the bracketing interval. Examples are provided to illustrate the step-by-step process of each method.

Uploaded by

Zaynab Msawat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
193 views18 pages

Numerical

The document describes two bracketing methods for finding roots of equations numerically: the bisection method and the false position method. The bisection method iteratively selects the midpoint of a bracketing interval that contains the root, while the false position method uses the slope of a line between two points to update the root estimate. Both methods require initial bracketing points enclosing the root and converge toward the root by recursively narrowing the bracketing interval. Examples are provided to illustrate the step-by-step process of each method.

Uploaded by

Zaynab Msawat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

Content

Introduction :

Finding Roots using


Numerical Methods

Bracketing Method
• Bisection method
• False-Position method
BRACKETING METHODS
• Bracketing methods always converge to the true solution.
• There are two types bracketing methods; bisection method
and false position method.
• Bisection Method

Figure 5: Solution of f(x) = 0


 
Algorithm
For the continuous equation of one variable, f x = 0,

Step 1: Choose the lower guess, xl and the upper guess, xu that bracket the root such that the
function has opposite sign over the interval,
xl≤ x ≤ xu.
Step 2: The estimation root, xr is computed by using

Step 3: Use the following evaluations to identify the subinterval that the root lies

✓ If f xl. f xr < 0, then the root lies in the lower subinterval. Therefore, set xu = xr and repeat
Step 2.

✓ If f xl. f xr > 0, then the root lies in the upper subinterval. Therefore set xl = xr and repeat Step
2.

✓ If f xl. f xr = 0, then the root is equal to xr. Terminate the computation.

Step 4: Calculate the approximate percent relative error,

Step 5: Compare with. If ɛa < ɛs, then stop the computation. Otherwise go to Step 2 and repeat
the process by using the new interval.
 Example:
Use three iterations of the bisection method to determine the root of f x = −0.6 + 2.4x + 5.5.
Employ initialguesses, xl = 5 and xu = 10. Compute the approximate percent relative error, ɛa
and true percent relative error, ɛt
after each iteration.

Calculate the true value for the given quadratic function f x = −0.6 + 2.4x + 5.5 using quadratic
formula (or you cancalculate directly by using the calculator)

x=-1.6286, x=5.6286

Choose the true value, x = 5.6286 for the highest root of f x .Estimate the root of f x using
bisection method with initial guess
xl = 5 and xu = 10
FALSE POSITION METHOD

Graphical Illustration of False Position


Method
FALSE POSITION METHOD (Cont.)
False Position Method Formula

Straight line joining the two


points 𝑥 𝑙 , 𝑓(𝑥 𝑙 ) and
𝑓(𝑥 𝑢 )  𝑓(𝑥 𝑙 )  𝑦  𝑓(𝑥 𝑢 )
𝑥𝑢 𝑥𝑢
 𝑥𝑙 𝑥
𝑥 𝑢 , 𝑓(𝑥 𝑢 ) is given by

Since the line intersect the


𝑥-axis at 𝑥 𝑟 , so for 𝑥𝑢  𝑓(𝑥𝑢 )( 𝑥 𝑢  𝑥 𝑙 )
𝑥𝑟 
𝑥 = 𝑥 𝑟 , 𝑦 = 0, the following 𝑓(𝑥 𝑢 )  𝑓(𝑥 𝑙 )
is obtained

Rearranging the second


equation yields the False  𝑓(𝑥𝑢)( 𝑥𝑙  𝑥𝑢 ) 
𝑥𝑟  𝑥 𝑢  
Position Method Formula  𝑓(𝑥𝑙)  𝑓(𝑥 𝑢 ) 
FALSE POSITION METHOD (Cont.)
Algorithm
For the continuous equation of one variable, 𝑓 𝑥 = 0,
Step 1: Choose the lower guess, 𝑥𝑙 and the upper guess, 𝑥 𝑢 that bracket the root such that the function has
opposite sign over the interval, 𝑥𝑙 ≤ 𝑥 ≤ 𝑥 𝑢 .
Step 2: The estimation root, 𝑥𝑟 is computed by using

 𝑓(𝑥𝑢)( 𝑥𝑙  𝑥𝑢 ) 
𝑥𝑟  𝑥 𝑢  
 𝑓(𝑥𝑙)  𝑓(𝑥 𝑢 ) 
Step 3: Use the following evaluations to identify the subinterval that the root
lies If 𝑓 𝑥𝑙 ∙ 𝑓 𝑥𝑟
< 0, then the root lies in the lower subinterval. Therefore, set 𝑥 𝑢 = 𝑥 𝑟 and repeat Step 2.
 If 𝑓 𝑥𝑙 ∙ 𝑓 𝑥𝑟
> 0, then the root lies in the upper subinterval. Therefore set 𝑥𝑙 = 𝑥 𝑟 and repeat Step 2.
 If 𝑓 𝑥𝑙 ∙ 𝑓 𝑥 𝑟 = 0, then the root is equal to 𝑥 𝑟 . Terminate the
computation.
Step 4: Calculate the approximate percent relative error,

a  𝑥 rpresent  𝑥 previous
r
100%
present
𝑥r
Step 5: Compare with. If 𝜀 𝑎 < 𝜀 𝑠 , then stop the computation. Otherwise go to Step 2 and repeat the process
by using the new interval.
FALSE POSITION METHOD (Cont.)
Example
Determine the first root 𝑓 𝑥 =exp(-x)(3.2sin(x)-0.5cos(x)) by using False position
method. Use the initial guesses of 𝑥𝑙 = 3 and 𝑥 𝑢 = 4 with stopping criterion,
𝜀𝑠=0.002%.
solution
•First iteration, 𝑥 ∈ [3,4]
• 𝑓(3)  0.0471
•  -0.0384
𝑓 (4)
• First estimate using False position method is

𝑥r (-0.0384)(3 4)
 4  0.0471  (0.0384)

3.5512
𝑓 (3.5512)  -0.0234

Since 𝑓 𝑥𝑙 ∙ 𝑓 𝑥 𝑟 < 0, the root lies in the lower subinterval.


Then set
𝑥 𝑢 = 3.5512.
a 1 0 0 %
FALSE POSITION METHOD (Cont.)
solution

Second iteration, 𝑥 ∈ [3, 3.5512].

Second estimate is

𝑥r  3.5512(0.0234)(3- 3.5512)  3.3683


0.0471  (0.0234)
𝑓 (3.3683)  0.0080
Since 𝑓 𝑥𝑙 ∙ 𝑓 𝑥 𝑟 < 0, the root lies in the lower subinterval. Then set
𝑥 𝑢 = 3.3683.
a 5.4304%
FALSE POSITION METHOD (Cont.)
Solution cont.

Continue the third iteration for 𝑥 ∈ [3,3.3683]. The results are summarized in the
following table.

1 3 4 3.5512 0.0471 -0.0384 -0.0234 100


2 3 3.5512 3.3683 0.0471 -0.0234 -0.0080 5.4304
3 3 3.3683 3.3149 0.0471 -0.0080 -0.0022 1.6113
4 3 3.3149 3.3011 0.0471 -0.0022 -0.0005 0.4168
5 3 3.3011 3.2977 0.0471 -0.0005 -0.0001 0.1037
6 3 3.2977 3.2969 0.0471 -0.0001 -0.0000 0.0256
7 3 3.2969 3.2967 0.0471 -0.0000 -0.0000 0.0063
8 3 3.2967 3.2966 0.0471 -0.0000 -0.0000 0.0015
Summary of false-position Method
• Advantages:
1.Simple.
2.Brackets the Root.
• Disadvantages:
1.Can be Very slow.
2.Like Bisection, need an initial around the root.
REFERENCES:
• Chapra, C. S. & Canale, R. P. Numerical Methods for Engineers, Sixth Edition,
McGraw-Hill,2010.
Thank you

You might also like