Secant Method

One of the reasons for the slow convergence of the bisection method is that it uses no other information about the function [Maple Math] then the sign at [Maple Math] and [Maple Math] . The Secant Method uses the values at [Maple Math] and [Maple Math] to estimate the next approximation. It also does not require the root to be bracketed, i.e. the initial values [Maple Math] and [Maple Math] may be two approximations to the root. The idea is to draw the line between ( [Maple Math] ) and ( [Maple Math] ) and find its intersection with the [Maple Math] -axis; Consider the following example:

> f:=x->cos(x)-0.3;

[Maple Math]

> a:=0;f(a);

[Maple Math]

[Maple Math]

> b:=0.7;f(b);

[Maple Math]

[Maple Math]

> line1:=x->f(a)+(f(b)-f(a))/(b-a)*(x-a);

[Maple Math]

> x[1]:=solve(line1(x)=0,x);f(x[1]);

[Maple Math]

[Maple Math]

> a:=b;b:=x[1];line2:=x->f(a)+(f(b)-f(a))/(b-a)*(x-a);

[Maple Math]

[Maple Math]

[Maple Math]

> x[2]:=solve(line2(x)=0,x);f(x[2]);

[Maple Math]

[Maple Math]

> a:=b;b:=x[2];line3:=x->f(a)+(f(b)-f(a))/(b-a)*(x-a);

[Maple Math]

[Maple Math]

[Maple Math]

> x[3]:=solve(line3(x)=0,x);f(x[3]);

[Maple Math]

[Maple Math]

We seem to move closer and closer to the real root. Graphically, these steps are illustrated in the following picture:

[Maple Plot]

>

The algorithm for the Secant Method is given below:

>

Step 1: obtain two approximations, [Maple Math] and [Maple Math] .

Step 2: calculate the next approximation as

[Maple Math] .

Step 3: If [Maple Math] then [Maple Math] is the root, otherwise, if [Maple Math] then [Maple Math] is the required approximation to the root, else repeat step 2.

>

Notice that it is best to use the relative error between two consecutive approximations to determine when to halt the process.

The Secant Method converges very rapidly, if good inital estimates are given. But estimating an upper bound to the convergence rate is more complicated.