0% found this document useful (0 votes)
26 views20 pages

CHAPTER 2 Root Finding

Chapter 2 discusses root-finding methods in numerical analysis, focusing on techniques such as the Bisection Method and Newton's Method for solving equations of the form f(x) = 0. The Bisection Method involves repeatedly halving an interval where the function changes sign, while Newton's Method uses derivatives to iteratively approach a root. Additionally, Fixed-Point Iteration is introduced as a related method for finding roots by reformulating the equation into a fixed-point problem.

Uploaded by

ziph2zn
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)
26 views20 pages

CHAPTER 2 Root Finding

Chapter 2 discusses root-finding methods in numerical analysis, focusing on techniques such as the Bisection Method and Newton's Method for solving equations of the form f(x) = 0. The Bisection Method involves repeatedly halving an interval where the function changes sign, while Newton's Method uses derivatives to iteratively approach a root. Additionally, Fixed-Point Iteration is introduced as a related method for finding roots by reformulating the equation into a fixed-point problem.

Uploaded by

ziph2zn
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/ 20

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.

2.1 BISECTION METHOD or INTERVAL-HALVING METHOD.


• The first technique is called the Bisection, or Interval-Halving method. The method assumes
that f is a continuous function defined on the interval [a, b], with f (a) and f (b) having
opposite signs. The method calls for a repeated halving (or bisecting) of subintervals of [a, b]
and, at each step, locating the half containing the root p.
2.1 BISECTION METHOD.
• The Bisection algorithm may be described as:
1. BEGIN
2. set 𝒊 = 𝟏
3. interval endpoint set 𝒂𝒊 = 𝒂 and set 𝒃𝒊 = 𝒃
4. REPEAT
𝒂𝒊 +𝒃𝒊
5. the midpoint of [𝑎𝑖 , 𝑏𝑖 ] set 𝒑𝒊 = 𝟐
6. If f (𝑝𝑖 ) = 0, then set p = 𝒑𝒊 and goto Step 11
7. If f (𝑝𝑖 ) and f (𝑎𝑖 ) have the same sign, set 𝒂𝒊+𝟏 =𝒑𝒊 and 𝒃𝒊+𝟏 =𝒃𝒊 and goto Step 9
8. If f (𝑝𝑖 ) and f (𝑏𝑖 ) have the same sign, set 𝒂𝒊+𝟏 =𝒂𝒊 and 𝒃𝒊+𝟏 =𝒑𝒊
9. set 𝒊 = 𝒊 + 𝟏
10. UNTIL satisfied
11. STOP
2.1 BISECTION METHOD.
• Error in approximated root

• 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 𝑖𝑠 ≤ ? ?

& 𝑎𝑏𝑠𝑜𝑙𝑢𝑡𝑒 𝑒𝑟𝑟𝑜𝑟 𝑜𝑓 𝑝3 𝑖𝑠 ≤? ?


2.2 NEWTON'S METHOD
• Newton's method (also called Newton-Raphson method) is one of the most widely used
methods of solving equations. It can be used to determine the roots of
𝑓 𝑥 =0 (eq1)
provided function 𝑓 𝑥 is continuous and has a first derivative.
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 (eq2)
2!
Since 𝑥0 in the vicinity of the exact root 𝑥, i.e. 𝑥 − 𝑥0 ≅ 0, we can neglect term involving
higher powers of 𝑥 − 𝑥0 . Thus eq2 takes the form:
𝑓 𝑥0 + 𝑥 − 𝑥0 𝑓 ′ 𝑥0 ≅ 0 (eq3)
The value of 𝑥 is obtained in eq3 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
• Newton's method (also called Newton-Raphson method) is one of the most widely used methods
of solving equations. It can be used to determine the roots of 𝑓 𝑥 = 0 provided function
𝑓 𝑥 is continuous and has a first derivative.
• The algorithm for Newton’s method may simply be described as:
1. BEGIN
2. make initial guess 𝒙𝟎
3. set 𝒊 = 𝟎
4. REPEAT
𝒇(𝒙 )
5. compute 𝒙𝒊+𝟏 = 𝒙𝒊 − 𝒇′(𝒙𝒊 )
𝒊
6. set 𝒊 = 𝒊 + 𝟏
7. UNTIL satisfied
8. STOP

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

• Accurate to 3 decimal places.


2.2 NEWTON'S METHOD- Examples

2.2 NEWTON'S METHOD- Examples
2.2 NEWTON'S METHOD- Exercises 2.2
2.3 FIXED-POINT ITERATION
• The problem of finding roots of 𝑓 𝑥 = 0 is closely related to the problem of finding fixed
points of 𝑥 = 𝑔 𝑥 . For a given root finding problem, we can rearrange 𝑓 𝑥 into an equivalent fixed
point problem 𝑥 = 𝑔 𝑥 so that if 𝑟 is a solution r = 𝑔 𝑟 it also a solution of 𝑓 𝑟 = 0

• Example: 𝑓 𝑥 = 𝑥 2 − 2𝑥 − 3 = 0 may be rewritten as


1 3
𝑥 = 𝑔1 𝑥 = 2𝑥 + 3, 𝑥 = 𝑔2 𝑥 = (𝑥 2 − 3), 𝑥 = 𝑔3 𝑥 =
2 𝑥−2
2
𝑥 = 𝑔4 𝑥 = 𝑥 − 𝑥 − 3, 𝑥 = 𝑔5 𝑥 = − 2𝑥 + 3, etc.
You can construct infinitely many 𝑔(𝑥)s from a given function 𝑓 𝑥 .
One can easily verify that above equation 𝑓 𝑥 = 0 has roots 𝑥 = −1 and 𝑥 = 3.

• 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 ∈ 𝐼.

Iteration using 𝑔1 𝑥 = 2𝑥 + 3 with 𝑥0 = 4

CONDITION TO GUARANTEE CONVERGENCE


3
1.(a) 𝑔1 𝑥 = 2𝑥 + 3 continuous for 𝑥 ≥ −
2
1 3
1.(b) 𝑔′1 𝑥 = continuous for 𝑥 > −
2𝑥+3 2
3
Thus 𝑔1 𝑥 and 𝑔′1 𝑥 both cont. for 𝑥 > −
2
1
2. |𝑔′ 𝑥 | = < 1 for 2𝑥 + 3 > 1 i.e. for 𝑥 > −1
2𝑥+3
3. 𝑥0 = 4
Thus for interval 𝐼 = (−1, +∞) all three conditions
are satisfied.
Thus convergence was guaranteed.
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

CONDITION TO GUARANTEE CONVERGENCE


1
1.(a) 𝑔1 𝑥 = (𝑥 2 − 3) continuous for all 𝑥
2
1.(b) 𝑔′1 𝑥 = 𝑥 continuous all 𝑥
Thus 𝑔1 𝑥 and 𝑔′1 𝑥 both cont. forall 𝑥
2. |𝑔′ (𝑥)| = |𝑥| < 1 for −𝟏 < 𝑥 < 𝟏
3. 𝑥0 = 4
Conditions 2 and 3 not satisfied. There is no root in
(-1, 1) and 𝑥0 = 4 is outside this interval.
Thus convergence is NOT guaranteed.
2.3 FIXED-POINT ITERATION - Exercises

• Show that convergence is guaranteed in interval [1, 1.5] in (c)


• Show that convergence is guaranteed in interval [1, 2] in (d)
2.4 FIXED-POINT ITERATION
2.4 SECANT METHOD
2.4 SECANT METHOD - Exercises

You might also like