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

Secant Method

Micro LabMicro LabMicro LabMicro LabMicro LabMicro LabMicro LabMicro LabMicro LabMicro LabMicro LabMicro LabMicro LabMicro LabMicro Lab

Uploaded by

Baltazar Marcos
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)
440 views

Secant Method

Micro LabMicro LabMicro LabMicro LabMicro LabMicro LabMicro LabMicro LabMicro LabMicro LabMicro LabMicro LabMicro LabMicro LabMicro Lab

Uploaded by

Baltazar Marcos
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/ 3

GARIN, SHERICK BONN D.

BSME 5
In numerical analysis, the secant method is a root-finding algorithm that uses a succession
of roots of secant lines to better approximate a root of a function f. The secant method can be thought of as a finite
difference approximation of Newton's method. However, the method was developed independently of Newton's
method, and predated the latter by over 3,000 years.[1]
The secant method is defined by the recurrence relation

Starting with initial values x0 and x1, we construct a line through the points (x0, f(x0)) and (x1, f(x1)), as
demonstrated in the picture on the right. In point-slope form, this line has the equation

We find the root of this line the value of x such that y =


0 by solving the following equation for x:

The solution is

We then use this new value of x as x2 and repeat the


process using x1 and x2 instead of x0 and x1. We continue this process, solving for x3, x4, etc., until we reach a
sufficiently high level of precision (a sufficiently small difference between xn and xn - 1).

As can be seen from the recurrence relation, the secant method requires two initial values, x0 and x1, which
should ideally be chosen to lie close to the root.

Example 1

As an example of the secant method, suppose we wish to find a root of the function f(x) = cos(x) + 2 sin(x) + x2. A
closed form solution for x does not exist so we must use a numerical technique. We will usex0 = 0 and x1 = -0.1 as
our initial approximations. We will let the two values step = 0.001 and abs = 0.001 and we will halt after a maximum
of N = 100 iterations.
We will use four decimal digit arithmetic to find a solution and the resulting iteration is shown in Table 1.
Table 1. The secant method applied to f(x) = cos(x) + 2 sin(x) + x2.

xn 1

xn

xn + 1

|f(xn + 1)|

|xn + 1 - xn|

0.0

-0.1

-0.5136

0.1522

0.4136

-0.1

-0.5136

-0.6100

0.0457

0.0964

-0.5136

-0.6100

-0.6514

0.0065

0.0414

-0.6100

-0.6514

-0.6582

0.0013

0.0068

-0.6514

-0.6582

-0.6598

0.0006

0.0016

-0.6582

-0.6598

-0.6595

0.0002

0.0003

Thus, with the last step, both halting conditions are met, and therefore, after six iterations, our approximation to the
root is -0.6595 .

Example 2

Example 3
Find the root of 3x+sin[x]-exp[x]=0
Let the initial guess be 0.0 and 1.0
f(x) = 3x+sin[x]-exp[x]
i
0
1
2
3
xi
0
1
0.471
0.308
So the iterative process converges to 0.36 in six iterations.

4
0.363

5
0.36

6
0.36

REFERENCES:

https://en.wikipedia.org/wiki/Secant_method
https://ece.uwaterloo.ca/~dwharder/NumericalAnalysis/10RootFinding/secant/examp
les.html
http://www.math.pitt.edu/~anitescu/TEACHING/ATKINSON/m2070.html

You might also like