0% found this document useful (0 votes)
3 views3 pages

5 - Secant Method

The document outlines Experiment 5 from a Computer Science & Numerical Analysis Lab Manual, focusing on the Secant Method for finding roots of equations. It explains the method's theory, formula, and steps for implementation in MATLAB, including a specific task to find the root of the equation f(x) = x^3 - 2x - 5 = 0. Additionally, it requires writing MATLAB code to perform the task.

Uploaded by

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

5 - Secant Method

The document outlines Experiment 5 from a Computer Science & Numerical Analysis Lab Manual, focusing on the Secant Method for finding roots of equations. It explains the method's theory, formula, and steps for implementation in MATLAB, including a specific task to find the root of the equation f(x) = x^3 - 2x - 5 = 0. Additionally, it requires writing MATLAB code to perform the task.

Uploaded by

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

Computer Science & Numerical Analysis Lab Manual

Experiment 5

Understanding Secant Method & its Implementation on MATLAB

Objective:

 To understand the secant method to find root of an algebraic or transcendental equation


 To implement the code for secant method on MATLAB

Theory:

Secant method is a recursive method for finding the root for the polynomials by successive approximation.
It’s similar to the regula-falsi method but here we don’t need to check f(x1)f(x2)<0 again and again after every
approximation. In this method, the neighbourhood roots are approximated by secant line or chord to the
function f(x). It’s also advantageous of this method that we don’t need to differentiate the given function f(x),
as we do in Newton-Raphson method.

The formula for approximation to the root of f(x)= 0 is given as:

Xn+2 = ((Xn+1 f(Xn)) – ( Xnf(Xn+1))) /( (f(Xn) - f(Xn+1))

The sequence of steps followed in secant method is given as:

 Select two initial approximations x0 and x1 to find the root.


 Calculate the function's values at these points, i.e. f(x0) and f(x1).
 Apply the Secant Method formula to find the next approximation x2.
 Repeat the process until an acceptable level of accuracy is reached.

Designed & Prepared by Engr. Syed Ahtisham Mehmood Shah


Computer Science & Numerical Analysis Lab Manual
Experiment 5

Task:

a) Find the root of the equation f(x) = x 3- 2x - 5 = 0 using secant method.

Designed & Prepared by Engr. Syed Ahtisham Mehmood Shah


Computer Science & Numerical Analysis Lab Manual
Experiment 5

b) Write MATLAB code for part a.

Conclusion:

Designed & Prepared by Engr. Syed Ahtisham Mehmood Shah

You might also like