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

Secant Method

The document describes the secant method, which is a variation of Newton's method for finding roots of equations. The secant method approximates the root by finding the x-intercept of the secant line between successive function evaluations, requiring only one evaluation per step after the initial two points. The method was first described in ancient Babylonian clay tablets and later formalized by Cardano in the 16th century. An example demonstrates finding the root of an equation using the secant method in MATLAB code.

Uploaded by

Chiến Nguyễn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
81 views

Secant Method

The document describes the secant method, which is a variation of Newton's method for finding roots of equations. The secant method approximates the root by finding the x-intercept of the secant line between successive function evaluations, requiring only one evaluation per step after the initial two points. The method was first described in ancient Babylonian clay tablets and later formalized by Cardano in the 16th century. An example demonstrates finding the root of an equation using the secant method in MATLAB code.

Uploaded by

Chiến Nguyễn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

1.

Secant Method
Definition
Newton’s method is an extremely powerful technique, but it has a major weakness:
the need
to know the value of the derivative of f at each approximation. Frequently, f (x) is far
more
difficult and needs more arithmetic operations to calculate than f (x).
To circumvent the problem of the derivative evaluation in Newton’s method, we
introduce a slight variation. By definition,

This technique is called the Secant method and is presented in below figure. Starting
with the two initial approximations p0 and p1, the approximation p2 is the x-intercept of
the line joining ( p0, f ( p0)) and ( p1, f ( p1)). The approximation p3 is the x-intercept of
the line joining ( p1, f ( p1)) and ( p2, f ( p2)), and so on. Note that only one function
evaluation is needed per step for the Secant method after p2 has been determined. In
contrast, each step of Newton’s method requires an evaluation of both the function
and its derivative.
Background
A special case of this method was first called the rule of double false position in 18th-
Century B.C. Babylonian clay tablets. It is now thought of as a primitive version
because it is essentially the secant method applied to a linear equation. Because
algebra hadn't been developed by that time, Babylonians had described their problems
in a written form rather than symbolically. This method was developed as a result of
common problems they encountered such as the sale and distribution of properties,
inheritance, or for the purpose of portion control and the prediction of production. In
1545 the rule of double false position was first used as an iterative procedure by
Cardano in his Artis Magnae (Papakonstantinou 2009). Thus, we have the secant
method for a nonlinear equation

Example
Find a root of this equation using Secant method :

Here :

First iteration
Second iteration

Third iteration
Fourth iteration

Fifth iteration
Matlab Code
%Example
%Find a root of an equation f(x)=x^3-x-1 using Secant method
clear all
clc
f=@(x)x*x*x-x-1; %Nhap phuong trinh f(x)
% Nghiem nam trong khoang(x0,x1).
x0=input('\n Nhap diem bat dau '); %Vi du x0=1
x1=input('\n Nhap diem ket thuc ');%Vi du x1=2
epsilon=input('\n Nhap sai so mong muon '); %Sai so tùy ý 0.001 hoac etc.
err=abs(x1-x0);
%Công thuc x2=(x0*f(x1)-x1*f(x0))/(f(x1)-f(x0));
if f(x0)*f(x1)>0
disp('So ban vua nhap khong hop ly !!!');
else
while err > epsilon
x2=(x0*f(x1)-x1*f(x0))/(f(x1)-f(x0));
x0=x1;
x1=x2;
err=abs(x1-x0);
root=x2;

end
fprintf('\n Nghiem la %4.4f ',root);
end

You might also like