2
Most read
5
Most read
12
Most read
Numerical Computing
Secant Method
Lecture # 9
By Nasima Akhtar
Secant Method Working Rule
• The secant method begins by finding two points on the curve of f(x),
hopefully near to the root we seek.
• A graph or a few applications of bisection might be used to determine the
approximate location of the root.
• we draw the line through these two points and find where it intersects the x-
axis.
• The line through two points on the curve is called the secant line.
Graphical Representation of Secant Method 1
Derivation Approach 1
A
C
B
D
E
Derivation Approach 1
• From the similar Triangle
• ABC = ADE
•
𝐷𝐸
𝐵𝐶
=
𝐴𝐷
𝐴𝐵
•
𝑓(𝑥0)
𝑓(𝑥1)
=
𝑥0−𝑥2
𝑥1−𝑥2
By re-arrangement we get (I have done to whole derivation on page
See the next slide.
𝑥2 = 𝑥1- f(𝑥1)*
𝑥0−𝑥1
𝑓 𝑥0 −𝑓(𝑥1)
𝑥𝑛+1 = 𝑥𝑛- f(𝑥𝑛)*
𝑥𝑛−1−𝑥𝑛
𝑓 𝑥𝑛−1 −𝑓(𝑥𝑛) A
C
B
D
E
Secant Method
Derivation Approach 2
From Newton Raphson Method we have,
𝑥𝑖+1 = 𝑥𝑖-
𝑓(𝑥𝑖)
𝑓′(𝑥𝑖)
-----------------------1
From the equation of line we have slope,
𝑓′
(𝑥𝑖)=
𝑓 𝑥𝑖−1 −𝑓 𝑥𝑖
𝑥𝑖−1−𝑥 𝑖
------------------------2
Putting equation 2 in 1
𝑥𝑖+1 = 𝑥𝑖-
𝑓(𝑥𝑖)
𝑓 𝑥𝑖−1 −𝑓 𝑥𝑖
𝑥𝑖−1−𝑥 𝑖
𝑥𝑖+1 = 𝑥𝑖- f(𝑥𝑖)*
𝑥𝑖−1−𝑥𝑖
𝑓 𝑥𝑖−1 −𝑓(𝑥𝑖)
Algorithm for Secant Method
• To determine a root of f(x) = 0, given two values, 𝑥0 and 𝑥1 , that are near the root,
If If (𝑥0 ) l < I f (𝑥1)l then
Swap 𝑥0 with 𝑥1
Repeat
Set 𝑥2 = 𝑥1-f(𝑥1)*
𝑥0−𝑥1
𝑓 𝑥0 −𝑓(𝑥1)
Set 𝑥0 = 𝑥1 .
Set 𝑥1 = 𝑥2 .
Until If(𝑥2)l < tolerance value.
Graphical Representation of Secant Method 2
Matlab Code
f=@(x)(x^3-5*x+1);
x1=2;
x2 = 2.5;
i = 0;
while i <= 5
val = f(x2);
val1 = f(x1);
temp = x2 - x1;
temp1 = val - val1;
nVal = temp/temp1;
nVal = nVal * val;
nVal = x2 - nVal;
x1 = x2;
x2 = nVal;
i = i+1;
end
fprintf('Point is %fn',x2)
Example Numerical
• F(x)=𝒙𝟑
− 𝟓𝒙 + 𝟏
• So we consider 𝒙𝟎 =2, 𝒙𝟏 = 𝟐. 𝟓
• F(2)=-1
• F(2.5)=4.125
• 𝒙𝒏+𝟏 = 𝒙𝒏-f(𝒙𝒏)*
𝒙𝒏−𝒙𝒏−𝟏
𝒇 𝒙𝒏 −𝒇 𝒙𝒏−𝟏
• 𝒙𝟐 = 𝒙𝟏-f(𝒙𝟏)*
𝒙𝟏−𝒙𝟎
𝒇 𝒙𝟏 −𝒇(𝒙𝟎)
• 𝒙𝟐 = 𝟐. 𝟓 – 4.125*
𝟐.𝟓−𝟐
(𝟒.𝟏𝟐𝟓)−(−𝟏)
=2.0975
• 𝒙𝟑 = 𝒙𝟐 - f(𝒙𝟐)*
𝒙𝟐−𝒙𝟏
𝒇 𝒙𝟐 −𝒇(𝒙𝟏)
=2.1213
• 𝒙𝟒 =2.1285
• 𝒙𝟓 =2.1284
X F(x)
1 -3
2 -1
2.5 4.125
3 13
Secant Method Pros and Cons
• Advantages
1. No computations of derivatives
2. Only f(x) computation each step
3. It converges faster than linear rate.
• Disadvantages
1. It may not converge
2. There is no guaranteed error bound for the computed iterates
Convergence Issue
Thank You 

More Related Content

PPT
Secant Method
PPTX
False Point Method / Regula falsi method
PPTX
Secent method
PPTX
Newton Raphson
PPTX
Secant method
PDF
Bisection method
PPTX
The newton raphson method
PPT
Linear differential equation with constant coefficient
Secant Method
False Point Method / Regula falsi method
Secent method
Newton Raphson
Secant method
Bisection method
The newton raphson method
Linear differential equation with constant coefficient

What's hot (20)

PPTX
NACA Regula Falsi Method
PPT
Eigen values and eigen vectors
PDF
Regula Falsi (False position) Method
PPTX
Mean Value Theorem | Mathematics
PPTX
Series solution to ordinary differential equations
PPTX
application of partial differentiation
DOCX
Bisection method
 
PPTX
Analytic function
PPTX
Homogeneous Linear Differential Equations
PPTX
Newton Raphson Method
PPTX
Newton backward interpolation
PPTX
Partial differentiation
PPTX
Secant method
PPTX
vector space and subspace
PPTX
Jacobi method
PPTX
Lagrange’s interpolation formula
PPT
Numerical Analysis (Solution of Non-Linear Equations) part 2
PPTX
Metric space
PPT
Numerical integration
PPTX
Complex form fourier series
NACA Regula Falsi Method
Eigen values and eigen vectors
Regula Falsi (False position) Method
Mean Value Theorem | Mathematics
Series solution to ordinary differential equations
application of partial differentiation
Bisection method
 
Analytic function
Homogeneous Linear Differential Equations
Newton Raphson Method
Newton backward interpolation
Partial differentiation
Secant method
vector space and subspace
Jacobi method
Lagrange’s interpolation formula
Numerical Analysis (Solution of Non-Linear Equations) part 2
Metric space
Numerical integration
Complex form fourier series
Ad

Similar to Secant Method (20)

PDF
Ankit_Practical_File-1.pdf A detailed overview of Rizir as a brand
PDF
PPTX
2. Fixed Point Iteration.pptx
DOCX
Matlab lab manual
PDF
Applications of Differential Calculus in real life
PPTX
Numerical Methods: Solution of Algebraic Equations
PDF
Maths-MS_Term2 (1).pdf
PDF
Integration techniques
PPTX
Differential calculus maxima minima
PDF
Conjugate Gradient Methods
PDF
Calculo integral - Larson
PDF
3. DERIVATIVE BY INCREMENT IN CALULUS 01
PDF
Rosser's theorem
PDF
On the Seidel’s Method, a Stronger Contraction Fixed Point Iterative Method o...
PPTX
Interpolation In Numerical Methods.
PDF
Maths04
PPTX
CALCULUS 2.pptx
PDF
Natural and Clamped Cubic Splines
PPTX
Bisection
PDF
03_AJMS_166_18_RA.pdf
Ankit_Practical_File-1.pdf A detailed overview of Rizir as a brand
2. Fixed Point Iteration.pptx
Matlab lab manual
Applications of Differential Calculus in real life
Numerical Methods: Solution of Algebraic Equations
Maths-MS_Term2 (1).pdf
Integration techniques
Differential calculus maxima minima
Conjugate Gradient Methods
Calculo integral - Larson
3. DERIVATIVE BY INCREMENT IN CALULUS 01
Rosser's theorem
On the Seidel’s Method, a Stronger Contraction Fixed Point Iterative Method o...
Interpolation In Numerical Methods.
Maths04
CALCULUS 2.pptx
Natural and Clamped Cubic Splines
Bisection
03_AJMS_166_18_RA.pdf
Ad

Recently uploaded (20)

PDF
Project_Mgmt_Institute_-Marc Marc Marc .pdf
PPTX
Micro1New.ppt.pptx the main themes if micro
PDF
Unit1 - AIML Chapter 1 concept and ethics
PPTX
Agentic Artificial Intelligence (Agentic AI).pptx
PDF
VTU IOT LAB MANUAL (BCS701) Computer science and Engineering
PDF
MLpara ingenieira CIVIL, meca Y AMBIENTAL
PPTX
Software-Development-Life-Cycle-SDLC.pptx
PDF
Mechanics of materials week 2 rajeshwari
PPTX
INTERNET OF THINGS - EMBEDDED SYSTEMS AND INTERNET OF THINGS
PPT
UNIT-I Machine Learning Essentials for 2nd years
DOCX
ENVIRONMENTAL PROTECTION AND MANAGEMENT (18CVL756)
PDF
ASPEN PLUS USER GUIDE - PROCESS SIMULATIONS
PPTX
Micro1New.ppt.pptx the mai themes of micfrobiology
PDF
UEFA_Carbon_Footprint_Calculator_Methology_2.0.pdf
PPTX
DATA STRCUTURE LABORATORY -BCSL305(PRG1)
PPTX
SE unit 1.pptx aaahshdhajdviwhsiehebeiwheiebeiev
PDF
[jvmmeetup] next-gen integration with apache camel and quarkus.pdf
PPTX
Chapter-8 Introduction to Quality Standards.pptx
PDF
Principles of operation, construction, theory, advantages and disadvantages, ...
PDF
VSL-Strand-Post-tensioning-Systems-Technical-Catalogue_2019-01.pdf
Project_Mgmt_Institute_-Marc Marc Marc .pdf
Micro1New.ppt.pptx the main themes if micro
Unit1 - AIML Chapter 1 concept and ethics
Agentic Artificial Intelligence (Agentic AI).pptx
VTU IOT LAB MANUAL (BCS701) Computer science and Engineering
MLpara ingenieira CIVIL, meca Y AMBIENTAL
Software-Development-Life-Cycle-SDLC.pptx
Mechanics of materials week 2 rajeshwari
INTERNET OF THINGS - EMBEDDED SYSTEMS AND INTERNET OF THINGS
UNIT-I Machine Learning Essentials for 2nd years
ENVIRONMENTAL PROTECTION AND MANAGEMENT (18CVL756)
ASPEN PLUS USER GUIDE - PROCESS SIMULATIONS
Micro1New.ppt.pptx the mai themes of micfrobiology
UEFA_Carbon_Footprint_Calculator_Methology_2.0.pdf
DATA STRCUTURE LABORATORY -BCSL305(PRG1)
SE unit 1.pptx aaahshdhajdviwhsiehebeiwheiebeiev
[jvmmeetup] next-gen integration with apache camel and quarkus.pdf
Chapter-8 Introduction to Quality Standards.pptx
Principles of operation, construction, theory, advantages and disadvantages, ...
VSL-Strand-Post-tensioning-Systems-Technical-Catalogue_2019-01.pdf

Secant Method

  • 2. Secant Method Working Rule • The secant method begins by finding two points on the curve of f(x), hopefully near to the root we seek. • A graph or a few applications of bisection might be used to determine the approximate location of the root. • we draw the line through these two points and find where it intersects the x- axis. • The line through two points on the curve is called the secant line.
  • 3. Graphical Representation of Secant Method 1
  • 5. Derivation Approach 1 • From the similar Triangle • ABC = ADE • 𝐷𝐸 𝐵𝐶 = 𝐴𝐷 𝐴𝐵 • 𝑓(𝑥0) 𝑓(𝑥1) = 𝑥0−𝑥2 𝑥1−𝑥2 By re-arrangement we get (I have done to whole derivation on page See the next slide. 𝑥2 = 𝑥1- f(𝑥1)* 𝑥0−𝑥1 𝑓 𝑥0 −𝑓(𝑥1) 𝑥𝑛+1 = 𝑥𝑛- f(𝑥𝑛)* 𝑥𝑛−1−𝑥𝑛 𝑓 𝑥𝑛−1 −𝑓(𝑥𝑛) A C B D E
  • 7. Derivation Approach 2 From Newton Raphson Method we have, 𝑥𝑖+1 = 𝑥𝑖- 𝑓(𝑥𝑖) 𝑓′(𝑥𝑖) -----------------------1 From the equation of line we have slope, 𝑓′ (𝑥𝑖)= 𝑓 𝑥𝑖−1 −𝑓 𝑥𝑖 𝑥𝑖−1−𝑥 𝑖 ------------------------2 Putting equation 2 in 1 𝑥𝑖+1 = 𝑥𝑖- 𝑓(𝑥𝑖) 𝑓 𝑥𝑖−1 −𝑓 𝑥𝑖 𝑥𝑖−1−𝑥 𝑖 𝑥𝑖+1 = 𝑥𝑖- f(𝑥𝑖)* 𝑥𝑖−1−𝑥𝑖 𝑓 𝑥𝑖−1 −𝑓(𝑥𝑖)
  • 8. Algorithm for Secant Method • To determine a root of f(x) = 0, given two values, 𝑥0 and 𝑥1 , that are near the root, If If (𝑥0 ) l < I f (𝑥1)l then Swap 𝑥0 with 𝑥1 Repeat Set 𝑥2 = 𝑥1-f(𝑥1)* 𝑥0−𝑥1 𝑓 𝑥0 −𝑓(𝑥1) Set 𝑥0 = 𝑥1 . Set 𝑥1 = 𝑥2 . Until If(𝑥2)l < tolerance value.
  • 9. Graphical Representation of Secant Method 2
  • 10. Matlab Code f=@(x)(x^3-5*x+1); x1=2; x2 = 2.5; i = 0; while i <= 5 val = f(x2); val1 = f(x1); temp = x2 - x1; temp1 = val - val1; nVal = temp/temp1; nVal = nVal * val; nVal = x2 - nVal; x1 = x2; x2 = nVal; i = i+1; end fprintf('Point is %fn',x2)
  • 11. Example Numerical • F(x)=𝒙𝟑 − 𝟓𝒙 + 𝟏 • So we consider 𝒙𝟎 =2, 𝒙𝟏 = 𝟐. 𝟓 • F(2)=-1 • F(2.5)=4.125 • 𝒙𝒏+𝟏 = 𝒙𝒏-f(𝒙𝒏)* 𝒙𝒏−𝒙𝒏−𝟏 𝒇 𝒙𝒏 −𝒇 𝒙𝒏−𝟏 • 𝒙𝟐 = 𝒙𝟏-f(𝒙𝟏)* 𝒙𝟏−𝒙𝟎 𝒇 𝒙𝟏 −𝒇(𝒙𝟎) • 𝒙𝟐 = 𝟐. 𝟓 – 4.125* 𝟐.𝟓−𝟐 (𝟒.𝟏𝟐𝟓)−(−𝟏) =2.0975 • 𝒙𝟑 = 𝒙𝟐 - f(𝒙𝟐)* 𝒙𝟐−𝒙𝟏 𝒇 𝒙𝟐 −𝒇(𝒙𝟏) =2.1213 • 𝒙𝟒 =2.1285 • 𝒙𝟓 =2.1284 X F(x) 1 -3 2 -1 2.5 4.125 3 13
  • 12. Secant Method Pros and Cons • Advantages 1. No computations of derivatives 2. Only f(x) computation each step 3. It converges faster than linear rate. • Disadvantages 1. It may not converge 2. There is no guaranteed error bound for the computed iterates

Editor's Notes

  • #5: Two triangles are Similar if the only difference is size (and possibly the need to turn or flip one around). All corresponding angles are equal All corresponding sides have the same ratio
  • #6: Two triangles are Similar if the only difference is size (and possibly the need to turn or flip one around). All corresponding angles are equal All corresponding sides have the same ratio
  • #10: Source: https://www.youtube.com/watch?v=HpptfoWqhds