Secant Method

DOWNLOAD Mathematica Notebook SecantMethod

A root-finding algorithm which assumes a function to be approximately linear in the region of interest. Each improvement is taken as the point where the approximating line crosses the axis. The secant method retains only the most recent estimate, so the root does not necessarily remain bracketed. The secant method is implemented in the Wolfram Language as the undocumented option Method -> Secant in FindRoot[eqn, {x, x0, x1}].

When the algorithm does converge, its order of convergence is

 lim_(k->infty)|epsilon_(k+1)| approx C|epsilon|^phi,
(1)

where C is a constant and phi is the golden ratio.

 f^'(x_(n-1)) approx (f(x_(n-1))-f(x_(n-2)))/(x_(n-1)-x_(n-2))
(2)
 f(x_n) approx f(x_(n-1))+f^'(x_(n-1))(x_n-x_(n-1))=0
(3)
 f(x_(n-1))+(f(x_(n-1))-f(x_(n-2)))/(x_(n-1)-x_(n-2))(x_n-x_(n-1))=0,
(4)

so

 x_n=x_(n-1)-(f(x_(n-1))(x_(n-1)-x_(n-2)))/(f(x_(n-1))-f(x_(n-2))).
(5)

The secant method can be implemented in the Wolfram Language as

  SecantMethodList[f_, {x_, x0_, x1_}, n_] :=
    NestList[Last[#] - {0, (Function[x, f][Last[#]]*
      Subtract @@ #)/Subtract @@
      Function[x, f] /@ #}&, {x0, x1}, n]

Wolfram Web Resources

Mathematica »

The #1 tool for creating Demonstrations and anything technical.

Wolfram|Alpha »

Explore anything with the first computational knowledge engine.

Wolfram Demonstrations Project »

Explore thousands of free applications across science, mathematics, engineering, technology, business, art, finance, social sciences, and more.

Computerbasedmath.org »

Join the initiative for modernizing math education.

Online Integral Calculator »

Solve integrals with Wolfram|Alpha.

Step-by-step Solutions »

Walk through homework problems step-by-step from beginning to end. Hints help you try the next step on your own.

Wolfram Problem Generator »

Unlimited random practice problems and answers with built-in Step-by-step solutions. Practice online or make a printable study sheet.

Wolfram Education Portal »

Collection of teaching and learning tools built by Wolfram education experts: dynamic textbook, lesson plans, widgets, interactive Demonstrations, and more.

Wolfram Language »

Knowledge-based programming for everyone.