SECANT METHOD

INTERACTIVE E-BOOK

NONLINEAR EQUATIONS

MAJOR

GENERAL

On non Internet Explorer browsers, the equations may not show up.

As an alternative or if you prefer,

you can see the pdf version of the ebook instead

Title

An interactive e-book for illustrating Secant Method of solving nonlinear equations

Creator

Autar K Kaw

Subject and Keywords

Secant Method, Numerical Solution of Nonlinear Equations, Mathcad, Maple, Mathematica, Matlab, Simulations.

Description

An interactive E-book for illustrating Secant method of finding roots of nonlinear equation.  It includes links to simulations in Mathcad, Maple, Mathematica and Matlab for the algorithm, convergence and the pitfalls; multiple choice quizzes, problem set, and a PowerPoint presentation.

Publisher

Holistic Numerical Methods Institute,

College of Engineering,

University of South Florida, Tampa, FL 33620-5350.

Contributors

SEE FILES

Format

Text/HTML

Last Revised

June 14, 2004

Identifier

http://numericalmethods.eng.usf.edu/ebooks/secant_03nle_ebook.pdf

Language

English

Rights

http://numericalmethods.eng.usf.edu/rights.htm

 

Table of Contents

Background

        Test your knowledge of the background

        Introduction

        PowerPoint presentation

Example

Simulation

       Method  [MAPLE] [MATHCAD] [MATHEMATICA] [MATLAB]

       Pitfall: Root jumps over several roots [MAPLE] [MATHCAD] [MATHEMATICA] [MATLAB]

        Convergence [MAPLE] [MATHCAD] [MATHEMATICA] [MATLAB]

         Pitfall: Division by zero [MAPLE] [MATHCAD] [MATHEMATICA] [MATLAB]

Problem Sets

        Multiple choice question examination

            

Background

This is an example of how an instructor of a Numerical Methods course can develop an E-book on a single topic by using resources that are only available at the Holistic Numerical Methods Institute (HNMI) Website.

Although one of the primary advantages of a web-based resource is that one can use documents outside of its own domain, we are particularly using this example as a way to illustrate the holistic nature of the resources available at HNMI.   You are welcome to modify and edit this e-book to suit your purpose.

Using the textbook document written in MS Word 2000 as a foundation, it was made interactive within MS Word 2000 by putting bookmarks and hyperlinks to background information, PowerPoint presentations, Mathcad simulations, historical anecdotes, multiple choice tests, problem sets, etc.  Then the MS Word 2000 file was saved as a web page and that is what you are about to read here.

Back to TOC

Introduction   

Before you get started, see the video or/and test your knowledge on the background of solving nonlinear equations or go to the table of contents for particular information.

The Newton-Raphson method of solving the nonlinear equation f(x)=0 is given by the recursive formula

                                                                                            (1)

From the above equation, one of the drawbacks of the Newton-Raphson method is that you have to evaluate the derivative of the function.  With availability of symbolic manipulators such as Maple, Mathcad, Mathematica and Matlab, this process has become more convenient.  However, it is still can be a laborious process.  To overcome this drawback, the derivative, f’(x) of the function, f(x) is approximated as

                                                                                (2)

Substituting Equation (2) in (1), gives

.                                                                            (3)

The above equation is called the Secant method.  This method now requires two initial guesses, but unlike the bisection method, the two initial guesses do not need to bracket the root of the equation.  The Secant method may or may not converge, but when it converges, it converges faster than the Bisection method.  However, since the derivative is approximated, it converges slower then Newton-Raphson method.

 

The Secant method can be also derived from geometry shown in Figure (1).  Taking two initial guesses, xi and xi-1, one draws a straight line between f(xi) and f(xi-1) passing through the x-axis at xi+1.  ABE and DCE are similar triangles.  Hence

 

On rearranging, it gives the secant method as

Figure 1: Geometrical representation of the Secant method

Back to TOC

Simulations

       Method  [MAPLE] [MATHCAD] [MATHEMATICA] [MATLAB]

       Pitfall: Root jumps over several roots [MAPLE] [MATHCAD] [MATHEMATICA] [MATLAB]

        Convergence [MAPLE] [MATHCAD] [MATHEMATICA] [MATLAB]

         Pitfall: Division by zero [MAPLE] [MATHCAD] [MATHEMATICA] [MATLAB]

Example

You are working for ‘DOWN THE TOILET COMPANY’ that makes floats for ABC commodes.  The ball has a specific gravity of 0.6 and has a radius of 5.5 cm.  You are asked to find the distance to which the ball will get submerged when floating in water.

 

Figure 5.  Floating ball problem

 

The equation that gives the depth ‘x’ to which the ball is submerged under water is given by

Use the secant method of finding roots of equations to find

a)      the depth ‘x’ to which the ball is submerged under water.  Conduct three iterations to estimate the root of the above equation. 

b)      find the absolute relative approximate error at the end of each iteration, and

c)      the number of significant digits at least correct at the end of each iteration.

Solution

Let us assume the initial guesses of the root of  as and

Iteration #1

The estimate of the root is

 

                

    

     = 0.06461

 

The absolute relative approximate error, at the end of iteration #1 is

           

           

           

The number of significant digits at least correct is 0, as you need an absolute relative approximate error of at less than 5% for one significant digit to be correct in your result.

Iteration #2

           

           

           

The absolute relative approximate error, at the end of iteration #1 is

                 

      = 3.525%

The number of significant digits at least correct is 1, as you need an absolute relative approximate error of less than 5%.

Iteration #3

 

           

           

The absolute relative approximate error, at the end of iteration #1 is

           

      

      

The number of significant digits at least correct is 1, as you need a absolute relative approximate error is at least 5%.

Table 1: Secant method results as a function of iterations

Iteration

Number

i

1

2

3

4

0

1

2

3

0.02

0.05

0.06461

0.06241

0.05

0.06461

0.06217

0.06238

0.06461

0.06241

0.06238

0.06238

22.61

3.525

0.0595

3.64x10-4

-1.9812x10-5

-3.2852x10-7

2.0252x10-9

-1.8576x10-12

 

Back to TOC

 

Problem Set

            Multiple choice question exam

Back to TOC