0% found this document useful (0 votes)
338 views19 pages

Nonlinear Equation Root-Finding Methods

The document discusses nonlinear equations and methods for finding their roots. It defines a nonlinear equation as one with terms of degree 2 or higher. Root finding refers to finding the value of x that makes the equation equal to 0. Methods for solving nonlinear equations discussed include fixed point iteration, also called the iteration method. The bisection method is also summarized, which works by repeatedly bisecting an interval and selecting a subinterval where the root must lie based on the function changing signs between endpoints.

Uploaded by

Adnan Anirban
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
338 views19 pages

Nonlinear Equation Root-Finding Methods

The document discusses nonlinear equations and methods for finding their roots. It defines a nonlinear equation as one with terms of degree 2 or higher. Root finding refers to finding the value of x that makes the equation equal to 0. Methods for solving nonlinear equations discussed include fixed point iteration, also called the iteration method. The bisection method is also summarized, which works by repeatedly bisecting an interval and selecting a subinterval where the root must lie based on the function changing signs between endpoints.

Uploaded by

Adnan Anirban
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 19

Q: What is non-linear equation?

An equation in which one or more terms have a variable of degree 2 or higher is called a nonlinear
equation. A nonlinear system of equations contains at least one nonlinear equation.
Example: y=5 x 3
Q: What is root finding of a non-linear equation?

Root finding means to find the value of x such that f(x )=0. Geometrically, we think of this as the value of
x at which the function intersects the x-axis.
Q: Methods
Nonlinear equation can be solved in these ways:

Q: What is convergence?
The act of moving toward a specific point smoothly is called convergence.
Q: What is rate of convergence? What is order of convergence?
An iterative method is said to be of order k or has the rate of convergence k. If k is the largest positive
real number for which there exist a finite constant A ≠ 0, such that

| |
ϵ n+1
k
ϵn
≤A

k
ϵ n +1 ≤ A ϵ n
k
Where ϵ n be the error in k th iteration and defined as
e n=x n−x r
Where,
 x r is the exact or real root of f ( x )=0
 x n is an approximation of x r
The constant A is called Asymptotic and usually depends on the derivative of f (x) at x=x r .
Fixed Point Iteration Method/Iteration method/One point Iteration method
Let f ( x )=0 be a non linear equation. We need to find root of it.
Step 1:
Find the initial root of the equation, x 0.
Step 2:
Rewrite the equation as,
x= ∅ (x )
Step 3:
If |∅ (x 0 )|<1 then the equation can be used as iteration formula:
x n+1= ∅ ( x n)
Example
Find the real root of equation x 3−9 x +1=0 using iteration method correct up to 3 decimal places.
Solution:
Let,
3
f ( x )=x −9 x+1
f ( 0 )=03 −9 ( 0 ) +1=1> 0
3
f ( 1 ) =1 −9 ( 1 ) +1=−7 <0
f ( 2 )=23−9 ( 2 ) +1=−9<0
3
f ( 3 )=3 −9 (3 )+ 1=1>0
Since one root of f (x) lies between 2 and 3, so taking x 0=2.7 .
Case I:
3
x −9 x +1=0
2
x ( x −9)+1=0
−1
x= 2
(x −9)
So
−1
∅ (x )= 2
(x −9)
−2 x
∅ ' (x)= 2 2
(x −9)
Now,

|∅ (2.7)|= | −2 ×2.7
(2.7 2−9)2 |
=1.84> 1

Case 2:
3
x −9 x +1=0
3
x =9 x−1
1 /3
x=(9 x−1)
So
∅ ( x )=( 9 x −1)1 /3
−2
1
∅ (x)= ( 9 x−1 ) 3 (9)
'
3
−2
∅ ' (x)=3 ( 9 x −1 ) 3
Now,

|∅' (2.7)|=|3 ( 9(2.7)−1 ) 3 |=0.368<1


−2

Case 3:
3
x −9 x +1=0
3
9 x=x +1
3
x +1
x=
9
So
3
x +1
∅ (x )=
9
2 2
3 x +0 x
∅ ' ( x )= =
9 3
Now,

| |
2
|∅' ( 2.7 )|= 2.7 =2.43>1
3
Since in case II satisfy the condition |∅ (x 0 )|<1 so taking,
1 /3
x n+1=(9 x n +1)
as the iteration formula.
Now,
n=0 1/ 3
x 0+1=(9 x 0−1)
1/ 3
x 1=(9 ( 2.7 )−1) =2.8561782
n=1 1 /3
x 1+1=(9 x 1−1)
1/ 3
x 2=(9 ( 2.8561782 )−1) =2.91249479
n=2 1 /3
x 2+1=(9 x 2−1)
1/ 3
x 3=(9 ( 2.91249479 )−1) =2.9322772
n=3 1/3
x 3+1=(9 x 2−1)
1 /3
x 4 =(9 ( 2.9322772 ) −1) =2.9391633
n=4 1/ 3
x 4 +1=( 9 x 4−1)
1/ 3
x 5=(9 ( 2.9391633 )−1) =2.941552786
n=5 1/ 3
x 5+1=(9 x 5−1)
1 /3
x 6=(9 ( 2.941552786 )−1) =2.94238099
n=6 1/ 3
x 6+1=(9 x 6−1)
1/ 3
x 7=(9 ( 2.94238099 )−1) =2.9426679
n=7 1/ 3
x 7+1=(9 x 7−1)
1/ 3
x 8=(9 ( 2.9426679 )−1) =2.9427673
Ans: 2.942
Bisection method
 What is?
The Bisection method in mathematics is a root finding method which repeatedly bisects an interval and
then selects a subinterval in which a root must lie for further processing.
 Theorem
An equation ( x )=0 , where f (x) is a real continuous function, has at least one root between x l and x u if
f ( x l ) . f (x¿¿ u)<0 ¿ .

Figure 1: At least one root exists between the two points if the function is real, continuous, and changes
sign.

Figure 2: If function does not change sign between two points, roots of the equation may still exist
between the two points.
(a) (b)
Figure 3: If the function does not change sign between two points, there may not be any roots for the
equation between the two points.

Figure 4: If the function changes sign between two points, more than one root for the equation
may exist between the two points.
Q: Describe the Bisection method (Algorithm or working rule)
Step 1:
Let f ( x )=0 be the given equation.
Find a and b such that f ( a ) <0 and f ( b ) >0 or f ( a ) . f ( b ) <0

Step 2:
Find first approximate root using Bisection method:
a+b
x 1=
2
Calculate f (x 1) and examine its sign.
Step 2.1
If f ( x 1 ) <0 then root lies between x 1 and b.

The 2nd approximate root is:


x1 +b
x 2=
2
Step 2.2
If f ( x 1 ) >0 then root lies between a and x 1.

The 2nd approximate root is:


a+ x 1
x 2=
2

Calculate f ( x 2 ) and repeat step 2.1 and step 2.2 until the required accuracy of the root is obtained.
Example 1
Find the real root of equation x 3−x−4=0 using Bisection method correct upto 3-decimal place.
Solution:
Let f ( x )=x 3− x−4=0
To find a and b,
3
f ( 0 )=x −x−4=−4 <0
3
f ( 1 ) =1 −1−4=−4 <0
f ( 2 )=23−2−4=2>0
So a=1 and b=2
1st approximate root is,
a+b 1+2
x 1= = =1.5
2 2
3
f ( 1.5 )=1.5 −1.5−4=−2.125 <0
So root lies between 1.5 and 2.
2nd approximate root is,
1.5+2
x 2= =1.75
2
3
f ( 1.75 )=1.75 −1.75−4=−0.390625<0
So root lies between 1.75 and 2.
3rd approximate root is,
1.75+2
x 3==1.875
2
f ( 1.75 )=1.8753−1.875−4=0.716796875 >0
So root lies between 1.75 and 1.875.
4th approximate root is,
1.75+1.875
x4= =1.8125
2
3
f ( 1.8125 )=1.8125 −1.8125−4=0.14184570>0
So root lies between 1.75 and 1.8125.
5th approximate root is,
1.75+1.8125
x 5= =1.78125
2
3
f ( 1.8125 )=1.78125 −1.78125−4=−0.129608<0
So root lies between 1.78125 and 1.8125 .
6th approximate root is
1.78125+1.8125
x 6= =1.796875
2
3
f ( 1.796875 )=1.796875 −1.796875−4=0.0048027 >0
So root lies between 1.78125 and 1.796875 .
7th approximate root is,
1.78125+1.796875
x 7= =1.7890625
2
3
f ( 1.7890625 )=1.7890625 −1.7890625−4=−2.588 <0
So root lies between 1.7890625 and 1.796875 .
8th approximate root is,
1.7890625+1.796875
x 8= =1.79296875
2
3
f ( 1.79296875 )=1.79296875 −1.79296875−4=−0.029<0
So root lies between 1.79296875 and 1.796875 .
9th approximate root is,
1.79296875+1.796875
x 9= =1.794921875
2
3
f ( 1.794921875 )=1.794921875 −1.794921875−4=−0.01214<0
So root lies between 1.794921875 and 1.796875 .
10th approximate root is,
1.794921875+ 1.796875
x 10= =1.7958984375
2
3
f ( 1.7958984375 )=1.7958984375 −1.7958984375−4=−0.00361214<0
So root lies between 1.7958984375 and 1.796875 .
11th approximate root is,
1.7958984375+1.796875
x 11= =1.7963867185
2
f ( 1.7963867185 )=1.79638671853−1.7963867185−4=0.0005626>0
So root lies between 1.7958984375 and 1.796386718 .
12th approximate root is,
1.7958984375+1.796386718
x 12= =1.7961425715
2
So1.796 is the answer.
Example 2
Find the real root of equation xe x −cos x=0 using Bisection method correct upto 3-decimal place.
Solution:
H.W
Here cos x have to calculate in radian (be sure not in degree)
Q: Advantages and Drawbacks of Bisection method
Advantages:
 Always convergent
 The root bracket gets halved with each iteration - guaranteed.
Drawbacks:
 Slow convergence
 If one of the initial guesses is close to the root, the convergence is slower
 If a function f(x) is such that it just touches the x-axis it will be unable to find the lower and upper
guesses.
 Function changes sign but root does not exist

False position method


 What is?
In mathematics, an ancient method of solving an equation in one variable is the false position
method (method of false position) or regula falsi method.
 False position formula
af ( b ) −bf (a)
x 0=
f ( b ) −f (a)

Example
Solve the equation 3 x−cos x−1 using false position method.
Solution: Let
f ( x )=3 x−cos x−1
f ( 0 )=3 ( 0 ) −cos 0−1=−2<0
f ( 1 ) =3 (1 )−cos 1−1=1.4596< 0
N.B: For trigonometric functions, use Radian in calculator.
So
a=0 , b=1
st
1 approximate root:
af ( b ) −bf (a) (0)(1.4596)−1(−2)
x 0= = =0.578101514626
f ( b ) −f (a) (1.4596)−(−2)
f ( 0.578101514626 )=3 ( 0.578101514626 )−cos 0.578101514626−1=−0.103197<0

So,
a=0.578101514626 , b=1
nd
2 approximate root:
af ( b ) −bf (a) (0.578101514626)(1.4596)−1(−0.103197)
x 0= = =0.6009153243119
f ( b ) −f (a) (1.4596)−(−0.103197)
f ( 0.6009153243119 )=3 ( 0.6009153243119 )−cos 0.6009153243119−1=−0.0231420475086 <0

So,
a=0.6009153243119 ,b=1
rd
3 approximate root:
af ( b ) −bf (a) (0.6009153243119)(1.4596)−1(−0.0231420475086)
x 0= = =0.6071440790304
f ( b ) −f (a) (1.4596)−(−0.0231420475086)
f ( 0.6071440790304 )=3 ( 0.6071440790304 )−cos 0.6071440790304−1=0.0001514999166 >0
So,
a=0.6009153243119 ,b=0.6071440790304
th
4 approximate root:
af ( b ) −bf (a) (0.6009153243119)(1.4596)−(0.6071440790304)(0.0001514999166)
x 0= = =0.6009146777281
f ( b ) −f (a) (1.4596)−(0.0001514999166)
f ( 0.6009146777281 )=3 ( 0.6009146777281 )−cos 0.6009146777281−1=−0.0220747706503<0
So,
a=0.6009146777281 , b=0.6071440790304
th
5 approximate root:
af ( b ) −bf (a) (0.6009146777281)(−0.0220747706503)−(0.6071440790304 )(0.0001514999166)
x 0= = =0.6009
f ( b ) −f (a) (−0.0220747706503)−(0.0001514999166)
Ans: 0.6009

Q: What is Newton Raphson Method?

The Newton-Raphson method, named after Isaac Newton and Joseph Raphson, is an inherently root-
finding algorithm.

The Newton-Raphson method is a way to quickly find a good approximation to the root of a real
function f(x)=0. It is based on the idea that a continuous and differentiable function can be approximated
by a straight line tangent to it. Let a single root, xr , of the function f(x). The Newton-Raphson method
starts with an initial root estimate, denoted as x0≠xr, and uses the tangent of f(x) at x0 to improve the root
estimate. The improvement denoted by x1 which is obtained by determining where the tangent to f(x) at
x0 intersects the x-axis.
Newton Raphson method is also called the tangent method or Newton's method.

Q: Derive the Newton Raphson method or Geometrical Interpretation of Newton Raphson Formula
Let we want to find root of a non-linear equation of the form f ( x )=0. A typical plot of this function is
shown in Figure 1.
Figure 1 Geometrical illustration of the Newton-Raphson method.
A tangent line is drawn to the graph of the function f(x) at point x n. This tangent line pass through the
'
point ( x n , f (x n )) and has the slope which is represented by f ( xn ). Hence, the equation of the tangent line
'
is y=f ( xn ) ( x−x n ) + f ( x n ). The root of the tangent line which is found by setting y=0 and x=x n+1 is a
new approximation.
'
y=f ( xn ) ( x−x n ) + f ( x n )
'
0=f ( x n )( x n+1−x n ) + f (x n)
'
f ( x n ) ( x n+1−x n ) =−f (x n)
−f ( x n )
x n+1−x n = '
f ( xn )
f ( xn)
x n+1=x n − '
f ( xn )

Similarly from the graph,


AB
tanθ=
BC
f ( xn )
tanθ=
x n−x n−1
f (x n)
f ' ( xn )=
x n−x n+1
f ( xn )
x n−x n+1 = '
f (x n)
f (x )
x n+1=x n − ' n
f (x n)
x n+1 is the next step towards the root.
Example
Find the real root of equation x 3−3 x+ 1=0 using Newton Raphson method correct up to 4-decimal
places.
Solution:
Let f ( x )=x 3−3 x +1
So
' 2
f ( x )=3 x −3
To find x 0:
3
f ( x )=x −3 x +1
3
f ( 0 )=0 −3 ( 0 ) +1=1>0
3
f ( 1 ) =1 −3 ( 1 ) +1=−1<0
Now,
Finally,
3
f ( 0 )=0 −3 ( 0 ) +1=1>0
3
f ( 0.3 )=0.3 −3 ( 0.3 ) +1=0.127 >0
3
f ( 0.4 )=0.4 −3 ( 0.4 ) +1=−0.136<0
3
f ( 0.5 )=0.5 −3 ( 0.5 ) +1=−0.375<0
3
f ( 1 ) =1 −3 ( 1 ) +1=−1<0
So x 0=0.3
Now,
3
f ( 0.3 )=0.3 −3 ( 0.3 ) +1=0.127
' 2
f ( 0.3 )=3(0.3) −3=−2.73
First approximate root by Newton Raphson Method:
f ( x0 ) 0.127
x 1=x 0− =0.3− =0.346520
'
f ( x0 ) −2.73
Now,
3
f ( 0.346520 )=0.346520 −3 ( 0.346520 ) +1=0.002048
' 2
f ( 0.346520 )=3(0.346520) −3=−2.639771
Second approximate root by Newton Raphson Method:
f ( x1 ) 0.002048
x 2=x 1− =0.346520− =0.347295
'
f ( x1 ) −2.639771
Now,
3
f ( 0.347295 )=0.347295 −3 ( 0.347295 ) +1=0.000035
' 2
f ( 0.347295 )=3(0.347295) −3=−2.638158548925
Third approximate root by Newton Raphson Method:
f ( x2 ) 0.000035
x 3=x 2− =0.347295− =0.3473082668296
'
f ( x 2) −2.638158548925
Now,
3
f ( 0.3473082668296 )=0.3473082668296 −3 ( 0.3473082668296 )+1=−0.0000314242328
' 2
f ( 0.3473082668296 )=3(0.3473082668296) −3=−2.6381309033755
Fourth approximate root by Newton Raphson Method:
f ( x3) −0.0000314242328
x 4 =x3 − =0.3473082668296− =0.3472963552778
'
f ( x3) −2.6381309033755
Now,
3
f ( 0.3472963552778 )=0.3472963552778 −3 ( 0.3472963552778 ) +1=−0.0000000001478
' 2
f ( 0.3472963552778 )=3(0.3472963552778) −3=−2.6381557248323
Fifth approximate root by Newton Raphson Method:
f ( x4) −0.0000000001478
x 5=x 4 − =0.3472963552778− =0.3472963552218
'
f ( x4 ) −2.6381557248323
Ans: 0.3472

Q: Determine the Rate of Convergence of Newton Raphson Method


Suppose that we are solving the equation f ( x )=0 using the Newton-Raphson method.
Let x r is an exact root of f ( x )=0. So
f ( x r )=0
Let, x n is an estimate of x r. We know that by Newton's -Raphson method the iterations
f ( xn)
x n+1=x n − ; n=1 , 2 ,3 , … …
f ' ( xn )
Let x n=x r + ϵ n .

Since x n → x r and ϵ n →0 as n → ∝.

Interms of x r∧∈n the formula becomes


f ( x r +ϵ n )
x r +ϵ n +1=x r +ϵ n−
f ' ( x r + ϵn )
f ( xr + ϵ n)
ϵ n +1=ϵ n− '
f ( x r +∈n )
Let apply Taylor expansion
2
' ϵn ''
f ( x r ) + f ( x r ) ϵ n+ f ( x r ) + … … …
2
ϵ n +1=ϵ n− 2
' '' ϵ n '' '
f ( x r ) + f ( x r ) ϵ n + f ( x r ) + … … ..
2
2 3
Since ϵ n is small quantity ϵ n, ϵ n, .. . . . are also small. So we can neglect this higher order terms.
2
' ϵn ''
f ( x r ) + f ( x r ) ϵ n+ f ( x r ) + … … …
2
ϵ n +1=ϵ n− 2
ϵ
f ' ( x r ) + f ' ' ( x r ) ϵ n + n f ' ' ' ( x r ) + … … ..
2
'
0+ f ( x r ) ϵ n
ϵ n +1=ϵ n−
f ' ( xr )+ f ' ' ( xr ) ϵ n
'
f ( xr ) ϵ n
ϵ n +1=ϵ n−
f ' ( xr )+ f ' ' ( xr ) ϵ n
' '' 2 '
f ( xr ) ϵ n+ f ( x r ) ϵ n −f ( x r ) ϵ n
ϵ n +1=
f ' ( x r ) +f '' ( x r ) ϵ n
'' 2
f ( xr ) ϵ n
ϵ n +1=
f ' ( xr ) +f ' ' ( xr ) ϵ n
''
ϵ n+1 f ( xr )
=
ϵ 2n f ' ( x r ) + f '' ( x r ) ϵ n
''
ϵ n+1 f ( xr )
=
ϵ 2n '
f ' ' ( xr )
f ( x r ) (1+ ϵ n)
f ' ( xr )
'' '' −1
ϵ n+1 f ( xr ) f ( xr )
2
= '
[1+ '
ϵ n]
ϵn f ( xr ) f ( xr )
'' '' −1
ϵ n+1 f ( xr ) f ( xr )
2
= '
[1+ '
ϵ n]
ϵn f ( xr ) f ( xr )
'' ''
ϵ n+1 f ( x r ) f ( xr )
2
= ' (1− ' ϵ n+ … … .)
ϵn f ( xr ) f ( xr )
'' '' 2
ϵ n+1 f ( xr ) f ( xr )
2
= '
−( '
) ϵ n+ … … .
ϵn f ( xr ) f ( xr )
''
ϵ n+1 f ( xr )
=
ϵ 2n f ' ( xr )
''
f ( xr )
ϵ n +1= '
ϵ 2n
f ( xr )

The order of convergence of Newton-Raphson method is 2 or the convergence is quadratic. the rate of
convergence of Newton-Raphson method is quadrature.
Q: Advantages and Drawbacks of Newton Raphson method.
Advantages
 Converges fast (quadratic convergence), if it converges.
 Requires only one guess
 The method has one of the fastest convergences to the root.
 It is easy to program as it has a simple formula
 It is used to further improve a root found by other methods.
 It requires only one guess to find the root.
 Derivation of the method is more intuitive, so it is easier to understand its behaviour, like when it
is to converge and when it is to diverge.
Drawbacks
 Divergence at inflection points
 Oscillations near local maximum and minimum
 Division by zero. This method fails if f ' ( x )=0
 Root Jumping
Q: Inflection points in Newton Raphson method

If there are points of inflection, local maxima or minima around x0 or the root then Newton's method may
not work.

For example, we need to find the root of the function 27 x 3−3 x +1=0 which is near x = 0. The correct
answer is -0.44157265. However, by Newton's method, we get the following:

x 1=1/3

x 2=1/6

x 3=1

x 4 =0.679

x 5=0.463

x 6=0.3035

x 7=0.114

x 8=0.473

From the above results, it is clear that these results are not helpful. These results are not helpful because
the graph of the function around x=0 looks like as per given figure:
As we can observe, this graph has a local maximum, a local minimum, and a point of inflection around
point x = 0. Newton's method is not helpful here because if we imagine choosing a point at random
between x = -0.19 and x = 0.19 and drawing a tangent line to the function at that point. The tangent line
has a negative slope, and so, the tangent line intersects the y-axis at a point that is farther away from the
root.With the Bisection method, the rate of convergence is linear and therefore it is slow.
In this type of situation, Newton's method helps to get an even closer starting point, where these critical
points do not interfere.

Q: Bisection and Newton Raphson method

The following is the difference between Bisection and Newton Raphson method,
S.No Bisection Method Newton Raphson Method
.
1. With the Bisection method, the rate of convergence With the Newton-Raphson method, the rate of
is linear and therefore it is slow. convergence is second order or quadratic.
2. In this method, we take two initial approximations In this method we take an initial root
of the root in which the root is expected to lie. approximation.
3. In Bisection's method,the following formula is used. In Newton Raphson's method,the following
a+b formula is used.
x=
2 f ( xn)
x n+1=x n −
f ' ( xn )

4. The calculation of the function per iteration is 1. The calculation of the function per iteration is 2.
5 The initial approximation is less sensitive. The initial approximation is very sensitive.
6. It is not necessary to find the derivatives in the In Newton Raphson's method we have to find
bisection method. the derivatives.
7. This method is not applicable to find two complex, This procedure is applied to the search for two
multiple and nearly equal roots. complex, multiple and nearly equal roots.
Secant method
Formula
x i−1 f ( x i ) −x i f (x i−1)
x i+1=
f ( x i )−f (x i−1)
Example:
Solve the equation x e x =cosx using secant method correct up to 3-decimal places.
Solution:
Let
f ( x )=x e x −cosx
Now,
0
f ( 0 )=0 e −cos 0=−1< 0
1
f ( 1 ) =1 e −cos 1=2.1779795225909>0
So,
f ( 0.5 )=0.5 e 0.5−cos 0.5=−0.0532219265403<0
0.6
f ( 0.6 )=0.6 e −cos 0.6=0.2679356653246> 0
Finally,
0
f ( 0 )=0 e −cos 0=−1< 0
0.5
f ( 0.5 )=0.5 e −cos 0.5=−0.0532219265403<0
0.6
f ( 0.6 )=0.6 e −cos 0.6=0.2679356653246> 0
1
f ( 1 ) =1 e −cos 1=2.1779795225909>0
So let x 0=0.5 and x 1=0.6
1st approximate root using secant method:
x0 f ( x 1 ) −f ( x 0 )x 1 (0.5)(0.2679356653246)−(0.6)(−0.0532219265403)
x 2= = =0.5165719036039
f ( x 1 )−f ( x 0 ) (0.2679356653246)−(−0.0532219265403)
0.5165719036039
f ( x 2 ) =f ( 0.5165719036039 ) =0.5165719036039 e −cos 0.5165719036039=−0.0036027381005
nd
2 approximate root using secant method:
x1 f ( x 2 )−f ( x 1 )x 2 (0.6)(−0.0036027381005)−(0.5165719036039)(0.2679356653246)
x 3= = =0.5176788173139
f ( x 2 )−f ( x 1 ) (−0.0036027381005)−(0.2679356653246)
0.5176788173139
f ( x 3 ) =f ( 0.5176788173139 )=0.5176788173139 e −cos 0.5176788173139=−0.0002389320552
rd
3 approximate root using secant method:
x 2 f ( x 3 )−f (x 2) x 3 (0.5165719036039)(−0.0002389320552)−(0.5176788173139)(−0.0036027381005)
x4 = = =
f ( x 3 )−f (x 2) (−0.0002389320552)−(−0.0036027381005)
0.5177574416948
f ( 0.5177574416948 )=0.5177574416948 e −cos 0.5177574416948=0.0000002373231
Since 0.0000002373231 contains 6 zero after decimal there fore x 4 =0.5177574416948 is correct up
to 6 decimal places.
Ans: 0.5177574416948

Error calculation:
x 3=0.5176788173139
x 4 =0.5177574416948
x 4 −x3 =0.0000786243809
x 4−x 3
error ( % )= × 100 %=0.01 %
x4

Q: Determine the Rate of Convergence of secant method


Suppose that we are solving the equation f ( x )=0 using the secant method.
Let x r is an exact root of f ( x )=0. So
f ( x r )=0
Let, x n is an estimate of x r. We know that by secant method the iterations
x n−x n−1
x n+1=x n −f ( x n ) ; n=1 ,2 , 3 , … …
f ( x n )−f (x n−1)
Let x n=x r + ϵ n .

Since x n → x r and ϵ n →0 as n → ∝.

In terms of x r∧∈n the formula becomes


x n−x n−1
x n+1=x n −f ( x n )
f ( x n )−f ( x n−1 )
f ( x r + ϵ n ) (x r +ϵ n−x r −ϵ n−1 )
x r +ϵ n +1=x r +ϵ n−
f ( x r +ϵ n )−f ( x r +ϵ n−1 )

f ( x r + ϵ n) (ϵ n−ϵ n −1 )
ϵ n +1=ϵ n−
f ( x r + ϵ n )−f ( x r + ϵ n−1 )

We know that by Taylor series expansion


''
' f ( xr ) 2
f ( x r + ϵ )=f ( x r ) + f ( x r ) ϵ + ϵ … … ..(1)
2
Here f ( x r )=0 . Since ϵ n is small quantity ϵ n, ϵ n, .. . . . are also small. So we can neglect ϵ n and higher
2 3 3

order terms. We have the approximation


f '' ( xr ) 2
'
f ( x r + ϵ )=f ( x r ) ϵ+ ϵ
2
''
' f ( xr )
f ( x r + ϵ )=f ( x r ) ϵ(1+ ' ϵ)
2 f ( xr )
'
f ( x r + ϵ )=f ( x r ) ϵ(1+ Mϵ )
Where
f ' ' ( xr )
M=
2 f ' ( xr )

Now use the approximate equalities


'
f ( x r + ϵ n )=f ( x r ) ϵ n (1+ M ϵ n )

And
'
f ( x r + ϵ n−1 )=f ( x r ) ϵ n−1 (1+ M ϵ n−1)
So,
' '
f ( x r + ϵ n )−f ( x r +ϵ n−1 )=f ( x r ) ϵ n ( 1+ M ϵ n )−f ( x r ) ϵ n −1 (1+ M ϵ n−1)
'
f ( x r + ϵ n )−f ( x r +ϵ n−1 )=f ( x r ) (ϵ n ( 1+ M ϵ n ) −ϵ n−1 ( 1+ M ϵ n−1 ) )
' 2 2
f ( x r + ϵ n )−f ( x r +ϵ n−1 )=f ( x r ) (ϵ n + M ϵ n −ϵ n−1−M ϵ n−1 )
'
f ( x r + ϵ n )−f ( x r +ϵ n−1 )=f ( x r ) ((ϵ n−ϵ n−1)+ M (ϵ n + ϵ n−1 )(ϵ n−ϵ n−1))
'
f ( x r + ϵ n )−f ( x r +ϵ n−1 )=f ( x r ) (ϵ n−ϵ n −1 )(1+ M (ϵ n +ϵ n−1))

Now,
f ( x r + ϵ n) (ϵ n−ϵ n −1 )
ϵ n +1=ϵ n−
f ( x r + ϵ n )−f ( x r + ϵ n−1 )
'
f ( xr ) ϵ n (1+ M ϵ n )(ϵ n−ϵ n−1)
ϵ n +1=ϵ n− '
f ( x r ) (ϵ n−ϵ n−1)(1+ M (ϵ n+ ϵ n−1))
ϵ n (1+ M ϵ n )
ϵ n +1=ϵ n−
(1+ M (ϵ n+ ϵ n−1))
ϵ n ( 1+ M ( ϵ n +ϵ n−1 ) ) −ϵ n (1+ M ϵ n)
ϵ n +1=
(1+ M (ϵ n +ϵ n−1 ))
( ϵ n + M ϵ2n+ M ϵ n ϵ n−1)−(ϵ n + M ϵ2n)
ϵ n +1=
(1+ M (ϵ n+ ϵ n−1))
ϵ n+ M ϵ 2n−M ϵ n ϵ n−1−ϵ n−M ϵ 2n
ϵ n +1=
(1+ M (ϵ n +ϵ n−1))
Mϵ n ϵ n−1
ϵ n +1= ≈ Mϵ n ϵ n−1
1+ M ( ϵ n+ ϵ n−1)
ϵ n +1 ≈ Mϵ n ϵ n−1
f ' ' ( xr )
ϵ n +1 ≈ ϵ ϵ
2 f ' ( xr ) n n−1

Hence, this is the expression of convergence for secant method.

0.1%-->2decimal
0.01% 3decimal
0.001%-->4decimal

You might also like