ESci 118 - LabEx 3 - Lab Guide (Open Methods)
ESci 118 - LabEx 3 - Lab Guide (Open Methods)
Learning Outcomes
1. Familiarize the procedure of open methods for root-finding.
2. Apply open methods in approximating roots of equations.
3. Recognize the importance and advantages and disadvantages of
using open methods in root-finding over the classical algebraic
manipulation and the bracketing methods.
Materials
Procedure
Problem
Evaluate 𝑥 for
𝑥2 − 𝑥 = 1
ESci 118 – Numerical Solutions to Engineering Problems
𝑥2 − 𝑥 − 1 = 0
−𝑏 ± √𝑏2 − 4𝑎𝑐
𝑥=
2𝑎
Substituting values to the quadratic formula gives us the exact values of the
two real roots:
1 − √5
𝑥1 = ≅ −0.6180339887
2
1 + √5
𝑥2 = ≅ 1.618033989
2
𝑓(𝑥) = 𝑥 2 − 𝑥 − 1
To start the graphing method, we first choose an initial range to try to guess
where the root/s are located. Say we take the initial range of −2 ≤ 𝑥 ≤ 2. In
MS Excel, our first column will be for 𝑥, and the 2nd column is 𝑓 (𝑥). We start
with −2, and choose an interval, say 0.1. Thus, our next value of 𝑥 will be −1.9,
we then extend this series of numbers by selecting the two cells and then
dragging the bottom right corner of the selection box. This prompts MS Excel
to fill in the numbers according to the interval of 0.1. We then extend these
values of 𝑥 until the last number is 2.
ESci 118 – Numerical Solutions to Engineering Problems
Next, we fill in the formula for 𝑓(𝑥). In cell B2, type in the Excel formula for
𝑓(𝑥) and extend the formula for all listed values of 𝑥.
We then review the values of 𝑓(𝑥) and locate the range/s where the values
changes signs. This indicates that the graph has crossed the x-axis and
therefore indicates the root/s. In this case, we find that the two roots are
located within the ranges of −0.7 to −0.6, and 1.6 to 1.7.
𝑓(𝑥𝑖 )
𝑥𝑖+1 = 𝑥𝑖 −
𝑓′(𝑥𝑖 )
𝑓 ′ (𝑥) = 2𝑥 − 1
To apply the iteration formula in MS Excel, our column labels will be: Iteration,
𝒙, 𝒇(𝒙), and 𝒇′ (𝒙). For the first entry in the x column, we will input our initial
point that is fairly close to the desired root. Say for example, we are trying to
approach the first root that is between −0.7 and −0.6, we can use 𝑥 = −0.7 as
our initial point (at Iteration 0). For the f(x) column, we will simply code the
formula of 𝑓(𝑥) where the 𝑥 value is referred to the value in the x column at
the same iteration. And for the f’(x) column, we will code the formula for
𝑓 ′ (𝑥).
For the next value of 𝑥 (Iteration 1), we will code the iteration formula where
the 𝑥𝑖 is referred to the value in the x column in the previous iteration
(Iteration 0).
Finally, we will extend the formulas of all columns to the number of iterations
desired.
ESci 118 – Numerical Solutions to Engineering Problems
In this case, we were able to approach the value of the first root to 9 decimal
digits of accuracy after only the 3rd iteration. Perform the same method to
estimate the second root.
In secant method, we need two initial values of 𝑥 that are fairly close to the
desired root. Say for example, we desire to approach the first root, we can use
initial values of −0.8 and −0.7. This means that we need to start at iteration
“−1”. Then, we can code the formula of 𝑓(𝑥) for each.
Then, for Iteration 1, we will apply our iteration formula for secant method
which is
Finally, we will extend the formulas of all columns to the number of iterations
desired.
In this case, we were able to approach the value of the first root to 9 decimal
digits of accuracy after only the 4th iteration. Perform the same method to
estimate the second root.
Introduction
• Write your own introductory paragraph/s for this exercise.
• Learning outcomes
• Problem statement
Methods
• In your own words explain the method performed
ESci 118 – Numerical Solutions to Engineering Problems
References
• Show references (if any) in APA style.
Submission instructions:
• Save as a PDF file with file name format:
LASTNAME_Firstname_LabEx3_ESci_118.pdf (if individual)
LASTNAME1_LASTNAME2_LabEx3_ESci_118.pdf (if by pair)
• Submit to the instructor via email: [email protected]
• Deadline: 3 working days (at 5:00 PM) after conducting the lab
exercise.