0% found this document useful (0 votes)
10 views

Week 4 Numerical Methods

Uploaded by

Kenjie Bustillo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Week 4 Numerical Methods

Uploaded by

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

Week 4 NUMERICAL

METHODS
SECANT METHOD
The Secant Method
 A slight variation of Newton’s method for functions whose derivatives are
difficult to evaluate. For these cases the derivative can be approximated by a
backward finite divided difference.

1 xi  xi 1

f ( xi ) f ( xi )  f ( xi 1 )
xi  xi 1
xi 1  xi  f ( xi ) i  1,2,3, 
f ( xi )  f ( xi 1 )

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Fig. 6.7

• Requires two initial estimates of


x , e.g, xo, x1. However, because
f(x) is not required to change
signs between estimates, it is not
classified as a “bracketing”
method.
• The secant method has the same
properties as Newton’s method.
Convergence is not guaranteed
for all xo, f(x).

by Lale
Yurttas, Texas
Chapter 6
A&M
University

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Fig. 6.8

by Lale
Yurttas, Texas
Chapter 6
A&M
University

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Secant Method Advantages and Disadvantages
The secant method has the following advantages:
•It converges quicker than a linear rate, making it more
convergent than the bisection method.
•It does not necessitate the usage of the function’s derivative,
which is not available in a number of applications.
•Unlike Newton’s technique, which requires two function
evaluations in every iteration, it only requires one.
The secant method has the following drawbacks:
•The secant method may not converge.
•The computed iterates have no guaranteed error bounds.
•If f0(α) = 0, it is likely to be challenging. This means that when x = α,
the x-axis is tangent to the graph of y = f(x).
•Newton’s approach is more easily generalized to new ways for solving
nonlinear simultaneous systems of equations.

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Secant Method Solved Example
Example:
Compute two iterations for the function f(x) = x3 – 5x + 1 = 0 using
the secant method, in which the real roots of the equation f(x) lies
in the interval (0, 1).
Solution:
Using the given data, we have,
x0 = 0, x1 = 1, and
f(x0) = x3 – 5x + 1 = 1, f(x1) = 13 – 5(1) + 1 = -3
Using the secant method formula, we can write
x2 = x1 -
Now, substitute the known values in the formula,
x2 = 1 – (-3)[(1 – 0) / (-3)], x2 = 0.25
Therefore, f(x2) = (0.25)3 – 5(0.25) + 1 =– 0.234375

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Performing the second approximation, ,
x3 = x 2 - x1 = 1, x2 = 0.25
f(x2) = (0.25)3 – 5(0.25) + 1 =– 0.234375, f(x1) = 13 – 5(1) + 1 = -3
Using the secant method formula, we can write
x3 = 0.25 -
x3 = 0.18645
Hence, f(x3) = (0.18645)3 – 5(0.18645) + 1 = 0.07423

Since the problem requires only two iterations, therefore root,


x = 0.18645

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Example:
Compute three iterations for the function f(x) = x3 – 20 = 0 using
the secant method, in which the real roots of the equation f(x)
lies in the interval (4, 5.5).
Solution:
Xi+1 = Xi -
When i =1 =5.5, =4
X2= 5.5 - = 5.5 - = 3.3553
For the absolute error,

ea = x100 = x100= 63.91%

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
When i =2 =3.3553, =5.5

f() =f(5.5) = 5.5 3 – 20 =146.375


f() =f(3.3553) = 3.3553 3 – 20 = 17.774

X3= 3.3553 - =

= 3.3553 - = 3.0589
ea = x100 = x100= 9.689%

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
When i =3 =3.0589, =3.3553
f() =f(3.3553) = 3.35533 – 20 =17.774
f() =f(3.0594) = 3.05893 – 20 = 8.6217
X4= 3.0589 -

X4= 3.0589 - = 2.7797


ea = x100 = x100= 10.04%

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

You might also like