0% found this document useful (0 votes)
173 views7 pages

Ch2a Example Root Finding Methods

The document discusses three root finding methods: bisection, false position, and fixed point iteration. It provides examples of applying each method to find roots of sample functions. For bisection, it shows finding roots of f(x)=x^2-3 and f(x)=e^-x(3.2sin(x)-0.5cos(x)). For false position, it also solves f(x)=x^2-3 and f(x)=e^-x(3.2sin(x)-0.5cos(x)). For fixed point iteration, it uses three different functions g1(x), g2(x), g3(x) to find the root of x^4

Uploaded by

SK. Bayzeed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
173 views7 pages

Ch2a Example Root Finding Methods

The document discusses three root finding methods: bisection, false position, and fixed point iteration. It provides examples of applying each method to find roots of sample functions. For bisection, it shows finding roots of f(x)=x^2-3 and f(x)=e^-x(3.2sin(x)-0.5cos(x)). For false position, it also solves f(x)=x^2-3 and f(x)=e^-x(3.2sin(x)-0.5cos(x)). For fixed point iteration, it uses three different functions g1(x), g2(x), g3(x) to find the root of x^4

Uploaded by

SK. Bayzeed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Root Findings Methods

Examples: Bisection, False-Position and Fixed Point

Dr. Md. Kamrujjaman


Department of Mathematics
University of Dhaka, Bangladesh

Bisection Method:
Example 1
Consider finding the root of f(x) = x2 - 3. Let εstep = 0.01, εabs = 0.01 and start with the interval [1,
2].
Table 1. Bisection method applied to f(x) = x2 - 3.
a b f(a) f(b) c = (a + b)/2 f(c) Update new b − a
1.0 2.0 -2.0 1.0 1.5 -0.75 a=c 0.5
1.5 2.0 -0.75 1.0 1.75 0.062 b=c 0.25
1.5 1.75 -0.75 0.0625 1.625 -0.359 a=c 0.125
1.625 1.75 -0.3594 0.0625 1.6875 -0.1523 a = c 0.0625
1.6875 1.75 -0.1523 0.0625 1.7188 -0.0457 a = c 0.0313
1.7188 1.75 -0.0457 0.0625 1.7344 0.0081 b = c 0.0156
1.71988/td> 1.7344 -0.0457 0.0081 1.7266 -0.0189 a = c 0.0078

Thus, with the seventh iteration, we note that the final interval, [1.7266, 1.7344], has a width less
than 0.01 and |f(1.7344)| < 0.01, and therefore we chose b = 1.7344 to be our approximation of
the root.
Example 2
Consider finding the root of f(x) = e-x(3.2 sin(x) - 0.5 cos(x)) on the interval [3, 4], this time with
εstep = 0.001, εabs = 0.001.

Table 1. Bisection method applied to f(x) = e-x(3.2 sin(x) - 0.5 cos(x)).


a b f(a) f(b) c = (a + b)/2 f(c) Update new b − a
3.0 4.0 0.047127 -0.038372 3.5 -0.019757 b=c 0.5
3.0 3.5 0.047127 -0.019757 3.25 0.0058479 a=c 0.25
3.25 3.5 0.0058479 -0.019757 3.375 -0.0086808 b=c 0.125
3.25 3.375 0.0058479 -0.0086808 3.3125 -0.0018773 b=c 0.0625
3.25 3.3125 0.0058479 -0.0018773 3.2812 0.0018739 a=c 0.0313
3.2812 3.3125 0.0018739 -0.0018773 3.2968 -0.000024791 b = c 0.0156
3.2812 3.2968 0.0018739 -0.000024791 3.289 0.00091736 a=c 0.0078
3.289 3.2968 0.00091736 -0.000024791 3.2929 0.00044352 a=c 0.0039
3.2929 3.2968 0.00044352 -0.000024791 3.2948 0.00021466 a=c 0.002
3.2948 3.2968 0.00021466 -0.000024791 3.2958 0.000094077 a = c 0.001
3.2958 3.2968 0.000094077 -0.000024791 3.2963 0.000034799 a = c 0.0005

Thus, after the 11th iteration, we note that the final interval, [3.2958, 3.2968] has a width less
than 0.001 and |f(3.2968)| < 0.001 and therefore we chose b = 3.2968 to be our approximation of
the root.

Example 3
Apply the bisection method to f(x) = sin(x) starting with [1, 99], εstep = εabs = 0.00001, and
comment.

After 24 iterations, we have the interval [40.84070158, 40.84070742] and sin(40.84070158) ≈


0.0000028967. Note however that sin(x) has 31 roots on the interval [1, 99], however the
bisection method neither suggests that more roots exist nor gives any suggestion as to where they
may be.
False-Position Method:

Example 1
Consider finding the root of f(x) = x2 - 3. Let εstep = 0.01, εabs = 0.01 and start with the interval [1,
2].
Table 1. False-position method applied to f(x) = x2 - 3.
a b f(a) f(b) c f(c) Update Step Size
1.0 2.0 -2.00 1.00 1.6667 -0.2221 a = c 0.6667
1.6667 2.0 -0.2221 1.0 1.7273 -0.0164 a = c 0.0606
1.7273 2.0 -0.0164 1.0 1.7317 0.0012 a = c 0.0044

Thus, with the third iteration, we note that the last step 1.7273 → 1.7317 is less than 0.01 and
|f(1.7317)| < 0.01, and therefore we chose b = 1.7317 to be our approximation of the root.

Comments:Note that after three iterations of the false-position method, we have an acceptable
answer (1.7317 where f(1.7317) = -0.0044) whereas with the bisection method, it took seven
iterations to find a (notable less accurate) acceptable answer (1.71344 where f(1.73144) =
0.0082)
Example 2
Consider finding the root of f(x) = e-x(3.2 sin(x) - 0.5 cos(x)) on the interval [3, 4], this time with
εstep = 0.001, εabs = 0.001.

Table 2. False-position method applied to f(x) = e-x(3.2 sin(x) - 0.5 cos(x)).


a b f(a) f(b) c f(c) Update Step Size
3.0 4.0 0.047127 -0.038372 3.5513 -0.023411 b=c 0.4487
3.0 3.5513 0.047127 -0.023411 3.3683 -0.0079940 b=c 0.1830
3.0 3.3683 0.047127 -0.0079940 3.3149 -0.0021548 b=c 0.0534
3.0 3.3149 0.047127 -0.0021548 3.3010 -0.00052616 b=c 0.0139
3.0 3.3010 0.047127 -0.00052616 3.2978 -0.00014453 b=c 0.0032
3.0 3.2978 0.047127 -0.00014453 3.2969 -0.000036998 b=c 0.0009
Thus, after the sixth iteration, we note that the final step, 3.2978 → 3.2969 has a size less than
0.001 and |f(3.2969)| < 0.001 and therefore we chose b = 3.2969 to be our approximation of the
root.
In this case, the solution we found was not as good as the solution we found using the bisection
method (f(3.2963) = 0.000034799) however, we only used six instead of eleven iterations.

Question 1: Approximate the root of f(x) = x3 - 3 with the false-position method starting with
the interval [1, 2] and use εstep = 0.1 and εabs = 0.1. Use five decimal digits of accuracy.
Answer: 1.4267

Question 2: Approximate the root of f(x) = x2 - 10 with the false-position method starting with
the interval [3, 4] and use εstep = 0.1 and εabs = 0.1.
Answer: 3.16
FIXED POINT ITERATION METHOD
Example 1
Find a root of x4-x-10 = 0.

Solution: Consider g1(x) = 10 / (x3-1) and the fixed point iterative scheme
xi+1=10 / (xi3 -1), i = 0, 1, 2, . . .

Let the initial guess x0 be 2.0

i 0 1 2 3 4 5 6 7 8
xi 2 1.429 5.214 0.071 -10.004 -9.978E-3 -10 -9.99E-3 -10
So the iterative process with g1 gone into an infinite loop without converging.

Consider another function g2(x) = (x + 10)1/4 and the fixed point iterative scheme
xi+1= (xi + 10)1/4, i = 0, 1, 2, . . .

Let the initial guess x0 be 1.0, 2.0 and 4.0

i 0 1 2 3 4 5 6
xi 1.0 1.82116 1.85424 1.85553 1.85558 1.85558
xi 2.0 1.861 1.8558 1.85559 1.85558 1.85558
xi 4.0 1.93434 1.85866 1.8557 1.85559 1.85558 1.85558

That is for g2 the iterative process is converging to 1.85558 with any initial guess.

Consider g3(x) =(x+10)1/2/x and the fixed point iterative scheme


xi+1=( xi+10)1/2 /xi, i = 0, 1, 2, . . .

Let the initial guess x0 be 1.8,

i 0 1 2 3 4 5 6 . . . 98
xi 1.8 1.9084 1.80825 1.90035 1.81529 1,89355 1.82129 . . . 1.8555
That is for g3 with any initial guess the iterative process is converging but very slowly
to the expected root.
Geometric interpretation of convergence with g1, g2 and g3

Fig g1 Fig g2 Fig g3

The graphs Figures Fig g1, Fig g2 and Fig g3 demonstrates the Fixed point Iterative
Scheme with g1, g2 and g3 respectively for some initial approximations. It's clear from
the

 Fig g1, the iterative process does not converge for any initial approximation.
 Fig g2, the iterative process converges very quickly to the root which is the
intersection point of y = x and y = g2(x) as shown in the figure.
 Fig g3, the iterative process converges but very slowly.

Example 2
The equation x4 + x = Î, where Î is a small number , has a root which is close to Î.
Computation of this root is done by the expression x = Î - Î 4 + 4Î7 Then find an
iterative formula of the form xn+1 = g(xn ), if we start with x0 = 0 for the computation
then show that we get the expression given above as a solution. Also find the error in
the approximation in the interval [0, 0.2] .
Proof
Given x4 + x = Î
x(x3 + 1) = Î
x = Î/(1 + x3) or xi = Î/(1 + xi 3) i = 0, 1, 2, . . .
x0 = 0
x1 = Î
x2 = Î/ (1 + Îi3) = Î(1 + Îi3 )-1
= Î(1 - Î3 + Î6 + . . .)
= Î - Î4 + Î 7 + . . .
x3 = Î/( 1 + (Î - Î 4 + Î7)3) = Î[1 + ( Î - Î4 + Î7)-3] = Î - Î4 + 4Î 7
Now taking x = Î - Î4 + 4Î7
error = x 4 + x - Î
= (Î - Î 4 + 4Î7)4 + (Î - Î 4 + 4Î7) - Î
= 22Î10 + higher order power of Î

You might also like