Ece 427L - Activity 1
Ece 427L - Activity 1
ECE 427L
ACTIVITY NO. 1
ITERATIVE METHODS FOR
SOLVING ROOTS OF FUNCTIONS II
Submitted by:
CALAUNAN, Joeben A.
MACARAEG, Sophia Marie B.
Submitted to:
Engr. Michael A. Cagaoan
Instructor
DATE SUBMITTED:
February 1, 2020
Saint Louis University
SCHOOL OF ENGINEERING AND ARCHITECTURE
LABORATORY MANUAL
ACTIVITY NO. 1
ITERATIVE METHODS FOR SOLVING ROOTS OF FUNCTIONS I
ACTIVITY OBJECTIVE:
At the end of this experiment, the student should be able to develop programs for
determining the roots of functions using Bisection Method (Half-Interval Method) and Method
of False Position (Regula-Falsi Method)
EQUIPMENT NEEDED:
PC with Scilab
LABORATORY ACTIVITIES:
Problem:
0.5x
Given the function f(x)=e -x-4, determine the root xr in the interval -10≤x≤10 using Bisection
Method (Half-Interval Method).
(a) Write a Scilab program to implement the Bisection algorithm.
(b) Tabulate the first 5 iterations (tabulate values accurate to 6 decimal places)
(c) The minimum number of iterations, n, to determine a root such that |f(xr)|<10-12.
(d) The root, xr (accurate to 6 decimal places), that satisfies |f(xr)|<10-12.
LABORATORY MANUAL
Results:
Iteration xl xu xr
1 -10 10 0
2 -10 0 -5
3 -5 0 -2.5
4 -5 -2.5 -3.75
5 -5 -3.75 -4.375
f(xL) {xL-xU}
xr = xL - ---------------------
f(xL) - f(xU)
3. Test if the trial value of the root is acceptable.
The trial value of the root is acceptable if |f(xr)|<10-12.
4. While the trial value of the root is not acceptable, do the following:
4.a. Reduce the interval.
If f(xl)f(xr)<0 then xu=xr else xl=xr.
4.b. Compute a new trial value of the root as xn=0.5(xl+xu).
LABORATORY MANUAL
Problem:
Given the function f(x)=e0.5x-x-4, determine the root xr in the interval -5≤x≤0 using Method of
False Position (Regula-Falsi Method).
(a) Write a Scilab program to implement the Method of False Position algorithm.
(b) Tabulate the first 5 iterations (tabulate values accurate to 6 decimal places)
(c) The minimum number of iterations, n, to determine a root such that |f(xr)|<10-12.
(d) The root, xr (accurate to 6 decimal places), that satisfies |f(xr)|<10-12.
Results:
Iteration xl xu xr
1 -5 10 -3.674593
2 -5 -0.003174851 -3.851024
3 -5 -0.000058434 -3.854385
4 -5 -0.000001075 -3.854447
5 -5 -0.000000020 -3.854448
OBSERVATIONS:
LABORATORY MANUAL
In this activity, we have performed the Bisection Method also known Half-Interval Method with a
given function of f(x)= e0.5x-x-4 and for an interval of -10≤x≤10, it resulted to 44 iterations and a root of
-3.854448335. Also, we have performed Regula-Falsi Method for an interval of -5≤x≤0 and it resulted to
8 iterations and arrives at the same root with the Bisection Method.
CONCLUSIONS:
The Bisection Method and the Regula-Falsi Method is a root-finding method with different
algorithms. For the bisection method it consists of repeatedly bisecting the interval, manually doing this
results to a relatively slow and robust process.
The Regula-Falsi Method used a ‘false-position’ that is the x-position where a line connecting the
two boundary points crosses the axis. This is more faster method than the previous method.