GEM 803 Chapter 2 (3rd Term) PDF

Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

GEM 803

Numerical
Methods
CHAPTER 2

ROOTS OF NONLINEAR EQUATIONS


Roots of Nonlinear Equations
A. Bracketing Methods
These methods deal on the fact that a function
typically changes sign in the vicinity of a root. These
techniques are called bracketing methods because
two initial guesses for the root are required. As the
name implies, these guesses must “bracket” or be
on either side of the root.
1. Bisection Method
Steps:
(a) Choose lower xl and upper xu guesses for the root such that
the function changes sign over the interval. This can be checked
by ensuring f(xl)f(xu) < 0.
(b) An estimate of the root xr is determined by
xl + xu
xr =
2
(c) Make the following evaluations to determine in which
subinterval the root lies:
• If f(xl)f(xr) < 0, the root lies in the lower subinterval. Set xu = xr and
return to step (b)
• If f(xl)f(xr) > 0, the root lies in the lower subinterval. Set xl = xr and
return to step (b)
• If f(xl)f(xr) = 0, the root equals xr; terminate the iteration.
1. Bisection Method
Example
Locate the first nontrivial root of
e-x + sin2x = x2.
Use a bisection method with the initial interval from 1 to 2
2. Method of False Position
(Regula-Falsi Method)
Using similar triangles, the intersection of the straight line with the x axis can
be estimated as
f ( xl ) f ( xu )
=
xr − xl xr − xu

which can be solved for


f ( xu )( xl − xu )
xr = xu −
f ( xl ) − f ( xu )
2. Method of False Position
Example
Apply false position method to locate the first nontrivial root
of
e-x + sin2x = x2.
with the initial interval from 1 to 2.
B. Open Methods
1. Simple Fixed Point Iteration
Rearrange the function f(x) = 0 so that x is on the left-side of the equation
x = g(x)
The utility of this equation is that it provides a formula to predict a new
value of x. Thus, given an initial guess at the root xi, equation above can
be used to compute a new estimate xi+1 as expressed by the iterative
formula
xi + 1 = g(xi)
The approximate error for this equation can be determined using the
error estimate
xi +1 − xi
a = .100%
xi +1
1. Simple Fixed Point Iteration
Example
Use simple-fixed point iteration to locate the root of

f ( x) = sin x − x
Use an initial guess of x0 = 0.5 and iterate until a  0.01%
2. Newton-Raphson Method
f ( xi )
xi +1 = xi −
f ' ( xi )
Example
Employ the Newton-Raphson method to determine the root of

e-x + sin2x = x2.


3. Secant Method

Since f ( xi −1 ) − f ( xi )
f ' ( xi ) 
xi −1 − xi
Thus,
f ( xi )( xi −1 − xi )
xi +1 = xi −
f ( xi −1 ) − f ( xi )
Example
Apply the Secant method to determine the root of

e-x + sin2x = x2.


4. Newton-Raphson Second Method
−1
 f ' ' ( xi ) f ' ( xi ) 
xi +1 = xi +  − 
 2 f ' ( xi ) f ( xi 
)
Example
Employ the Newton-Raphson second method to determine the roots of

e-x + sin2x = x2.

You might also like