4
The Secant Method Potential problem in implementing the N-R method is the evaluation of the derivative. For the case of formula which is extremely difficult to evaluate, so the derivative can be approximated by a finite divided difference as : f' ( x ) f ( x i1 ) f ( x i ) x i1 x i That can be substituted into N-R method x i+1 =x i f ( x i )( x i1 x i ) f ( x i1 ) f ( x i ) This is the formula for the “Secant Method”

The Secant Method

Embed Size (px)

DESCRIPTION

.

Citation preview

Page 1: The Secant Method

The Secant Method

Potential problem in implementing the N-R method is the evaluation of the derivative. For the case of formula which is extremely difficult to evaluate, so the derivative can be approximated by a finite divided difference as :

f ' (x)≈f (x i−1)−f (x i)x i−1−x i

That can be substituted into N-R method

x i+1=x i−f (x i)(x i−1−x i)f (x i−1 )−f (xi)

This is the formula for the “Secant Method”

Page 2: The Secant Method

Example

Problem statement : f(x)=e-x-x

Start with initial estimates of x-1=0 and x0=1,0

Solution : Recall that true root is 0,056714329

Iteration I

x-1 = 0 f(x-1) = 1,00000

x0 = 1 f(x0) = -0,63212

x1 = 1−−0,63212(0−1)1−(−0,63212)

= 0,61270 ; |Et| = 8,0 %

Iteration II

X0 = 1 f(x0) = -0,63212

X1 = 0,61270 f(x1) = -0,07081

X2 = 0,61270−−0,0708(1−0,61270)−0,63212−0,61270

= 0,56384 ; |Et| = 0,58 %

Iteration III

X1 = 0,61270 f(x1) = -0,07081

X2 = 0,56384 f(x2) = 0,00518

X3 = 0,56384−0,00518(0,61270−0,56384)

−0,07081−0,00518

= 0,56717 ; |Et| = 0,0048 %

Page 3: The Secant Method

The difference between the secant and false position method

The false position method :

The false estimate of the root replaces whichever of the original values yielded a function value with the same sign as f(xi) :always convergen

The secant method replaces the values in strict sequence, with the new value x i+1 replacing xi

and xi replacing xi-1 :may be divergen

Example :

F(x)=ln x start xr = xi-1 = 0,5

Xu = xi = 5,0

False Position Secant

Iterasi xl xu xr

1 0,5 5,0 1,85462 0,5 1,8546 1,21633 0,5 1,2163 1,0585

xi-1 xi xi+1

0,5 5,0 1,85465,0 1,8546 -0,10438

divergen