SlideShare a Scribd company logo
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
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

What's hot

Numerical Solution of Ordinary Differential Equations
Numerical Solution of Ordinary Differential EquationsNumerical Solution of Ordinary Differential Equations
Numerical Solution of Ordinary Differential Equations
Meenakshisundaram N
 
Newton’s Divided Difference Formula
Newton’s Divided Difference FormulaNewton’s Divided Difference Formula
Newton’s Divided Difference Formula
Jas Singh Bhasin
 
Solution of non-linear equations
Solution of non-linear equationsSolution of non-linear equations
Solution of non-linear equationsZunAib Ali
 
Runge Kutta Method
Runge Kutta MethodRunge Kutta Method
Runge Kutta Method
ch macharaverriyya naidu
 
Numerical integration
Numerical integrationNumerical integration
Numerical integration
Sunny Chauhan
 
presentation on Euler and Modified Euler method ,and Fitting of curve
presentation on Euler and Modified Euler method ,and Fitting of curve presentation on Euler and Modified Euler method ,and Fitting of curve
presentation on Euler and Modified Euler method ,and Fitting of curve
Mukuldev Khunte
 
Complex Variable & Numerical Method
Complex Variable & Numerical MethodComplex Variable & Numerical Method
Complex Variable & Numerical Method
Neel Patel
 
Spline Interpolation
Spline InterpolationSpline Interpolation
Spline Interpolation
aiQUANT
 
Newton's Forward/Backward Difference Interpolation
Newton's Forward/Backward  Difference InterpolationNewton's Forward/Backward  Difference Interpolation
Newton's Forward/Backward Difference Interpolation
VARUN KUMAR
 
Roots of equations
Roots of equations Roots of equations
Roots of equations
shopnohinami
 
Bisection & Regual falsi methods
Bisection & Regual falsi methodsBisection & Regual falsi methods
Bisection & Regual falsi methods
Divya Bhatia
 
Interpolation and its applications
Interpolation and its applicationsInterpolation and its applications
Interpolation and its applications
RinkuMonani
 
Regula falsi method
Regula falsi methodRegula falsi method
Regula falsi methodandrushow
 
Integration by partial fraction
Integration by partial fractionIntegration by partial fraction
Integration by partial fraction
Ayesha Ch
 
Numerical solution of ordinary differential equations GTU CVNM PPT
Numerical solution of ordinary differential equations GTU CVNM PPTNumerical solution of ordinary differential equations GTU CVNM PPT
Numerical solution of ordinary differential equations GTU CVNM PPT
Panchal Anand
 
Applications of numerical methods
Applications of numerical methodsApplications of numerical methods
Applications of numerical methods
Tarun Gehlot
 
Newton-Raphson Method
Newton-Raphson MethodNewton-Raphson Method
Newton-Raphson MethodJigisha Dabhi
 
Bisection method
Bisection methodBisection method
Bisection method
Md. Mujahid Islam
 
Newton's forward difference
Newton's forward differenceNewton's forward difference
Newton's forward difference
Raj Parekh
 
Engineering Mathematics-IV_B.Tech_Semester-IV_Unit-II
Engineering Mathematics-IV_B.Tech_Semester-IV_Unit-IIEngineering Mathematics-IV_B.Tech_Semester-IV_Unit-II
Engineering Mathematics-IV_B.Tech_Semester-IV_Unit-II
Rai University
 

What's hot (20)

Numerical Solution of Ordinary Differential Equations
Numerical Solution of Ordinary Differential EquationsNumerical Solution of Ordinary Differential Equations
Numerical Solution of Ordinary Differential Equations
 
Newton’s Divided Difference Formula
Newton’s Divided Difference FormulaNewton’s Divided Difference Formula
Newton’s Divided Difference Formula
 
Solution of non-linear equations
Solution of non-linear equationsSolution of non-linear equations
Solution of non-linear equations
 
Runge Kutta Method
Runge Kutta MethodRunge Kutta Method
Runge Kutta Method
 
Numerical integration
Numerical integrationNumerical integration
Numerical integration
 
presentation on Euler and Modified Euler method ,and Fitting of curve
presentation on Euler and Modified Euler method ,and Fitting of curve presentation on Euler and Modified Euler method ,and Fitting of curve
presentation on Euler and Modified Euler method ,and Fitting of curve
 
Complex Variable & Numerical Method
Complex Variable & Numerical MethodComplex Variable & Numerical Method
Complex Variable & Numerical Method
 
Spline Interpolation
Spline InterpolationSpline Interpolation
Spline Interpolation
 
Newton's Forward/Backward Difference Interpolation
Newton's Forward/Backward  Difference InterpolationNewton's Forward/Backward  Difference Interpolation
Newton's Forward/Backward Difference Interpolation
 
Roots of equations
Roots of equations Roots of equations
Roots of equations
 
Bisection & Regual falsi methods
Bisection & Regual falsi methodsBisection & Regual falsi methods
Bisection & Regual falsi methods
 
Interpolation and its applications
Interpolation and its applicationsInterpolation and its applications
Interpolation and its applications
 
Regula falsi method
Regula falsi methodRegula falsi method
Regula falsi method
 
Integration by partial fraction
Integration by partial fractionIntegration by partial fraction
Integration by partial fraction
 
Numerical solution of ordinary differential equations GTU CVNM PPT
Numerical solution of ordinary differential equations GTU CVNM PPTNumerical solution of ordinary differential equations GTU CVNM PPT
Numerical solution of ordinary differential equations GTU CVNM PPT
 
Applications of numerical methods
Applications of numerical methodsApplications of numerical methods
Applications of numerical methods
 
Newton-Raphson Method
Newton-Raphson MethodNewton-Raphson Method
Newton-Raphson Method
 
Bisection method
Bisection methodBisection method
Bisection method
 
Newton's forward difference
Newton's forward differenceNewton's forward difference
Newton's forward difference
 
Engineering Mathematics-IV_B.Tech_Semester-IV_Unit-II
Engineering Mathematics-IV_B.Tech_Semester-IV_Unit-IIEngineering Mathematics-IV_B.Tech_Semester-IV_Unit-II
Engineering Mathematics-IV_B.Tech_Semester-IV_Unit-II
 

Similar to Secant Method

2. Fixed Point Iteration.pptx
2. Fixed Point Iteration.pptx2. Fixed Point Iteration.pptx
2. Fixed Point Iteration.pptx
saadhaq6
 
Matlab lab manual
Matlab lab manualMatlab lab manual
Matlab lab manual
nmahi96
 
Applications of Differential Calculus in real life
Applications of Differential Calculus in real life Applications of Differential Calculus in real life
Applications of Differential Calculus in real life
OlooPundit
 
Maths-MS_Term2 (1).pdf
Maths-MS_Term2 (1).pdfMaths-MS_Term2 (1).pdf
Maths-MS_Term2 (1).pdf
AnuBajpai5
 
Integration techniques
Integration techniquesIntegration techniques
Integration techniquesKrishna Gali
 
Differential calculus maxima minima
Differential calculus  maxima minimaDifferential calculus  maxima minima
Differential calculus maxima minima
Santhanam Krishnan
 
Conjugate Gradient Methods
Conjugate Gradient MethodsConjugate Gradient Methods
Conjugate Gradient Methods
MTiti1
 
Calculo integral - Larson
Calculo integral - LarsonCalculo integral - Larson
Calculo integral - Larson
Juan Alejandro Alvarez Agudelo
 
3. DERIVATIVE BY INCREMENT IN CALULUS 01
3. DERIVATIVE BY INCREMENT IN CALULUS 013. DERIVATIVE BY INCREMENT IN CALULUS 01
3. DERIVATIVE BY INCREMENT IN CALULUS 01
oliverosmarcial24
 
Rosser's theorem
Rosser's theoremRosser's theorem
Rosser's theorem
Wathna
 
On the Seidel’s Method, a Stronger Contraction Fixed Point Iterative Method o...
On the Seidel’s Method, a Stronger Contraction Fixed Point Iterative Method o...On the Seidel’s Method, a Stronger Contraction Fixed Point Iterative Method o...
On the Seidel’s Method, a Stronger Contraction Fixed Point Iterative Method o...
BRNSS Publication Hub
 
Interpolation In Numerical Methods.
 Interpolation In Numerical Methods. Interpolation In Numerical Methods.
Interpolation In Numerical Methods.
Abu Kaisar
 
CALCULUS 2.pptx
CALCULUS 2.pptxCALCULUS 2.pptx
CALCULUS 2.pptx
ShienaMaeIndac
 
Natural and Clamped Cubic Splines
Natural and Clamped Cubic SplinesNatural and Clamped Cubic Splines
Natural and Clamped Cubic SplinesMark Brandao
 
Bisection
BisectionBisection
Bisection
Nasima Akhtar
 
勾配法
勾配法勾配法
勾配法
貴之 八木
 

Similar to Secant Method (20)

Mqm em
Mqm emMqm em
Mqm em
 
2. Fixed Point Iteration.pptx
2. Fixed Point Iteration.pptx2. Fixed Point Iteration.pptx
2. Fixed Point Iteration.pptx
 
Matlab lab manual
Matlab lab manualMatlab lab manual
Matlab lab manual
 
Applications of Differential Calculus in real life
Applications of Differential Calculus in real life Applications of Differential Calculus in real life
Applications of Differential Calculus in real life
 
Maths-MS_Term2 (1).pdf
Maths-MS_Term2 (1).pdfMaths-MS_Term2 (1).pdf
Maths-MS_Term2 (1).pdf
 
Integration techniques
Integration techniquesIntegration techniques
Integration techniques
 
Differential calculus maxima minima
Differential calculus  maxima minimaDifferential calculus  maxima minima
Differential calculus maxima minima
 
Conjugate Gradient Methods
Conjugate Gradient MethodsConjugate Gradient Methods
Conjugate Gradient Methods
 
Calculo integral - Larson
Calculo integral - LarsonCalculo integral - Larson
Calculo integral - Larson
 
3. DERIVATIVE BY INCREMENT IN CALULUS 01
3. DERIVATIVE BY INCREMENT IN CALULUS 013. DERIVATIVE BY INCREMENT IN CALULUS 01
3. DERIVATIVE BY INCREMENT IN CALULUS 01
 
Rosser's theorem
Rosser's theoremRosser's theorem
Rosser's theorem
 
On the Seidel’s Method, a Stronger Contraction Fixed Point Iterative Method o...
On the Seidel’s Method, a Stronger Contraction Fixed Point Iterative Method o...On the Seidel’s Method, a Stronger Contraction Fixed Point Iterative Method o...
On the Seidel’s Method, a Stronger Contraction Fixed Point Iterative Method o...
 
Interpolation In Numerical Methods.
 Interpolation In Numerical Methods. Interpolation In Numerical Methods.
Interpolation In Numerical Methods.
 
Maths04
Maths04Maths04
Maths04
 
CALCULUS 2.pptx
CALCULUS 2.pptxCALCULUS 2.pptx
CALCULUS 2.pptx
 
Natural and Clamped Cubic Splines
Natural and Clamped Cubic SplinesNatural and Clamped Cubic Splines
Natural and Clamped Cubic Splines
 
Bisection
BisectionBisection
Bisection
 
03_AJMS_166_18_RA.pdf
03_AJMS_166_18_RA.pdf03_AJMS_166_18_RA.pdf
03_AJMS_166_18_RA.pdf
 
03_AJMS_166_18_RA.pdf
03_AJMS_166_18_RA.pdf03_AJMS_166_18_RA.pdf
03_AJMS_166_18_RA.pdf
 
勾配法
勾配法勾配法
勾配法
 

Recently uploaded

AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
BrazilAccount1
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
seandesed
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
Divya Somashekar
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
AafreenAbuthahir2
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
AJAYKUMARPUND1
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
Pratik Pawar
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
Kamal Acharya
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
TeeVichai
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
MdTanvirMahtab2
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
Robbie Edward Sayers
 

Recently uploaded (20)

AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
 

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
  • 6.
  • 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

  1. 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
  2. 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
  3. Source: https://www.youtube.com/watch?v=HpptfoWqhds