Docsity

Secant Method-Numerical Analysis-Lecture Handouts, Lecture notes of Mathematical Methods for Numerical Analysis and Optimization

Toggle sidebar
bg1
Numerical Analysis โ€“MTH603 VU
ยฉ Copyright Virtual University of Pakistan 1
Secant Method
The secant method is modified form of Newton-
Raphson method .If in Newton-Raphson method; we replace the derivative '( )
n
f
x by the
difference ratio, i.e,
1
1
() ( )
'( ) nn
n
nn
fx fx
fx xx
โˆ’
โˆ’
โˆ’
=
โˆ’
Where n
x
and 1n
x
โˆ’ are two approximations of the root we get
1
1
1
11
1
11
1
()( )
() ( )
() ( ) ()( )
() ( )
() ( )
() ( )
nn n
nn
nn
nn nn nnn
nn
nnnn
nn
fx x x
xx
fx fx
x
fx xfx fx x x
fx fx
xfx xfx
fx fx
โˆ’
+
โˆ’
โˆ’โˆ’
โˆ’
โˆ’โˆ’
โˆ’
โˆ’
=โˆ’
โˆ’
โˆ’โˆ’โˆ’
=
โˆ’
โˆ’
=
โˆ’
Provided 1
() ( )
nn
f
xfx
โˆ’
โ‰ 
This method requires two starting values 01
x
and x
; values at both these points are
calculated which gives two points on the curve the next point on the curve are obtained
by using the derived formula. We continue this procedure until we get the root of
required accuracy.
Geometrical Interpretation
Geometrically, the secant method corresponds to drawing secants rather than tangents
to obtain various approximations to root
ฮฑ
;
To obtain 2
we find the intersection between the secant through the points 00
(,())
x
fx
And 11
(,())
x
fx and the x-axis.
It is experienced that the secant method converges rather quickly .there is a possibility of
the divergence if the two roots lie on the same side of the curve .the order of the
convergence of the decant method equal to (1 5 ) 1.618
2
+=,which shows that this
method has the order of convergence slightly inferior that of Newton-Raphson method, In
this method f(x) is not required to change signs between the estimate.
docsity.com
pf3
pf4
pf5

Partial preview of the text

Download Secant Method-Numerical Analysis-Lecture Handouts and more Lecture notes Mathematical Methods for Numerical Analysis and Optimization in PDF only on Docsity!

Secant Method

The secant method is modified form of Newton- Raphson method .If in Newton-Raphson method; we replace the derivative f '( xn )by the difference ratio, i.e,

1 1

'( ) (^ n^ )^ (^ n ) n n n

f x f^ x^ f^ x x x

โˆ’ โˆ’

Where xn and xn (^) โˆ’ 1 are two approximations of the root we get

1 1 1 1 1 1 1 1 1

n n^ n^ n^ n n n n n n n n n n n n n n n n n n

x x f^ x^ x^ x f x f x x f x x f x f x x x f x f x x f x x f x f x f x

+^ โˆ’ โˆ’ โˆ’ โˆ’ โˆ’ โˆ’ โˆ’ โˆ’

= โˆ’^ โˆ’^ โˆ’

Provided f ( xn ) โ‰  f ( xn (^) โˆ’ 1 ) This method requires two starting values x 0 (^) and x 1 ; values at both these points are calculated which gives two points on the curve the next point on the curve are obtained by using the derived formula. We continue this procedure until we get the root of required accuracy.

Geometrical Interpretation

Geometrically, the secant method corresponds to drawing secants rather than tangents

to obtain various approximations to root ฮฑ ;

To obtain x 2 we find the intersection between the secant through the points ( x 0 (^) , f ( x 0 )) And ( x 1 (^) , f ( x 1 )) and the x-axis. It is experienced that the secant method converges rather quickly .there is a possibility of the divergence if the two roots lie on the same side of the curve .the order of the

convergence of the decant method equal to (1^ 5)^ 1. 2

  • (^) = ,which shows that this

method has the order of convergence slightly inferior that of Newton-Raphson method, In this method f(x) is not required to change signs between the estimate.

Some more description

We choose x0, x1 close to the root โ€˜aโ€™ of f (x) =0 such that f (x0) f(x1) As a next approximation x2 is obtained as the point of intersection of y = 0 and the chord passing through the points (x0, f(x0 )), (x1 f(x1 )). 0 1 0 0 1 0

y f ( x )^ f^ (^ x^ )^ f^ (^ x )( x x ), x x

Putting y = 0 we get

2 0 1 1 0 1 0

x x x^ f^ x^ x f^ x f x f x

Convergence of Secant Method

Here the sequence is generated by the rule

1 1 1 1

n^ n^ n^ n^ n n n

x x^ f^ x^ x f^ x f x f x +^ โˆ’^ โˆ’ โˆ’

Starting with x0 and x1 as { x 0 (^) , x 1 โ€ฆ} It will converge to โ€˜ a โ€™ , that is f (a) = 0 NOTE The Secant method converges faster than linear and slower than Newtonโ€™s quadratic

O

y y=f(x)

f(x1)

ฮฑ x

f(x2)

x

x

F(x0)

x

0 0 0

1 1 1

( ) 2 cosh sin 1 ( ) 2 cosh sin 1 2 cosh 0.4sin 0.4 1

( ) 2 cosh sin 1 2 cosh 0.5sin 0.5 1

f x x x now f x x x

f x x x

= 2ร—1.081ร— 0.3894 โˆ’1 = โˆ’0.

2 0 1 1 0 1 0

2 2 2

( ) 2 cosh sin 1 2 cosh 0.5sin 0.5 1

x x f^ x^ x f^ x f x f x

f x x x

ร—1.1276ร— 0.4794 โˆ’1 = 0.

= ร—^ โˆ’^ ร— โˆ’^ = + =

= 2ร—1.

3 1 2 2 1 2 1

3 3 3

4 2 3 3 2 3 2

( ) 2 cosh sin 1

( ) ( ) ( ) ( )

x x f^ x^ x f^ x f x f x

f x x x

x x f^ x^ x f^ x f x f x

6ร— 0.4494 โˆ’1 = โˆ’0.

= ร— โˆ’^ โˆ’^ ร—^ = โˆ’ =

= 661 0.00009^ 0.4668^ 0.0018^ 0.000042^ 0.00048^ 0.

ร— โˆ’ โˆ’ ร— โˆ’ = โˆ’ + =

Comparison:

In secant method, we do not check whether the root lies in between two successive approximates X n-1, and X n. This checking was imposed after each iteration, in Regula โ€“Falsi method.

Mullerโ€™s Method

In Mullerโ€™s method , f ( x ) = 0 is approximated by a second degree polynomial; that is by a quadratic equation that fits through three points in the vicinity of a root. The roots of this quadratic equation are then approximated to the roots of the equation f ( x ) 0.This method is iterative in nature and does not require the evaluation of derivatives as in Newton-

Raphson method. This method can also be used to determine both real and complex roots of f ( x ) = 0. Suppose, xi (^) โˆ’ 2 , xi (^) โˆ’ 1 , xi be any three distinct approximations to a root Of f ( x ) = 0. ( 2 ) 2 , ( 1 ) 1 ( ).

i i i i i i

f x f f x f f x f

โˆ’ =^ โˆ’ โˆ’ = โˆ’

Noting that any three distinct points in the ( x , y )-plane uniquely; determine a polynomial of second degree. A general polynomial of second degree is given by Noting that any three distinct points in the ( x , y )-plane uniquely; determine a polynomial of second degree. A general polynomial of second degree is given by f ( ) x = ax^2 + bx + c Suppose, it passes through the points ( xi (^) โˆ’ 2 , fi (^) โˆ’ 2 ), ( xi (^) โˆ’ 1 , fi (^) โˆ’ 1 ), ( xi , fi )

Then the following equations will be satisfied

(^22 2 ) (^21 1 ) 2

i i i i i i i i i

ax bx c f ax bx c f ax bx c f

โˆ’ โˆ’ โˆ’ โˆ’ โˆ’ โˆ’

Eliminating a, b, c , we obtain

2 (^22 2 ) (^21 1 ) 2

i i i i i i i i i

x x f x x f x x f x x f

โˆ’ โˆ’ โˆ’ โˆ’ โˆ’ โˆ’

This can be written as

1 2 2 1 2 1 2 1 1 2 1 2 1

i i (^) i i i (^) i i i i i i i i i i i i i i f x^ x^ x^ x^ f x^ x^ x^ x^ f x^ x^ x^ x f x x x x x x x x x x

โˆ’ (^) โˆ’ โˆ’ (^) โˆ’ โˆ’ โˆ’ โˆ’ โˆ’ โˆ’ โˆ’ โˆ’ โˆ’ โˆ’

= โˆ’^ โˆ’^ + โˆ’^ โˆ’^ + โˆ’^ โˆ’

We further define

2 2 2 1 1

2 2 1 2 1

[

( )]

i i i i i i i i i i i i i i i i i

f f f f f f f f

โˆ’ โˆ’ โˆ’ โˆ’ โˆ’ โˆ’

To compute ฮป , set f = 0, we obtain

ฮป i ( f i โˆ’ 2 ฮป i โˆ’ fi โˆ’ 1 ฮด i + f i ) ฮป 2 + gi ฮป + ฮด i fi = 0

Where 2 2

g i = fi โˆ’ 2 ฮป i โˆ’ f i โˆ’ 1 ฮด i + fi ( ฮป i +ฮด i )

A direct solution will lead to loss of accuracy and therefore to obtain max accuracy we rewrite as: i (^) 2 i i i ( (^) i 2 i i 1 i i ) 0

f ฮด g ฮป f ฮป f ฮด f

ฮป ฮป โˆ’^ โˆ’

So that, 2 1/ 2 1 [^4 (^2 1 )] 2

i i i i i i i i i i i i

g g f f f f f

=โˆ’^ ยฑ^ โˆ’^ โˆ’^ โˆ’^ โˆ’ +

Or

2 2 1 1/ 2

[ 4 ( )]

i i i i i i i i i i i i

f g g f f f f

ฮป^ ฮด

Here, the positive sign must be so chosen that the denominator becomes largest in magnitude. We can get a better approximation to the root, by using

xi + 1 = xi + hi ฮป