Fixed-Point Iteration Method

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 8

Ramos, Romeo James B

BSEE 4-2

Laboratory Exercise #3

Fixed-Point Iteration Method

Introduction:

Fixed point iteration method is also one of the methods use for root finding. Fixed point

iteration are a open method unlike the first 2 topic that we discuss this method do not use

bracketing in order to find the root of a given function.

In this method, we first rewrite the equation (1) in the form

x = g(x), in such a way that any solution of the equation (2), which is a fixed point of g, is a

solution of

equation (1).

Objectives:

1. To become familiar with the MATLAB function by creating source codes.

2. To create a source code for Fixed-Point Iteration Method.

3. To perform Fixed-Point Iteration Method with sample equation and to find its roots using the

source code made in MATLAB application.

Materials:

1. Laptop/Desktop or Personal Computer

2. MATLAB Application thru online or offline

Procedure:
Ramos, Romeo James B
BSEE 4-2

just like the other method, creating a simple and correct code will make fixed point iteration in
MATLAB easily and fast

 I use the disp function in MATLAB to show what kind of program that is running which is
Fixed-Point Iteration Method. 
 I use the disp function again to show how to put the function clearly and there is an
example for further clarification.    
 Then, another set of instruction again for the user to input what kind of x = g(x) equation
that would be derived from the first equation.  
 Then, I assign letters and combination of letters for different values for me to create the
code for the operation easily and quickly. Those values will be from the user that’s why I
use the function input.
 Just like doing Fixed-Position Iteration Method manually, the x = g(x) equation will be
dependent on the user on how to come up with that based on the first equation. The left
and right interval will also be dependent on the user and the number of iterations and the
tolerance so the roots will be found.
Ramos, Romeo James B
BSEE 4-2

 This step will be the operations, conditions and the output part of the source code and

this is a hard part because if the code here is wrong the program would not run or it will

run but it will not give the expected result. 

 I use the function “for” for the operation part of the program to operate the number of

iterations given by the user.

 Fixed point iteration method is a simple method that you just need to derived an

equation x = g(x) from the first equation so the operation part of the source code is just

simple. The initial guess will be put into the derived function and then the output will be

the new input on the next iteration. As you are approaching the minimum percent error,

you are also approaching the real value of the roots of the equation. 

 As you can see from the operation above that the error is equals to the  (Xnew -

Xold)/(Xnew), meaning that the lesser the error, the root is also approaching near the

original roots. 

 Then, the operation will stop and finish if the percent error is less than the desired

tolerance that the user put.  


Ramos, Romeo James B
BSEE 4-2

Results and Discussion:   

In order to fully understand fixed point iteration method here’s an example.


For my example, it is equal to x2-x-1=0. From our function, we can derived three equations
(x = g(x)); x=1+1x, x=1x-1, x= x2-1.
Equation 1

Equation 2

Equation 3
Ramos, Romeo James B
BSEE 4-2

 Since, our example is a quadratic equation meaning there are two roots that we can get,

that’s also why we need to come up with many derived equations to find those roots. 

 Based on the intermediate value theorem, we can conclude that if we get the derivative

of the equation and substitute a value between our two guess intervals and the result is

less than one. We are assured that it is converging, meaning it is getting closer to the

original roots of the equation. Since, this is an open method, it can diverge as oppose to

converge, meaning as we substitute a value between our two guess intervals and the

result is greater than one.

 As you can see from the different equations above, we can only get the equations 1 and

2 since it is converging while equation 3 is diverging. Whatever value we substitute on

the equation 3, it will just diverge on the roots of the equation.  

 Then for the number of iterations I choose to put 5 so it will give me 5 values of roots

that are approaching near the number of my tolerance which is 0.001. 

 Percent error is computed as the absolute value of (Xnew – Xold)/(Xnew), meaning as I

set the value of tolerance to a lower value, the value of the roots will be closer and closer

to the original value of the roots.


Ramos, Romeo James B
BSEE 4-2

Here is the finding of root using fixed point iterations, just like we get when using matlab,
we can see here that one of the solution that we get are diverging while the other 2 are
converging. Diverging means no matter how many iteration where made it will be repeated
again and again with the same results.
Conclusion:
MATLAB is a very powerful and useful platform in which you can create a source code
for different types of operation. Creating source code for the fixed-point iteration approach will
provide you with a better understanding of how it works in practice. It's similar to making an
application that allows a user to quickly and simply locate the roots. We only need to check if
our answer is converging or diverging on the original roots of the problem because this is an
open technique. We may determine the derivative of the equation and then check if it is
converging or diverging using this fixed-point iteration method by replacing a value between two
guess intervals and checking if it is less than one; if it is, it is converging; if not, it is diverging.
Ramos, Romeo James B
BSEE 4-2

DCEE 25 – NUMERICAL METHODS AND ANALYSIS


First Semester A.Y. 2021-2022

Name: _Ramos, Romeo James B._      Student No.: _201812245_


Course / Yr. / Sec.: __BSEE 4-2__ Date: 10/08/2021

RUBRICS for LABORATORY REPORT

Laboratory Title: ________ Fixed-Point Iteration Method __________

CRITERIA Excellent Good Needs Improvement Un-acceptable Score


Submits the
Submits the
Laboratory Report Submits the
Submits the Laboratory
after the whole Laboratory Report
Punctuality Laboratory Report Report a week
class submits their after the day of the
(30 pts) exactly on the after the time of
report but within class but not more
right time. (30) the class and
the day of the than 4 days. (19-11)
onwards. (10)
class. (29-20)
Most of the
Some of the The explanation
The explanation explanation given
Interpretation explanation given was given was not
given was related was related to the
of the Results related to the topic of related to the
to the topic of the topic of the
(30) the experiment.  topic of the
experiment. (30) experiment. (29-
(19-16) experiment. (15)
20)
The data obtained The data obtained in
The data obtained in the experiment the experiment was The data
in the experiment was arranged on a arranged as a list with obtained in the
Presentation
is presented in a table but when no distinct experiment is no
of Data Obtain
way that it is close graph, it cannot be arrangement and way close to the
(20)
to the topic of the interpreted close when graph, it cannot topic of the
experiment. (20) to the topic. (19- be interpreted close to experiment. (15)
18) the topic. (17-16)

The report had plenty


Presentation The report had The report format
The report format of erasures, staple
of the Report erasures but the does not meet all
has met all the wires were not
Laboratory order was intact. the requirement.
requirement. (10) covered but the order
Format (10) (9-8) (5)
was intact. (7-6)
The report utilized The report mostly The report did
proper utilized not utilized
The report utilized
engineering tools engineering tools engineering tools
Engineering some engineering
such as such as such as
Drawing Tools tools such as
Engineering Engineering Engineering
(10) Engineering Lettering,
Lettering, Lettering, Lettering,
templates, etc. (7-6)
templates, etc. templates, etc. (9- templates, etc.
(10) 8) (5)

Final Score:
Ramos, Romeo James B
BSEE 4-2

You might also like