0% found this document useful (0 votes)
53 views

Chapter 2 Root Finding

The document discusses several numerical methods for finding roots or zeros of equations, including: 1. The bisection method, which repeatedly halves the interval containing the root until the interval is smaller than a specified tolerance. 2. The false position or regula falsi method, which uses the intersection of a line between two points and the x-axis to find an improved estimate of the root. 3. The fixed point iteration method, which rearranges the function into the form x = g(x) and generates a sequence of values that converge to a fixed point of the function g(x). 4. The Newton-Raphson method, which uses the tangent line at a point to

Uploaded by

yonatan
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)
53 views

Chapter 2 Root Finding

The document discusses several numerical methods for finding roots or zeros of equations, including: 1. The bisection method, which repeatedly halves the interval containing the root until the interval is smaller than a specified tolerance. 2. The false position or regula falsi method, which uses the intersection of a line between two points and the x-axis to find an improved estimate of the root. 3. The fixed point iteration method, which rearranges the function into the form x = g(x) and generates a sequence of values that converge to a fixed point of the function g(x). 4. The Newton-Raphson method, which uses the tangent line at a point to

Uploaded by

yonatan
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/ 9

Numerical Methods (CENG 2084) Lecture Note

CHAPTER-II
ROOTS OF EQUATIONS
2.1 Introduction

The roots or zeros of equations can be simply defined as the values of x that makes f(x) =0. There are
many ways to solve for roots of equations. For some cases, the roots can be found easily by solving the
equations directly. However, there are also other cases where solving the equations directly or
analytically is not so possible. In such instances, the only alternatives will be approximate solution
techniques. There are several techniques of such type and some of them will be discussed in this
chapter.

2.2 Graphical method

One alternative to obtain an approximate solution is to plot the function and determine where it crosses
the x-axis. This point, which represents the x-value for which f(x)=0 is the root.
Graphical techniques are of limited practical value because they are not precise. However, graphical
methods can be utilized to obtain rough estimates of the roots. These estimates can be employed as
starting guesses for numerical methods which will be discussed in the next sections.

2.3 The Bisection method


If a function f is real and continuous in an interval from a to b and f(a) and f(b) have opposite
signs then there exists at least one real root r between a and b such that f(r) =0.

Procedure for Bisection method:

The procedure in this method consists of continuously halving the interval that contains the root.

i. Choose two initial guesses a and b which bracket the root. i.e. f(a) and f(b) have opposite signs
[f(a). f(b)<0]. This can be done by evaluating the function at a and b or by plotting the graph of
the function.

ii. Estimate the root c from


a+b
c=
2

iii. Make the following evaluations to determine the interval in which the root lies

• If f(a).f(c) < 0 ,the root lies in the sub interval (a,c); then b=c and return to step ii
• If f(a).f(c) > 0 ,the root lies in the sub interval (c,b); then a=c and return to step ii
• If f(a.)f(c) = 0 , then x= c is an exact solution ; terminate the computation

We repeat this procedure until either the exact root has been found or the interval is smaller than some
specified tolerance.

______________________________________________________________________________
AAiT ADDIS ABABA INSTITUTE OF TECHNOLOGY 1
Numerical Methods (CENG 2084) Lecture Note

Example Find the real solution to the cubic equation x3 + 4x2 -10 = 0.

By plotting the graph of the function we can find that there is a real root between 1 and 2 where the
graph crosses the x-axis and carrying out the Bisection technique on the interval [1,2] using 10
iterations we have the following:

After 10 iterations, the interval has been reduced to [a,b] where

The root lies somewhere in the interval [a,b] the width of which is

The root is alleged to be

The accuracy we can guarantee is one half of the interval width.

If the required accuracy is not yet found we can still increase the number of iterations till our
satisfaction is met.

______________________________________________________________________________
AAiT ADDIS ABABA INSTITUTE OF TECHNOLOGY 2
Numerical Methods (CENG 2084) Lecture Note

2.4 The False position or Regula- Falsi method

An alternative method that exploits a graphical insight over the previous technique is the False position
method where by we join f(a) and f(b) by a straight line and the intersection of this line with the x-axis
represents an improved estimate of the root.

Using similarity of triangles, the intersection point of the line with the x-axis can be estimated as

f (a ) f (b)
=
c−a c−b

Rearranging and solving for c we have

cn = anf (bn) − bnf (an)


f (bn ) − f (an)

cn represents a sequence of points generated by the Regula Falsi process and {cn} will converge to zero
at x = r.

Example Find the real solution to the cubic equation x3 + 4x2 -10 = 0.

Previously we have found out that the graph will cross the x-axis between the interval 1 and 2

and carrying out the Regula -Falsi technique in 10 iterations we have:

After 10 iterations, the interval has been reduced to [a,b] where

The root lies somewhere in the interval [a,b] width of which is


The root we have found above is
______________________________________________________________________________
AAiT ADDIS ABABA INSTITUTE OF TECHNOLOGY 3
Numerical Methods (CENG 2084) Lecture Note

2.5 Fixed Point Iteration method


Iterative techniques are used to find roots of equations, solutions of linear and nonlinear systems of
equations and solutions of differential equations. A rule or function g(x) for computing successive
terms is needed and it can be found by rearranging the function f(x) = 0 so that x is on the left side of
the equation.
x = g(x)
Moreover a starting value P0 is also required and the sequence of values {Pk} is obtained using the
iterative rule Pk+1 = g(Pk). The sequence has the pattern
P1 = g(P0)
P2 = g(P1)
. .
. .
. .
Pk = g(Pk-1)
Pk+1= g(Pk)

Note: - A fixed point of a function g(x) is a number P such that P = g(P) but not a root of the equation
g(x) = 0.

- Geometrically, the fixed points of a function g(x) are the points of intersection of the
curve y = g(x) and the line y = x.
x2
Example Use fixed point iteration to find the fixed point(s) for the function g(x) = 1 + x -
3
By plotting the graph of the function we can find that there is a real root between 3 and 7 where the
graph crosses the x-axis and performing fixed point iteration between 3 and 7 we have:

Hence as we can see the series is converging.

______________________________________________________________________________
AAiT ADDIS ABABA INSTITUTE OF TECHNOLOGY 4
Numerical Methods (CENG 2084) Lecture Note

If seven iterations are not enough to locate the fixed point we can continue the iteration.

Example Use a fixed point iteration method find the real root of f(x) = x3 + 4x2 -10 .

Rearranging the function f(x) in to x = g(x)

i.e. X = [(10-x3)1/2]/2

g(x) = [(10-x3)1/2]/2

Previously we have found out that the root lies on the interval (1,2)

Starting point Po = 1
g(Pi)
Po = 1.000000000 1.500000000
P1 = 1.500000000 1.286953768
P2 = 1.286953768 1.402540804
P3 = 1.402540804 1.345458374
P4 = 1.345458374 1.375170253
P5 = 1.375170253 1.360094193
P6 = 1.360094193 1.367846968
P7 = 1.367846968 1.363887004
P8 = 1.363887004 1.365916733
P9 = 1.365916733 1.364878217
P10 = 1.364878217 1.365410061
P11 = 1.365410061 1.365137821

After 11 iterations, the root has been found that x= 1.365137821 with error of 0.02%.

Exercise Use a fixed point iteration method, find the real root of f(x) = x4+2x2-x -10 .Use an error
tolerance of 0.01%.
______________________________________________________________________________
AAiT ADDIS ABABA INSTITUTE OF TECHNOLOGY 5
Numerical Methods (CENG 2084) Lecture Note

2.6 Newton-Raphson Method

If f(x) and f’(x) are continuous near a root P, then this extra information regarding the nature of f(x) can
be used to develop algorithms that will produce sequences {Pk}that converge faster to P than either the
bisection or false position method. The Newton-Raphson (or simply Newton's) method is one of the
most useful and best known algorithms that relies on the continuity of f(x) and f’(x). The method is
attributed to Sir Isaac Newton (1643-1727) and Joseph Raphson (1648-1715).
If the initial guess at the root is P0, a tangent can be extended from the point [P0, f(P0)]. The point where
this tangent crosses the x-axis usually reperesents an improved estimate of the root and the Newton-
Raphson mehtod can be derived based on the basis of this geometrical interpretation and is expressed
by the iteration
f ( Pk )
Pk+1 = g(Pk) = Pk – for k=0, 1, 2,...
f ' ( Pk )

Example Use Newton- Raphson method to find the three roots of the cubic polynomial.

Determine the Newton-Raphson iteration formula that is used

Use the starting value P0 = 3.

The Newton-Raphson iteration formula g[x] is

Starting with P0 = 3

______________________________________________________________________________
AAiT ADDIS ABABA INSTITUTE OF TECHNOLOGY 6
Numerical Methods (CENG 2084) Lecture Note

Hence,

If we plot the graph we can see that there are two more real roots, using the starting
values 0.0 and 1.4 we can find them.

Starting with P0 = 0.0

Starting with P0 = 1.4

______________________________________________________________________________
AAiT ADDIS ABABA INSTITUTE OF TECHNOLOGY 7
Numerical Methods (CENG 2084) Lecture Note

2.7 Secant Method


The Newton-Raphson algorithm requires two functions evaluations per iteration, f(Pk)
and f’(Pk).However, many functions have derivatives which may be extremely difficult or inconvenient
to evaluate. Hence, it is desirable to have a method for finding a root that does not depend on the
computation of a derivative. The secant method does not need a formula for the derivative and it can be
coded so that only one new function evaluation is required per iteration.

The formula for the secant method is the same one that was used in the regula falsi method, except that
the logical decisions regarding how to define each succeeding term are different and is expressed as:

for

Example Use the secant method to find the three roots of the cubic polynomial.

Determine the secant iteration formula that is used.

• Use the starting values P0=3 and P1=2.8

The secant iteration formula is

First, do the iteration one step at a time.

______________________________________________________________________________
AAiT ADDIS ABABA INSTITUTE OF TECHNOLOGY 8
Numerical Methods (CENG 2084) Lecture Note

• Using the starting values P0=0.6 and P1=0.5

• Using the starting values P0=1.0 and P1=1.1

______________________________________________________________________________
AAiT ADDIS ABABA INSTITUTE OF TECHNOLOGY 9

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy