Methods such as bisection method and of

advertisement
Numerical
Analysis
Lecture 6
Chapter 2
Solution of
Non-Linear
Equations
Introduction
Bisection Method
Regula-Falsi Method
Method of iteration
Newton - Raphson Method
Secant Method
Muller’s Method
Graeffe’s Root Squaring
Method
Bisection
Method
(Bolzano)
Regula-Falsi
Method
Method of false
position
Method of
Iteration
Let x = a is the desired
root
x   ( x)
Suppose x0 is its initial
approximation. The first
and successive
approximations to the
root can be obtained as
x1   ( x0 ) 

x2   ( x1 ) 


xn 1   ( xn ) 

Newton Raphson
Method
An approximation to
the root is given by
f ( x0 )
x1  x0 
f ( x0 )
Better and successive
approximations x2, x3, …, xn
to the root are obtained from
xn 1
f ( xn )
 xn 
f ( xn )
N-R Formula
Example
Find a real root of the
equation x3 – x – 1 = 0 using
Newton - Raphson method,
correct to four decimal
places.
Solution
3
x –x
Let f (x) =
– 1,
Then f (1) = – 1,
f (2) = 5
Therefore, the root lies
in the interval (1, 2).
Further f’ (x) = 3x2 – 1,
f” (x) =6x
f (1)  1,
f (2)  5,
f (1)  6,
f (2)  12
Since f (2) and f”(2) are of the same
sign, we choose x0 = 2 as the first
approximation to the root.
The second approximation is
computed using Newton-Raphson
method as
f ( x0 )
5
x1  x0 
 2
 1.54545
f ( x0 )
11
and
f ( x1 )  1.14573
The successive approximations are
1.14573
x2  1.54545 
 1.35961,
6.16525
0.15369
x3  1.35961 
 1.32579,
4.54562
f ( x2 )  0.15369
f ( x3 )  4.60959 10 3
4.60959 103
x4  1.32579 
 1.32471,
4.27316
5
3.39345 10
x5  1.32471 
 1.324718,
4.26457
f ( x4 )  3.39345 10
5
f ( x5 )  1.823 107
Hence, the required
root is 1.3247.
Note !
Methods such as bisection
method and the false position
method of finding roots of a
nonlinear equation f( x ) = 0
require bracketing of the root
by two guesses. Such methods
are called bracketing methods.
These methods are
always convergent
since they are based on
reducing the interval
between the two
guesses to zero in on
the root.
In the Newton-Raphson
method, the root is not
bracketed. Only one initial
guess of the root is needed
to get the iterative process
started to find the root of an
equation. Hence, the method
falls in the category of open
methods.
Newton - Raphson method is
based on the principle that if the
initial guess of the root of f( x ) = 0
is at xi, then if one draws the
tangent to the curve at f( xi ), the
point xi+1 where the tangent
crosses the x-axis is an improved
estimate of the root
f(x)
x

 i,
f  xi  

f(xi)
f(xi+1)
X

xi+2
xi+1
xi
Draw backs of N-R
Method
Divergence at inflection points:
If the selection of a guess or an
iterated value turns out to be close
to the inflection point of f ( x ),
[where f”( x ) = 0 ],
the roots start to diverge away from
the root.
xi 1
f(xi )
 xi 
 i)
f (x
Division of zero or near zero:
If an iteration, we come across
the division by zero or a nearzero number, then we get a
large magnitude for the next
value, xi+1.
Root jumping:
In some case where the
function f (x) is oscillating
and has a number of roots,
one may choose an initial
guess close to a root.
However, the guesses may
jump and converge to some
other root.
Oscillations near local
maximum and minimum:
Results obtained from N-R
method may oscillate about
the local max or min without
converging on a root but
converging on the local max or
min. Eventually, it may lead to
division to a number close to
zero and may diverge.
Convergence
of N-R Method
Let us compare the N-R formula
f ( xn )
xn 1  xn 
f ( xn )
with the general iteration formula
xn1   ( xn ),
f ( xn )
 ( xn )  xn 
f ( xn )
f ( x)
 ( x)  x 
f ( x)
The iteration method converges if
( x)  1.
Therefore, N-R formula
converges, provided
f ( x) f ( x)  f ( x)
2
in the interval considered.
Newton-Raphson formula
therefore converges,
provided the initial
approximation x0 is chosen
sufficiently close to the root
and are continuous and
bounded in any small interval
containing the root.
Definition
Let
xn     n ,
xn1     n1
where  is a root of f (x) = 0.
 n1  K ,
where K is a constant and  n is the error
If we can prove that
p
n
involved at the n - th step, while finding
the root by an iterative method, then the
rate of convergence of the method is p.
The N-R method converges
quadratic ally
xn     n ,
xn1     n1
where  is a root of f (x) = 0 and  n is
the error involved at the n-th step, while
finding the root by N-R formula
f (   n )
   n1     n 
f (   n )
f (   n )  n f (   n )  f (   n )
 n1   n 

f (   n)
f (   n )
Using Taylor’s expansion, we get
1
 n1 
f ( )   n f ( ) 


 n [ f ( )   n f ( )  ]




  f ( )   n f ( ) 
f ( ) 
2

2
n





Since  is a root, f ( )  0.Therefore, the above
expression simplifies to

2
n
1
 n1 
f ( )
2
f ( )   n f ( )
 f ( ) 
f ( ) 

1 n


2 f ( ) 
f ( ) 
 n2 f ( ) 
f ( ) 

1 n


2 f ( ) 
f ( ) 
2
 n f ( )
3
 n1 
 O( n )
2 f ( )
2
n
1
On neglecting terms of order
higher powers, we obtain
 n1  K

3
n
and
2
n
f ( )
Where K 
2 f ( )
It shows that N-R method has
second order convergence or
converges quadratic ally.
Example
Set up Newton’s
scheme of iteration
for finding the square
root of a positive
number N.
Solution
The square root of N can be carried
out as a root of the equation
x  N  0.
2
Let
f ( x)  x  N.
2
By Newton’s method, we have
f ( xn )
xn 1  xn 
f ( xn )
In this Problem
f ( x)  x  N , f ( x)  2x.
2
Therefore
x N 1
N
xn 1  xn 
  xn  
2 xn
2
xn 
2
n
Example
Evaluate 12 , by Newton’s
formula.
Solution
Since
9  3, 16  4,
we take
x0  (3  4) / 2  3.5.
1
N  1
12 
x1   x0     3.5 
  3.4643
2
x0  2 
3.5 
1
12 
x2   3.4643 
  3.4641
2
3.4643 
1
12 
x3   3.4641 
  3.4641
2
3.4641 
Hence
12  3.4641.
Numerical
Analysis
Lecture 6
Download