Act 5
Act 5
Act 5
INTRODUCTION
Root-finding methods are classified into two, bracketing methods and open
methods. In this activity, we will first explore how to use root-finding under
bracketing methods by computer programming using GNU Octave.
OBJECTIVES
MATERIALS
Step 1: Choose lower xl and upper xu guesses for the root such that the
function changes sign over the interval. This can be checked by ensuring that
.
30 | P a g e
𝑥𝑙 +𝑥𝑢
Step 2: An estimate of the root is determined by: 𝑥𝑟 = 2
Step 3: Make the following evaluations to determine in which subinterval
the root lies:
a) If , the root lies in the lower subinterval.
Therefore, set and return to step 2.
b) If , the root lies in the upper subinterval.
Therefore, set and return to step 2.
c) If , the root equals ; terminate the computation.
2. The bisection method uses this theorem and computes the roots of a
function. The algorithm is as follows:
3. Create a new script by clicking the New Script Function . Type the
following commands and save the file by clicking the button. Name the
file
31 | P a g e
4. Find the positive root of the following function 𝑓(𝑥) = 𝑥 2 − 2𝑥 − 35 using:
a. Your scientific calculator. Write the result in Observation Matrix
I.2.
b. The Octave script you created earlier by clicking the button or
typing the script name in the command window. Use initial values:
Write the result in Observation Matrix I.3.
Step 1: Choose lower xl and upper xu guesses for the root such that the
function changes sign over the interval. This can be checked by ensuring that
32 | P a g e
𝑓(𝑥 )𝑥 −𝑥
Step 2: An estimate of the root is determined by: 𝑥𝑟 = 𝑥𝑢 − 𝑓(𝑥 𝑢)−𝑓(𝑥
𝑙 𝑢
)
𝑙 𝑢
Step 3: Make the following evaluations to determine in which subinterval
the root lies:
a) If , the root lies in the lower subinterval.
Therefore, set and return to step 2.
b) If , the root lies in the upper subinterval.
Therefore, set and return to step 2.
c) If , the root equals ; terminate the computation
2. False-Position Method Algorithm/Pseudocode:
3. Create a new script by clicking the New Script Function . Type the
following commands and save the file by clicking the button. Name the
file
33 | P a g e
4. Repeat procedures 4 – 6 from the Bisection Method activity and write the
required results on the observation matrix respectively.
OBSERVATION MATRIX
I. Bisection Method
1.
2.
34 | P a g e
3.
4.
35 | P a g e
5.
36 | P a g e
2.
3.
4.
5.
37 | P a g e
GUIDE QUESTIONS
What are the difference between Bisecion and False-Position in finding root
1.
of equations?
38 | P a g e