secant method


The secant method which is similar to the Newton-Raphson method is used to find the extremumMathworldPlanetmath value for a function over an interval for which the defined function has only one extremum. If there is more then one minimum or maximum, then convergence is not guaranteed.

The advantage over the Newton-Raphson method is that the secant method does not require the second derivative so only one function is used, the derivativePlanetmathPlanetmath. However, two initial guesses are needed. The algorithmMathworldPlanetmath to find the extremum is to iterate using the following expression

xk=xk-f(xk)xk-xk-1f(xk)-f(xk-1)

An analytical example is given below for the simple functionMathworldPlanetmathPlanetmath

f(x)=x2+1

taking the derivative yields

f(x)=2x

So for the initial guesses of x0=3 and x1=5, x2, the first iteration evaluates to

x2=5-f(x1)[5-3f(x1)-f(x0)]

The derivatives at these two points are

f(x1)=10
f(x0)=6

giving us the value for the first iteration of

x2=0.

To check when we are done iterating, we need one more iteration for comparison, so

x3=x2-f(x2)[0-5f(x2)-f(x1)]

which is

x3=0

Since x3-x2=0, we are done and our extremum is 0.

Not every function is so easy to iterate analytically and we must resort to numerical means. The attached file, \PMlinktofilesecantMethod1.msecantMethod1.m, shows how to iterate using matlab on the more complicated function

f(x)=x100-x2

One still must be careful when using the secant method since the above function has a maximum and a minimum on the interval of [-10,10] and you will not get convergence if your initial guesses are -2 and 2. However, on the interval of [0,10], there is only one extremum, so choose guesses of 5 and 6. Then the matlab function converges to the extremum of

5*2=7.0711

which is a maximum as the figure below shows

Figure 1: Example Function

0.1 References

[1] Tragesser, S. ” Optimization”, lecture notes, University of Colorado at Colorado Springs, Spring 2006.

Title secant method
Canonical name SecantMethod
Date of creation 2013-03-22 15:39:22
Last modified on 2013-03-22 15:39:22
Owner bloftin (6104)
Last modified by bloftin (6104)
Numerical id 10
Author bloftin (6104)
Entry type Algorithm
Classification msc 49M15
Related topic MethodsToFindExtremum