Ch2a Example Root Finding Methods
Ch2a Example Root Finding Methods
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.
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.
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.
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, . . .
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, . . .
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.
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
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 Î