0% found this document useful (0 votes)
8 views14 pages

SWE Math4543 Lecture4

Uploaded by

jehere5159
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views14 pages

SWE Math4543 Lecture4

Uploaded by

jehere5159
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Math 4543: Numerical Methods

Lecture 4 — Secant Method & False Position Method

Syed Rifat Raiyan


Lecturer
Department of Computer Science & Engineering
Islamic University of Technology, Dhaka, Bangladesh
Email: [email protected]

Math 4543: Numerical Methods Lecture 4 SWE, IUT 1


Lecture Plan
The agenda for today

• What is the Secant method?

• Why do we need the Secant method? (instead of the Newton-Raphson method)

• Derivation of the approximation formula for the Secant method

• Pros and cons of Secant method

• Ditto for False Position method

Math 4543: Numerical Methods Lecture 4 SWE, IUT 2


Secant Method
What is it?

It is very similar to the Newton-Raphson method! (just approximate the derivative)

In the Secant method,


 We start the iterative process with two initial guesses.
 The root may or may not be bracketed by these guesses.
 The method hence falls in the category of open methods.

× Convergence in open methods is not guaranteed.


 But if the method does converge, it does so much faster than the bracketing methods.

Math 4543: Numerical Methods Lecture 4 SWE, IUT 3


Secant Method
Why do we need it?

Remember the iterative formula for the Newton-Raphson method?

The symbolical evaluation of the derivative is very costly for computers.


So, we approximate the derivative!

Math 4543: Numerical Methods Lecture 4 SWE, IUT 4


Secant Method
Deriving the formula using geometry

Math 4543: Numerical Methods Lecture 4 SWE, IUT 5


Secant Method
The Algorithm

Math 4543: Numerical Methods Lecture 4 SWE, IUT 6


Secant Method
Pros and Cons

Advantages
 Avoids the cost of symbolically finding the derivative, unlike Newton-Raphson.
 Typically converges faster than bracketed methods like the Bisection method.

Disadvantages
× Division by zero if functional values at both guesses are equal.
× Converges slower compared to Newton-Raphson, since derivative is approximated.
× No guarantee of converging.

Math 4543: Numerical Methods Lecture 4 SWE, IUT 7


Mini Quiz
Bad initial guesses for 𝒔𝒊𝒏(𝒙)

For finding the root of 𝑠𝑖𝑛(𝑥) = 0 using the Secant method,


which pair of initial guesses are inappropriate?

Math 4543: Numerical Methods Lecture 4 SWE, IUT 8


False Position Method
What is it?

Fig: Problem-26 from the Rhind Mathematical Papyrus, written in Egyptian hieroglyphics.

It’s a bracketed version of the Secant method!


In the False Position method a.k.a. Regula Falsi,
 We start the iterative process with two initial guesses.
 The root must be bracketed by these guesses.
 The method hence falls in the category of bracketed methods.

 Convergence in bracketed methods is guaranteed.


Math 4543: Numerical Methods Lecture 4 SWE, IUT 9
False Position Method
Why do we need it?

Remember what may happen when one of the initial guesses is very close to the root
in the Bisection Method? (a lot of wasteful iterations!)

False Position method takes advantage of the fact that


the intersection point between the secant and the 𝑋-axis
is closer to the actual root, compared to the mid-point
between the two guesses.

Math 4543: Numerical Methods Lecture 4 SWE, IUT 10


False Position Method
Derivation of the formula △ 𝑨𝑩𝑪 ~ △ 𝑫𝑨𝑬
So,
𝑫𝑬 𝑩𝑪
=
𝑨𝑬 𝑨𝑪

A C
E

Math 4543: Numerical Methods Lecture 4 SWE, IUT 11


False Position Method
The Algorithm

Math 4543: Numerical Methods Lecture 4 SWE, IUT 12


False Position Method
Pros and Cons

Advantages
 May converge faster than Bisection Method.
 Since it is a bracketed method, the convergence is guaranteed.

Disadvantages
× Almost the same as the drawbacks of the Bisection method. (think about it later…)

Math 4543: Numerical Methods Lecture 4 SWE, IUT 13


Mini Quiz
Which one reigns supreme?
Think intuitively — For the following graph, which method
performs better? Bisection or False Position?
(i.e. lesser number of iterations)

Math 4543: Numerical Methods Lecture 4 SWE, IUT 14

You might also like