Lesson 2 Methods of Root Finding

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 23

ITERATIVE

METHODS OF ROOT-FINDING
NUMERICAL METHODS AND ANALYSIS
LESSON 2
PRESENTED BY: ENGR. ROMULO C. CRUZ JR.
LEARNING OUTCOMES

➢ Approximate the roots of functions by iteration, that is by


bracketing methods and open methods

➢ Verify these roots using a graphing calculator

Presented by: Engr. Romulo C. Cruz Jr.


ITERATION

➢ the repetition of a process in order to generate a sequence of


outcomes; each repetition of the process is a single iteration, and the
outcome of each iteration is then the starting point of the next iteration
(en.wikipedia.org)

➢ repetition of a mathematical or computational procedure applied to


the result of a previous application, typically as a means of obtaining
successively closer approximations to the solution of a problem
(Oxford Languages)

Presented by: Engr. Romulo C. Cruz Jr.


ITERATIVE METHODS OF ROOT-FINDING

➢ Bracketing methods

➢ Open methods

NOTE:
(1) Useful in finding the roots of non-factorable polynomials.
(2)The bracketing methods always work but converge slowly;
the open methods can diverge, but usually converge quickly

Presented by: Engr. Romulo C. Cruz Jr.


ITERATIVE BRACKETING
METHODS
ITERATIVE BRACKETING METHODS

➢ based on two initial guesses that ‘bracket’ the root:


➢ Bisection Method

➢ False Position Method

Presented by: Engr. Romulo C. Cruz Jr.


BISECTION METHOD

➢ finds an approximate root in an interval by repeatedly bisecting


into subintervals
➢ also known as half-interval method

https://www.cfm.brown.edu/people/dobrush/am33/Mathematica/ch3/brack
et.html

Presented by: Engr. Romulo C. Cruz Jr.


ALGORITHM OF BISECTION METHOD

Let 𝑓 𝑥 be a continuous function in the interval (a, b) such that 𝒇(𝒂) and 𝒇(𝒃)
are of opposite signs, that is 𝑓 𝑎 ∙ 𝑓(𝑏) < 0

1. Compute the initial approximation using


𝑎+𝑏
𝑥0 =
2
2. To find the first approximation, evaluate:
If 𝑓 𝑥0 = 0, then 𝑥0 is a root.
If 𝑓(𝑥0 ) ∙ 𝑓(𝑎) < 0, then the root lies between a and 𝑥0 ; repeat the
procedure by halving the interval again.

𝑎+𝑥0
Solve 𝑥1 =
2

Presented by: Engr. Romulo C. Cruz Jr.


ALGORITHM OF BISECTION METHOD

If 𝑓(𝑥0 ) ∙ 𝑓(𝑏) < 0, then the root lies between 𝑥0 and b; repeat the
procedure by halving the interval again.

𝑥0 +𝑏
Solve 𝑥1 =
2

3. Continue the process until root is found to be of desired accuracy.

Presented by: Engr. Romulo C. Cruz Jr.


EXAMPLE PROBLEM 1

Use bisection method to find a root of the function


𝑓 𝑥 = 𝑥 3 + 2𝑥 2 − 𝑥 − 1
Round-off to three decimal places.

SOLUTION:
Initial approximation
Let 𝑎 = 0, 𝑏 = 1; this gives 𝑓 0 = −1, 𝑓 1 = 1; 𝑓 0 ∙ 𝑓 1 < 0

0+1
𝑥0 = = 0.5
2
𝑓 0.5 = −0.875
𝑓(0.5) ∙ 𝑓(1) < 0
Presented by: Engr. Romulo C. Cruz Jr.
EXAMPLE PROBLEM 1

First approximation
0.5+1
𝑥1 = = 0.75
2
𝑓 0.75 = −0.203
𝑓 0.75 ∙ 𝑓 1 < 0

Second approximation
0.75+1
𝑥2 = = 0.875
2
𝑓 0.875 = 0.326
𝑓(0.75 ∙ 𝑓 0.875 < 0

Presented by: Engr. Romulo C. Cruz Jr.


EXAMPLE PROBLEM 1

Third approximation
0.75+0.875
𝑥3 = = 0.813
2
𝑓 0.813 = 0.046
𝑓 0.75 ∙ 𝑓 0.813 < 0

Fourth approximation
0.75+0.813
𝑥4 = = 0.782
2
𝑓 0.782 = −0.081
𝑓 0.782 ∙ 𝑓 0.813 < 0

Presented by: Engr. Romulo C. Cruz Jr.


EXAMPLE PROBLEM 1

Fifth approximation
0.782+0.813
𝑥5 = = 0.798
2
𝑓 0.798 = −0.016
𝑓 0.798 ∙ 𝑓 0.813 < 0

Sixth approximation
0.798+0.813
𝑥6 = = 0.806
2
𝑓 0.806 = 0.017
𝑓 0.798 ∙ 𝑓 0.806 < 0

Presented by: Engr. Romulo C. Cruz Jr.


EXAMPLE PROBLEM 1

Seventh approximation
0.798+0.806
𝑥7 = = 0.802
2
𝑓 0.802 = 2.58x10−4
𝑓 0.798 ∙ 𝑓 0.802 < 0

Eighth approximation
0.798+0.802
𝑥8 = = 0.800
2
𝑓 0.800 = −8x10−3
𝑓 0.800 ∙ 𝑓 0.802 < 0

Presented by: Engr. Romulo C. Cruz Jr.


EXAMPLE PROBLEM 1

Ninth approximation
0.800+0.802
𝑥9 = = 0.801
2

𝑓 0.801 = −3.88x10−3
𝑓 0.801 ∙ 𝑓 0.802 < 0

Tenth approximation
0.801+0.802
𝑥10 = = 0.802
2

Hence, 0.802 is a root rounded to three decimal places


Presented by: Engr. Romulo C. Cruz Jr.
LET’S TRY THIS: EXAMPLE PROBLEM 2

Use bisection method to find another root of the function


𝑓 𝑥 = 𝑥 3 + 2𝑥 2 − 𝑥 − 1
Round to three decimal places.

Presented by: Engr. Romulo C. Cruz Jr.


FALSE POSITION METHOD

➢ also known as Regula Falsi method

➢ similar to bisection method except that rather than bisecting the


interval, it locates the roots joining a and b with a straight line

Presented by: Engr. Romulo C. Cruz Jr.


FALSE POSITION METHOD

By two-point form, the equation of line AB is

−𝑓(𝑎) 𝑓 𝑏 −𝑓(𝑎)
=
𝑥0 −𝑎 𝑏−𝑎

The point of intersection 𝑥0 of AB with the x-axis is

𝑎𝑓 𝑏 − 𝑏𝑓(𝑎)
𝑥0 =
𝑓 𝑏 −𝑓 𝑎

This is to be repeated for lines A0B, A1B,… until the root  is found

Presented by: Engr. Romulo C. Cruz Jr.


EXAMPLE PROBLEM 3

Use false position method to find a root of the function


𝑓 𝑥 = 𝑥 3 + 2𝑥 2 − 𝑥 − 1
Round to three decimal places.

SOLUTION:
Initial approximation
Let 𝑎 = 0, 𝑏 = 1; this gives 𝑓 𝑎 = 𝑓 0 = −1, 𝑓 𝑏 = 𝑓(1) = 1; 𝑓 0 ∙ 𝑓 1 < 0
𝑎𝑓 𝑏 − 𝑏𝑓(𝑎) 0−(1)(−1)
𝑥0 = = = 0.5
𝑓 𝑏 −𝑓 𝑎 1−(−1)

𝑓 0.5 = −0.875; 𝑓(0.5) ∙ 𝑓(1) < 0

Presented by: Engr. Romulo C. Cruz Jr.


EXAMPLE PROBLEM 3

First approximation:
0.5 1 −1(−0.875)
𝑥1 = = 0.733
1− −0.875

𝑓 0.733 = −0.265; 𝑓 0.733 ∙ 𝑓 1 < 0

Second approximation:
0.733 1 − 1(−0.265)
𝑥2 = = 0.789
1− −0.265

𝑓 0.789 = −0.053; 𝑓 0.789 ∙ 𝑓 1 < 0

Presented by: Engr. Romulo C. Cruz Jr.


EXAMPLE PROBLEM 3

Third approximation:
0.789 1 −1(−0.053)
𝑥3 = = 0.800
1− −0.053

𝑓 0.800 = −0.008; 𝑓 0.800 ∙ 𝑓 1 < 0

Fourth approximation:
0.8 1 −1(−0.008)
𝑥4 = = 0.802
1− −0.008

𝑓 0.802 = −2.58x10−4 ; 𝑓 0.802 ∙ 𝑓 1 < 0

Presented by: Engr. Romulo C. Cruz Jr.


EXAMPLE PROBLEM 3

Fifth approximation:
0.802 1 −1(−2.58x10−4 )
𝑥5 = = 0.802
1− −2.58x10−4

Therefore, 0.802 is a root

Presented by: Engr. Romulo C. Cruz Jr.


LET’S TRY THIS: PRACTICE TASK 2.1

Apply false position method to determine a root of the function


f(x) = e2x – 5

Round off the answer to three decimal places.

Presented by: Engr. Romulo C. Cruz Jr.

You might also like