CHAPTER 2 Root Finding
CHAPTER 2 Root Finding
2.0 INTRODUCTION
• The root-finding problem is one of the most basic problems of numerical approximation. In
many practical problems we are required to solve an equation of the form 𝑓 𝑥 = 0. If f (x) is
purely a polynomial in x then the equation f (x) = 0 is said to be an algebraic equation,
otherwise if f (x) also contains other functions like Exponential, Logarithmic, Trigonometric
functions in x , then the equation is called a Transcendental Equation.
• NB: In numerical analysis all the calculation are carried out in radians mode not in degrees
mode.
• A result which will prove very useful is given in the following theorem:
THEOREM: If a function f (x) assumes values of opposite signs at the end points of interval
𝐼 = [𝑎, 𝑏], i.e. if 𝑓 (𝑎) 𝑓 (𝑏) < 0 then the interval 𝐼 will contain at least one root of the equation
𝑓 (𝑥) = 0.
• We look at several techniques for solving 𝑓 𝑥 = 0.
• Hence starting with interval [𝑎, 𝑏] and making n iterations, the approximate root 𝒑𝒏 has:
𝑏−𝑎
𝑎𝑏𝑠𝑜𝑙𝑢𝑡𝑒 𝑒𝑟𝑟𝑜𝑟 ≤ 𝑛
2
2.1 BISECTION METHOD
• From the 5th iteration 𝑎𝑛 , 𝑏𝑛 , and 𝑝𝑛 are equal up to two decimal places.
NB: All the calculation were carried out in radians mode not in degrees mode.
2.1 BISECTION METHOD
•
𝑎𝑏𝑠𝑜𝑙𝑢𝑡𝑒 𝑒𝑟𝑟𝑜𝑟𝑜𝑓 𝑝9 𝑖𝑠 ≤ ? ?
1st DERIVATION: This method may be derived using the Taylor’s series expansion
about a point 𝑥0 in the vicinity of the exact root 𝑥.
𝑥−𝑥0 2 ′′
𝑓 𝑥 = 𝑓 𝑥0 + 𝑥 − 𝑥0 𝑓 ′ 𝑥0 + 𝑔 𝑥0 + ⋯ = 0 (eq1)
2!
Since 𝑥0 in the vicinity of the exact root 𝑥, i.e. 𝑥 − 𝑥0 ≅ 0, we can neglect term involving higher
powers of 𝑥 − 𝑥0 . Thus eq1 takes the form:
𝑓 𝑥0 + 𝑥 − 𝑥0 𝑓 ′ 𝑥0 ≅ 0 (eq2)
The value of 𝑥 is obtained in eq2 by making 𝑥 the subject of the formula, in which case we get:
𝑓 𝑥0
𝑥 = 𝑥0 −
𝑓 ′ 𝑥0
Which suggests an iterative scheme of the form:
𝒇 𝒙𝒏
𝒙𝒏+𝟏 = 𝒙𝒏 − (eq4)
𝒇′ 𝒙𝒏
2.2 NEWTON'S METHOD
2nd DERIVATION: An alternative derivation of Newton’s method makes use of the graphical
∆𝑦
method. Recall that the slope 𝑚 of a straight line is given by: 𝑚 = and the slope of function
∆𝑥
𝑓 at 𝑥0 is 𝑓′(𝑥0 ). Now consider the figure on the right:
We have that
∆𝑦 = 𝑓 𝑥0 − 0 = 𝑓 𝑥0 , and ∆𝑥 = 𝑥0 − 𝑥1
𝑓 𝑥0
Therefore 𝑓′(𝑥0 ) = 𝑚 =
𝑥0 −𝑥1
making 𝑥1 the subject of the formula in above equation
𝑓 𝑥0
gives 𝑥1 = 𝑥0 −
𝑓′(𝑥0 )
𝒇 𝒙𝒏
Which suggests an iterative scheme of the form: 𝒙𝒏+𝟏 = 𝒙𝒏 −
𝒇′ 𝒙𝒏
2.2 NEWTON'S METHOD - Examples
•
2.2 NEWTON'S METHOD - Examples
• Example 2
Compute a zero of the function 𝑓 𝑥 = 3𝑥 + sin 𝑥 − 𝑒 𝑥 .
• Solution
• Under suitable conditions (see theorem below), the iterative formula 𝒙𝒏+𝟏 = 𝒈 𝒙𝒏
converges to the fixed point r , which is a root of 𝒇 𝒙 = 𝟎.
THEOREM:
2.3 FIXED-POINT ITERATION
• Hence to guarantee convergence:
1. Both 𝑔 𝑥 and 𝑔′ 𝑥 must be continuous on an interval 𝐼 that includes the root 𝑟,
2. |𝑔′ 𝑥 | < 1 for all 𝑥 ∈ 𝐼, and
3. 𝑥0 must be chosen so that 𝑥0 ∈ 𝐼.
1
Iteration using 𝑔2 𝑥 = (𝑥 2 − 3) with 𝑥0 = 4
2