You are on page 1of 18

03 (Three) Years BSC In CSE

Part of Final Assignment


Course Title : Numerical Analysis
Course Code : CSE-2201

Presentation of Secant Method


Submitted To

Submitted By Mrs. Soniya Yeasmin Madam


Gazi Abid Raihan Sr. Lecturer,
ID : 20193007011 North Western
CSE-2/2 Spring-2021 University,Khulna
Date of Submission : 13/06/2021
2
Secant Method
Problem Statement:
“To find the roots of a non-linear equation with the help of secant

lines”.
Introduction:
In this method roots are found using an algorithm, that uses

succession of roots of secant lines to better approximate a root of

a function. This method can be thought of as a finite difference of

Newton’s Method.
3
Methodology
A secant line is defined by using two points on graph
of a function f(x). It is necessary to choose these two
initial points as xi and xi-1. Then next point xi+1 is obtained by
computing x-value at which the secant line passing
through the points (xi, f(xi)) and (xi-1, f(xi-1)) has a y-
coordinate of zero.
f(x)

f(xi) B

f(xi-1) C

E D A X
xi+1 xi-1
xi
Secant Method – Derivation
The secant method can also be derived from geometry:
The Geometric Similar Triangles
AB DC
=
AE
f(x)

DE
f(xi) B can be
f (xi ) f (x )
written i-1
xi as =
 xi1 xi1  xi1
f(xi-1) C
On rearranging, the
secant method is
E D A
xi
X given as
xi1  x i - f (xi )(xi  xi-1 )
xi+1 xi-1

f (x i)  f (xi1
)
5
Algorithm
Step 1

Calculate the next estimate of the root


from two initial guesses
 f (xi )(xi  xi1 )
xi1  xi
f (xi )  f (xi1 )

Find the absolute relative


approximate error
a = xi1- xi  100
x i1
Step
6 2
Find if the absolute relative approximate error is
greater than the prespecified relative error
tolerance.

If so, go back to step 1, else stop the algorithm.

Also check if the number of iterations has exceeded


the maximum number of iterations.
Applications
7

• Secant method is one of the analytical procedure


available to earthquake for
earthquake
engineers performance and structures. predicting

• Secant method is used to develop linear dynamic


analysis model to have the potential to influence the
behavior of the structure in non-linear
range.
• It is used for non-linear push over analysis, which
defines the force-displacement relationship of the walls in
the building under lateral load.
8
Advantages
• It converges faster than a linear rate so it is more rapidly
convergent.
• Requires two guesses that do not need to bracket the root.

It doesn’t require use of derivative of a given function



because in some practical cases, derivatives become
very hard to find.

It requires only one function evaluation per iteration as


• compared to Newton’s method which requires two.
Disadvantages :
• It may not converge.

• There is no guaranteed error bound for the


computed iterates.
• It is likely to have difficulty if f 0(α) = 0. This
means the x-axis is tangent to the graph of y = f
(x) at x = α.
• Newton’s method generalizes more easily to
new methods for solving simultaneous
systems of nonlinear equations.
9
Limitations
Division by zero
2
2

f(x)
0
f(x) 0
f(x)

2 2
10 5 0 5 10
 10 10
x x guess1  x guess2
f(x

 x
)prev. guess
new guess
f  S
1
Example:
0
1
0
1
0
1
0
1
0
Table Summary
1
0
Questions

Date of Submission : 13/06/2021


Date of Submission : 13/06/2021

You might also like