Академический Документы
Профессиональный Документы
Культура Документы
2.0
U nle a shing Possibilit ie s
Submitted by:
Leader:
Custodio, Jirom Nikko Z.
Members:
Magadia, Lee France A.
Perez, John Airon A.
Vergara, John Preache B.
Submitted to:
Marife A. Rosales, MSEE
T4D – NumMeth
November 5, 2018
CI TE
2.0
U nle a shing Possibilit ie s
TABLE OF CONTENTS
I. Introduction 1
II. Objectives 3
III. Project Description 4
IV. Project Operation 5
V. Problem Statement 7
VI. Calculations 9
VII. Flowchart 24
VIII. Algorithm 30
IX. Graphical User Interface 35
X. Project Simulation 63
XI. Conclusions 68
XII. Recommendations 70
Bibliography 71
Appendices 72
CI TE
2.0
U nle a shing Possibilit ie s
LIST OF TABLES
Table No. Title Page
1 Computations Using Bisection 13
2 Computations Using False Position 15
3 Computations Using Fixed-Point 17
4 Computations Using Newton-Raphson 18
5 Computations Using Secant Method 23
CI TE
2.0
U nle a shing Possibilit ie s
LIST OF FIGURES
Figure No. Title Page
1 The Diagram of the Problem 7
2 Main Flowchart of the GUI Application 24
3 Flowchart of the Bisection Method 25
4 Flowchart of the False-Position Method 26
5 Flowchart of the Fixed Point Method 27
6 Flowchart of the Newton-Raphson Method 28
7 Flowchart of the Secant Method 29
8 Home Page 35
9 Login Window 36
10 Login Error Window 36
11 Register Window 37
12 Status Window 37
13 Main Page Window 38
14 Graph Window: Section Size 39
15 Graph Window: Full Size 40
16 Problem Window 41
17 About Window 42
18 Bisection Definition Window 43
19 False-Position Definition Window 44
20 Fixed-Point Definition Window 45
21 Newton-Raphson Definition Window 46
22 Secant Definition Window 47
23 Theory Window 48
24 Projectile Definition 49
CI TE
2.0
U nle a shing Possibilit ie s
2.0
U nle a shing Possibilit ie s
2.0
U nle a shing Possibilit ie s
LIST OF APPENDICES
Appendix Title Page
A Home Page 72
B Login 77
C Register 82
D Main Page 87
E Graph 91
F Saved Files 96
G Iterative Method 107
H Table 114
I Select a Method 117
CI TE
2.0
U nle a shing Possibilit ie s
I. INTRODUCTION
Several method of solving equations have emerged and invented throughout the
span of continuous exploration on properties of functions. Solving equations are first
introduced to us using algebraic methods – including substitution method and elimination
method, even in matrices form. Other algebraic methods that can be executed include
the quadratic formula and factorization. These methods are then categorized as Direct
Method of solving equations as they give the exact value of all the roots directly in a finite
number of steps. However, when these methods are not successful, we use the concept
of Numerical Methods.
Iterative Methods are best suited for computer programs to solve an equation. It is
based on the concept of successive approximation, which can be further subdivided as:
(a) Bracketing Method – where two initial points are determined which encloses the root
between these boundaries (i.e., Bracketing Method, False Position Method); and (b)
Open-End Method – where an initial guess point is brought closer to the root using
different properties (i.e., Newton-Raphson Method, Secant Method, Fixed-Point Iteration
Method).
1
CI TE
2.0
U nle a shing Possibilit ie s
applicable and could be utilized using a graphical user interface to interactively perform
and solve a given function intended.
2
CI TE
2.0
U nle a shing Possibilit ie s
II. OBJECTIVES
The general objective of the study is to create and design a Graphical User
Interface (GUI) that can solve a nonlinear problem and display the solution using direct
and indirect methods by combination of individual Matrix Laboratory (MATLAB) .m files.
1. To evaluate the functionality of the Graphical User Interface (GUI).
2. To construct a MATLAB file that solves a nonlinear problem using Iterative
Methods specifically the Bisection, False-Position, Fixed-Point, Newton-Raphson
and Secant Method.
3. To tabulate the results of the Iterative Methods.
4. To create a GUI that can perform registration and login of the users of the
application.
5. To enable the users to save their activities in their account.
6. To project the graphical representation of the problem.
3
CI TE
2.0
U nle a shing Possibilit ie s
4
CI TE
2.0
U nle a shing Possibilit ie s
The application starts with a home page which gives the option to the user whether to
login, exit or see the problem of concern. Once the user has chosen a button, the window
will redirect to the chosen path. The Login page is a simple searching type of program
which searches for a file in the computer with the similar username and password. First,
the program will search for a folder with the similar name as the inputted username.
Afterwards, it will open the folder and read the mat file inside it. The mat file contains the
password of the user. The program, then, will compare the inputted password to the string
contained inside the mat file. Once the passwords matches, the program will proceed to
the main menu. However, in cases where the program is not able to find the folder of the
user or the password mismatches, a toast will appear that will recommend to try again or
to register.
In the Registration Window, the program will be asking for a username, password and
Full Name of the user. It will not require any other information such as birthdate, age and
etc. since it will not be needed in the program and are irrelevant to the project. Once
satisfied, the program will create a folder in the user’s computer containing the information
safe in a mat file format. These information can be used to access the application.
The Main Page contains different buttons for different functions of the program and a
greetings that welcomes the user using his/ her full name. The specific paths that can be
accessed with this window are the Graph, the Problem, the Theory governing the
problem, the Definitions About the different iterative method, the Help, the Saved Files
and the Iteration Method Calculator.
The different calculators to solve the given problem uses iterative methods such as
the Bisection, False-Position, Fixed-Point, Newton-Raphson and Secant Method. Each
has an individual window that can display the root and the approximation error.
Furthermore, each window contains extensions such as the Graph, the Problem and the
5
CI TE
2.0
U nle a shing Possibilit ie s
Table. These extensions can help in visualizing the calculation and to get the initial
approximation.
The Graph window depicts to setups. The first setup shows a section of the graph with
a horizontal axes limited to ten divisions. Using sliders, the user can adjust which part of
the graph he/she wants to see. Meanwhile, once the Full Size button is clicked, the axes
will depict the whole size of the graph.
The Table window will show the whole iteration result done by the program.
Underneath the table, there is an option to save the data generated. A filename will be
asked from the user before clicking the save button. Once saved, there would be a mat
file created inside the account/folder of the user.
To access the saved files, the user should proceed to the main page and then click
the Saved Files button. Then, it will redirect to the Saved Window. The window will require
the user to select the iterative method of desire and then the window will show the files
saved in the user’s account. The user has to option to open or delete the file.
6
CI TE
2.0
U nle a shing Possibilit ie s
V. PROBLEM STATEMENT
Kilauea in Hawaii is the world’s most continuously active volcano. Very active
volcanoes characteristically eject red hot rocks and lava rather than smoke and ash.
Suppose a large rock is ejected from the volcano with a speed of 25.0 m/s with a range
of 71 m. Having the rock ejected at an altitude of 20.0 m, identify the angle of trajectory
in degrees.
Where:
7
CI TE
2.0
U nle a shing Possibilit ie s
g is the gravitational acceleration — usually taken to be 9.81 m/s2 (32 f/s2) near the
Earth's surface
θ is the angle at which the projectile is launched
y0 is the initial height of the projectile
Given:
v = 25 m/s
g= 9.8 m/s2
y0 = 20 m
d= 71 m
(252 ) 2(9.8)(20.0)
71 = (1 + √1 + ) 𝑠𝑖𝑛2𝜃
2(9.8) 252 𝑠𝑖𝑛2 𝜃
(252 ) 2(9.8)(20.0)
0= (1 + √1 + ) 𝑠𝑖𝑛2𝜃 − 71
2(9.8) 252 𝑠𝑖𝑛2 𝜃
Working Equation
(252 ) 2(9.8)(20.0)
𝑓(𝑥) = (1 + √1 + ) 𝑠𝑖𝑛2𝜃 − 71
2(9.8) 252 𝑠𝑖𝑛2 𝜃
8
CI TE
2.0
U nle a shing Possibilit ie s
VI. CALCULATIONS
(252 ) 2(9.8)(20.0)
71 = (1 + √1 + ) 𝑠𝑖𝑛2𝜃
2(9.8) 252 𝑠𝑖𝑛2 𝜃
(252 ) 2(9.8)(20.0)
0= (1 + √1 + ) 𝑠𝑖𝑛2𝜃 − 71
2(9.8) 252 𝑠𝑖𝑛2 𝜃
Ѳ =18.72001354
TV=18.72001354° ------ True Value
TV=55.54798168°
Xr=18.5
For XL=18
(252 ) 2(9.8)(20.0)
f(𝑋𝐿 ) = (1 + √1 + ) 𝑠𝑖𝑛2(18) − 71
2(9.8) 252 𝑠𝑖𝑛2 (18)
f(XL)=-0.6940182914
For Xr=18.5
(252 ) 2(9.8)(20.0)
f(𝑋𝑟 ) = (1 + √1 + ) 𝑠𝑖𝑛2(18.5) − 71
2(9.8) 252 𝑠𝑖𝑛2 (18.5)
f(Xr)=-0.2104932777
f(XL) f(Xr)=( -0.6940182914)( -0.2104932777)
9
CI TE
2.0
U nle a shing Possibilit ie s
f(XL) f(Xr)=0.1460861849
Ea%=------
For 2nd Iteration
f(XL) f(Xr)>0; XL= Xr
XL=18.5; Xu=19
𝑥𝑈 +𝑥𝐿
Xr= 2
Xr=18.75
For XL=18.5:
(252 ) 2(9.8)(20.0)
f(𝑋𝐿 ) = (1 + √1 + ) 𝑠𝑖𝑛2(18.5) − 71
2(9.8) 252 𝑠𝑖𝑛2 (18.5)
f(XL)=-0.2104932777
For Xr =18.75:
(252 ) 2(9.8)(20.0)
f(𝑋𝑟 ) = (1 + √1 + ) 𝑠𝑖𝑛2(18.75) − 71
2(9.8) 252 𝑠𝑖𝑛2 (18.75)
f(Xr)=0.02857924297
f(XL) f(Xr)=( -0.2104932777)(0.02857924297)
f(XL) f(Xr)=-0.006015738
For Ea%:
CA − PV
Ea% = | | 𝑥100
CA
−0.006015738 − 0.1460861849
Ea% = | | 𝑥100
−0.006015738
Ea%=1.333333333333
Same Procedures were done for 3rd to 11th iterations. Results are listed on the
table below.
10
CI TE
2.0
U nle a shing Possibilit ie s
Bisection Method
(252 ) 2(9.8)(20.0)
71 = (1 + √1 + ) 𝑠𝑖𝑛2𝜃
2(9.8) 252 𝑠𝑖𝑛2 𝜃
(252 ) 2(9.8)(20.0)
𝑓(𝑋𝐿) = (1 + √1 + ) 𝑠𝑖𝑛2(18) − 71
2(9.8) 252 𝑠𝑖𝑛2 (18)
𝑓(𝑋𝐿) = −0.6940182914
11
CI TE
2.0
U nle a shing Possibilit ie s
Xu = 19;
(252 ) 2(9.8)(20.0)
71 = (1 + √1 + ) 𝑠𝑖𝑛2𝜃
2(9.8) 252 𝑠𝑖𝑛2 𝜃
(252 ) 2(9.8)(20.0)
𝑓(𝑋𝑢) = (1 + √1 + ) 𝑠𝑖𝑛2(19) − 71
2(9.8) 252 𝑠𝑖𝑛2 (19)
𝑓(𝑋𝑢) = 0.2658093909
𝑓(𝑋𝑢)(𝑋𝐿−𝑋𝑢)
If = 𝑋𝑢 − ;
𝑓(𝑋𝐿)−𝑓(𝑋𝑢)
(0.2658093909)(18 − 19)
𝑋𝑟 = 19 −
−0.6940182914 − 0.2658093909
𝑋𝑟 = 18.72306551
𝑋𝑟 = 18.72306551;
(252 ) 2(9.8)(20.0)
71 = (1 + √1 + ) 𝑠𝑖𝑛2𝜃
2(9.8) 252 𝑠𝑖𝑛2 𝜃
(252 ) 2(9.8)(20.0)
𝑓(𝑋𝑟) = (1 + √1 + ) 𝑠𝑖𝑛2(18.72306551) − 71
2(9.8) 25 𝑠𝑖𝑛2 (18.72306551)
2
𝑓(𝑋𝑟) = 0.002909958
12
CI TE
2.0
U nle a shing Possibilit ie s
𝑓(𝑋𝐿)𝑓(𝑋𝑟) = (−0.6940182914)(0.002909958)
𝑓(𝑋𝐿)𝑓(𝑋𝑟) = −0.002019564
f(XL)f(Xr)<0 ; Xr = Xu
XL = 18;
(252 ) 2(9.8)(20.0)
71 = (1 + √1 + ) 𝑠𝑖𝑛2𝜃
2(9.8) 252 𝑠𝑖𝑛2 𝜃
(252 ) 2(9.8)(20.0)
𝑓(𝑋𝐿) = (1 + √1 + ) 𝑠𝑖𝑛2(18) − 71
2(9.8) 252 𝑠𝑖𝑛2 (18)
𝑓(𝑋𝐿) = −0.6940182914
Xu = 18.72306551;
(252 ) 2(9.8)(20.0)
71 = (1 + √1 + ) 𝑠𝑖𝑛2𝜃
2(9.8) 252 𝑠𝑖𝑛2 𝜃
13
CI TE
2.0
U nle a shing Possibilit ie s
(252 ) 2(9.8)(20.0)
𝑓(𝑋𝑢) = (1 + √1 + ) 𝑠𝑖𝑛2(18.72306551) − 71
2(9.8) 252 𝑠𝑖𝑛2 (18.72306551)
𝑓(𝑋𝑢) = 0.002909958
𝑓(𝑋𝑢)(𝑋𝐿−𝑋𝑢)
If = 𝑋𝑢 − ;
𝑓(𝑋𝐿)−𝑓(𝑋𝑢)
(0.002909958)(18 − 18.72306551)
𝑋𝑟 = 18.72306551 −
−0.6940182914 − 0.002909958
𝑋𝑟 = 18.72004642
𝑋𝑟 = 18.72004642;
(252 ) 2(9.8)(20.0)
71 = (1 + √1 + ) 𝑠𝑖𝑛2𝜃
2(9.8) 252 𝑠𝑖𝑛2 𝜃
(252 ) 2(9.8)(20.0)
𝑓(𝑋𝑟) = (1 + √1 + ) 𝑠𝑖𝑛2(18.72004642) − 71
2(9.8) 252 𝑠𝑖𝑛2 (18.72004642)
𝑓(𝑋𝑟) = 0.000031352
𝑓(𝑋𝐿)𝑓(𝑋𝑟) = (−0.6940182914)(0.000031352)
𝑓(𝑋𝐿)𝑓(𝑋𝑟) = −0.000021759
18.72004642−18.72306551
Ea(%) = 𝑥100%
18.72004642
Ea(%) = 0.016127594
f(XL)f(Xr)<0 ; Xr = Xu
14
CI TE
2.0
U nle a shing Possibilit ie s
False position
Using XL=18 and Xu=19 at 0.05% Ea
Case1:
𝑑
sin−1
(𝑣 2 ) 2(𝑔)(𝑦)
(1 + √1 + 2 2 )
2(𝑔) 𝑣 𝑠𝑖𝑛 𝜃
𝜃=
2
Solution:
71
sin−1
(252 ) 2(9.8)(20)
(1 + √1 + )
2(9.8) 252 𝑠𝑖𝑛2 𝜃
𝜃𝑖+1 =
2
At 𝜃𝟎 = 18º:
15
CI TE
2.0
U nle a shing Possibilit ie s
71
sin−1
(252 ) 2(9.8)(20)
(1 + √1 + )
2(9.8) 252 𝑠𝑖𝑛2 (18º)
𝜃𝑖+1 =
2
71
sin−1
396
31.5657 (1 + √1 + )
625𝑠𝑖𝑛2 (18º)
𝜃𝑖+1 =
2
71
sin−1
31.5657(1 + √7.6351 )
𝜃𝑖+1 =
2
71
sin−1 118.7871
𝜃𝑖+1 =
2
36.7059
𝜃𝑖+1 =
2
𝜃𝑖+1 = 18.20600228
At 𝜃𝟏 = 18.20600228
71
sin−1
(252 ) 2(9.8)(20)
(1 + √1 + )
2(9.8) 25 𝑠𝑖𝑛2 (18.20600228º)
2
𝜃𝑖+1 =
2
𝜃𝑖+1 = 18.35431983
At 𝜃𝟐 = 18.35431983
71
sin−1
(252 ) 2(9.8)(20)
(1 + √1 + )
2(9.8) 252 𝑠𝑖𝑛2 (18.20600228º)
𝜃𝑖+1 =
2
16
CI TE
2.0
U nle a shing Possibilit ie s
𝜃𝑖+1 = 18.46047982
where;
𝑓(𝑥𝑖)
xi+1=𝑥𝑖 −
𝑓′(𝑥𝑖)
17
CI TE
2.0
U nle a shing Possibilit ie s
18
CI TE
2.0
U nle a shing Possibilit ie s
(252 ) 2(9.8)(20.0)
f(𝑥𝑖 ) = (1 + √1 + ) 𝑠𝑖𝑛2(1) − 71
2(9.8) 252 𝑠𝑖𝑛2 (1)
f(xi)=-19.3749381
For xi-1=0.1
(252 ) 2(9.8)(20.0)
f(𝑥𝑖−1 ) = (1 + √1 + ) 𝑠𝑖𝑛2(1) − 71
2(9.8) 252 𝑠𝑖𝑛2 (1)
f(xi-1)=-20.3810180
For xi+1:
f(𝑥𝑖 )(𝑥𝑖−1 − 𝑥𝑖 )
f(𝑥𝑖+1 ) = 𝑥𝑖 −
f(𝑥𝑖−1 ) − f(𝑥𝑖 )
(−19.3749381)(0.1 − 1)
f(𝑥𝑖+1 ) = 1 −
−20.3810180 − (−19.3749381)
xi+1=18.33206706
For Ea%=--------------
For Et%:
Tv − Av
Et% = | | 𝑥100
Tv
18.72001354 − 18.33206706
Et% = | | 𝑥100
18.72001354
Et%=2.072363433399
For the 2nd iteration
xi+1= xi
19
CI TE
2.0
U nle a shing Possibilit ie s
For xi=18.33206706
(252 ) 2(9.8)(20.0)
f(𝑥𝑖 ) = (1 + √1 + ) 𝑠𝑖𝑛2(18.33206706) − 71
2(9.8) 252 𝑠𝑖𝑛2 (18.33206706)
f(xi)=-0.3721019498
For xi-1=1:
(252 ) 2(9.8)(20.0)
f(𝑥𝑖−1 ) = (1 + √1 + ) 𝑠𝑖𝑛2(1) − 71
2(9.8) 252 𝑠𝑖𝑛2 (1)
f(xi-1)=-19.3749381
For xi+1:
f(𝑥𝑖 )(𝑥𝑖−1 − 𝑥𝑖 )
f(𝑥𝑖+1 ) = 𝑥𝑖 −
f(𝑥𝑖−1 ) − f(𝑥𝑖 )
(−0.3721019498)(1 − 18.33206706)
f(𝑥𝑖+1 ) = 18.33206706 −
−19.3749381 − (−0.3721019498)
xi+1= 18.67145303
For Ea%:
CA − PV
Ea% = | | 𝑥100
CA
18.67145303 − 18.33206706
Ea% = | | 𝑥100
18.67145303
Ea%=1.817674151221
For Et%:
Tv − Av
Et% = | | 𝑥100
Tv
18.72001354 − 18.67145303
Et% = | | 𝑥100
18.72001354
Et%=0.259404409068
20
CI TE
2.0
U nle a shing Possibilit ie s
(252 ) 2(9.8)(20.0)
f(𝑥𝑖 ) = (1 + √1 + ) 𝑠𝑖𝑛2(18.67145303) − 71
2(9.8) 252 𝑠𝑖𝑛2 (18.67145303)
f(xi)=-0.04633768797
For xi-1=18.33206706:
(252 ) 2(9.8)(20.0)
f(𝑥𝑖−1 ) = (1 + √1 + ) 𝑠𝑖𝑛2(18.33206706) − 71
2(9.8) 25 𝑠𝑖𝑛2 (18.33206706)
2
f(xi-1)= -0.3721019498
For xi+1:
f(𝑥𝑖 )(𝑥𝑖−1 − 𝑥𝑖 )
f(𝑥𝑖+1 ) = 𝑥𝑖 −
f(𝑥𝑖−1 ) − f(𝑥𝑖 )
(−0.04633768797)(18.33206706 − 18.67145303 )
f(𝑥𝑖+1 ) = 18.67145303 −
−0.3721019498 − (−0.04633768797)
xi+1= 18.71973412
For Ea%:
CA − PV
Ea% = | | 𝑥100
CA
18.71973412 − 18.67145303
Ea% = | | 𝑥100
18.71973412
Ea%=0.257884676760
For Et%:
Tv − Av
Et% = | | 𝑥100
Tv
18.72001354 − 18.71973412
Et% = | | 𝑥100
18.72001354
21
CI TE
2.0
U nle a shing Possibilit ie s
Et%=0.001523661598
(252 ) 2(9.8)(20.0)
f(𝑥𝑖 ) = (1 + √1 + ) 𝑠𝑖𝑛2(18.71973412) − 71
2(9.8) 25 𝑠𝑖𝑛2 (18.71973412)
2
f(xi)=-0.266427534x10-3
For xi-1=18.67145303:
(252 ) 2(9.8)(20.0)
f(𝑥𝑖−1 ) = (1 + √1 + ) 𝑠𝑖𝑛2(18.67145303) − 71
2(9.8) 252 𝑠𝑖𝑛2 (18.67145303)
f(xi-1)=-0.04633768797
For xi+1:
f(𝑥𝑖 )(𝑥𝑖−1 − 𝑥𝑖 )
f(𝑥𝑖+1 ) = 𝑥𝑖 −
f(𝑥𝑖−1 ) − f(𝑥𝑖 )
(−0.266427534x10 − 3)(18.67145303 − 18.71973412 )
f(𝑥𝑖+1 ) = 18.71973412 −
−0.04633768797 − (−0.266427534x10 − 3)
xi+1= 18.72001333
For Ea%:
CA − PV
Ea% = | | 𝑥100
CA
18.72001333 − 18.71973412
Ea% = | | 𝑥100
18.72001333
Ea%=0.001522499833
For Et%:
22
CI TE
2.0
U nle a shing Possibilit ie s
Tv − Av
Et% = | | 𝑥100
Tv
18.72001354 − 18.72001333
Et% = | | 𝑥100
18.72001354
Et%=0.000001161782
Secant Method
23
CI TE
2.0
U nle a shing Possibilit ie s
VII. FLOWCHART
The following are the flowchart representation of algorithms used in the application.
24
CI TE
2.0
U nle a shing Possibilit ie s
25
CI TE
2.0
U nle a shing Possibilit ie s
26
CI TE
2.0
U nle a shing Possibilit ie s
27
CI TE
2.0
U nle a shing Possibilit ie s
28
CI TE
2.0
U nle a shing Possibilit ie s
29
CI TE
2.0
U nle a shing Possibilit ie s
VIII. ALGORITHM
The following are the algorithm used in creating the GUI application. These includes
the Iterative methods used for calculations.
30
CI TE
2.0
U nle a shing Possibilit ie s
31
CI TE
2.0
U nle a shing Possibilit ie s
False Position
1. Start
2. Let
(252 ) 2(9.8)(20.0)
𝑓(𝑥) = (1 + √1 + ) 𝑠𝑖𝑛2𝜃 − 71
2(9.8) 252 𝑠𝑖𝑛2 𝜃
32
CI TE
2.0
U nle a shing Possibilit ie s
Fixed Point
1. Start
2. Input Initial Guess and let it be xi
3. Let True Value be TV=18.72001354°
4. Let n=0
5. Let Approximation Error be Ea=(xi –xi old)/xi *100 when n is not equal to 0
6. Let True Error be Et=(TV-xi)/TV *100
7. Record n, xi, Ea and Et
8. Evaluate Ea
9. Proceed to Step 14 when Ea is less than or equal to 0.05
10. Let xi old=xi
11. Substitute xi to 𝜃 and let
71
sin−1
(252 ) 2(9.8)(20)
(1 + √1 + )
2(9.8) 252 𝑠𝑖𝑛2 𝜃
𝑥𝑖 =
2
33
CI TE
2.0
U nle a shing Possibilit ie s
392
(2𝜃) (3125√ )
625(𝑠𝑖𝑛𝜃)2 3125 20 sin(2𝜃) 𝑐𝑜𝑠(𝜃) 392
𝑓 ′ (𝑥𝑖) = 2 cos + − √ +1
98 98 ((𝑠𝑖𝑛𝜃)^3) 625(𝑠𝑖𝑛𝜃)^2
4. Let n=1
5. Substitute xi-1 and xi to f(x) and let it be f(xi-1) and f(xi) respectively
6. Let xi+1=xi-[ (f(xi)( xi-1-xi))/( f(xi-1)-f(xi))]
7. Let Approximation Error be Ea=|( xi+1 –xi)/ xi+1 |*100 when n is not equal to 1
8. Let True Error be Et=|(TV- xi-1)/TV *100|
9. Record n, xi-1, xi, xi+1, Ea and Et
10. Proceed to Step 15 when Ea is less than or equal to 0.05
11. Let xi-1=xi
12. Let xi= xi+1
13. Let n=n+1
14. Return to Step 5
15. The root is xi+1
16. End
34
CI TE
2.0
U nle a shing Possibilit ie s
35
CI TE
2.0
U nle a shing Possibilit ie s
36
CI TE
2.0
U nle a shing Possibilit ie s
37
CI TE
2.0
U nle a shing Possibilit ie s
To use the different iterative methods, the user should click the proceed button.
Meanwhile, since the application has the capability to save the user’s result, one can see
the saved results by clicking the Saved Files Button.
38
CI TE
2.0
U nle a shing Possibilit ie s
The Graph window has the capability to show the specific section of the graph.
The Horizontal section is limited to 10 divisions but can be adjusted to which part of the
graph using the sliders. The user has also the option to see the whole graph by clicking
the Full Size Button.
39
CI TE
2.0
U nle a shing Possibilit ie s
Figure 15 shows the Graph Window after clicking the Full Size Button. The
horizontal and vertical sections changes accordingly.
40
CI TE
2.0
U nle a shing Possibilit ie s
The Problem Window shows the group’s selected problem. It also contains the
diagram of the problem and the mathematical representation. True Values are also given
for reference.
41
CI TE
2.0
U nle a shing Possibilit ie s
The About Window contains the buttons of different Iterative methods that leads to
their definitions.
42
CI TE
2.0
U nle a shing Possibilit ie s
43
CI TE
2.0
U nle a shing Possibilit ie s
44
CI TE
2.0
U nle a shing Possibilit ie s
45
CI TE
2.0
U nle a shing Possibilit ie s
46
CI TE
2.0
U nle a shing Possibilit ie s
47
CI TE
2.0
U nle a shing Possibilit ie s
The Theory Window contains the Law and concept governing the problem of the
group’s choice. These concepts are specifically about Projectile Motion and Newton’s
Laws of Motion.
48
CI TE
2.0
U nle a shing Possibilit ie s
49
CI TE
2.0
U nle a shing Possibilit ie s
50
CI TE
2.0
U nle a shing Possibilit ie s
The Help Window can show the features of the application. This includes what the
application can offer to the user.
51
CI TE
2.0
U nle a shing Possibilit ie s
52
CI TE
2.0
U nle a shing Possibilit ie s
2.0
U nle a shing Possibilit ie s
The Select Window enables the user to choose an Iterative Method. Once the user
has chosen a method, he/ she will be redirected to the Iterative Method Window.
54
CI TE
2.0
U nle a shing Possibilit ie s
All Iterative Windows has the extensions below. This extensions will help the users
to visualize the results and choose valid approximations.
55
CI TE
2.0
U nle a shing Possibilit ie s
All Iterative Method Tables has the capability to show the iterations used in the
computations. Likewise, it has also the capability to save results by inputting a chosen file
name and clicking the save button,
56
CI TE
2.0
U nle a shing Possibilit ie s
57
CI TE
2.0
U nle a shing Possibilit ie s
58
CI TE
2.0
U nle a shing Possibilit ie s
2.0
U nle a shing Possibilit ie s
’
Figure 42. Secant Iterative Method Window
60
CI TE
2.0
U nle a shing Possibilit ie s
The Saved Files Window enables the users to see the files they have saved
throughout the use of the application. They also have the capability to open and delete
these files by choosing the filename and pressing the button.
61
CI TE
2.0
U nle a shing Possibilit ie s
Figure 45 shows a sample of the saved files in the users account under the method
of Bisection.
62
CI TE
2.0
U nle a shing Possibilit ie s
X. PROJECT SIMULATION
The following are the simulation of the application using the similar inputs used in the
computation to validate its functionality.
63
CI TE
2.0
U nle a shing Possibilit ie s
64
CI TE
2.0
U nle a shing Possibilit ie s
65
CI TE
2.0
U nle a shing Possibilit ie s
66
CI TE
2.0
U nle a shing Possibilit ie s
67
CI TE
2.0
U nle a shing Possibilit ie s
XI. CONCLUSIONS
Therefore, this paper concluded that numerical methods serve as a critical strand
on solving mathematical functions. Numerical methods are also effective in solving for
boundary value problems of nonlinear differential equations. In this paper, we applied five
numerical methods: Bisection Method and False Position Method for Indirect Bracketing
Methods, and Newton-Raphson Method, Secant Method and Fixed-Point Iteration
Method for the Indirect Open-End Methods of solving nonlinear equations; however, there
are several other iterative methods that are applicable in the said set of problem equations
and functions to take a closer look onto. The main results of this paper can be highlighted
into two different areas: the effectiveness of an indirect methods in solving nonlinear
equations in terms of approximation errors and number of iterations used, and its
application on a graphical user interface (GUI) for an interactive way of showing and
solving nonlinear equations.
With regards to the effectiveness of the said numerical methods, it can be
summarized that a numerical method with a higher rate of convergence may reach the
solution of a function in less iterations in comparison to another method with a slower
convergence. For example, Newton-Raphson method converges more quickly or than the
bracketing methods. The implication of this would be that given the exact same nonlinear
equation, Newton-Raphson method would arrive at the solution of F=0 in less iterations
compared to any bracketing method. In significance to this, though it is more efficient to
use these type of mehods, open-end methods are not always applicable in any kind of
equations and/or functions. Given this, these numerical methods are all efficient with
given restrictions.
The second key result from this paper, is the application of these numerical
methods in a given specific equation and utilize it using a graphical user interface (GUI)
using MATLAB as an efficient process of its implementation. Having MATLAB’s advanced
and complex learning system and the group’s sufficient coding and programming
capability, the said numerical methods are employed and are expressed in a language
68
CI TE
2.0
U nle a shing Possibilit ie s
understandable by a computer system and then interpreted back to a user using its
graphical user interface (GUI) feature.
After all the material examined in this paper, it can be concluded that numerical
methods are a key component in the area of nonlinear mathematics, and utilizing a
computer system’s user interface bids an efficient process.
69
CI TE
2.0
U nle a shing Possibilit ie s
XII. RECOMMENDATIONS
After the complete execution of the project, the proponents recommend the following
for further improvements in the project:
Having a persistent and a step-by-step plan guide earlier before working on the
project/GUI to have a smooth flow on working.
Familiarizing one’s self on the content especially with the methods on how they will
be coded and solved in MatLab.
Starting on the hard part and main content of the GUI, specifically on the codes of
each method to have an ease if it will be finished first.
Errors can’t be avoided and if it occurs, don’t hesitate to ask or approach others’
opinion even on the professor itself. PowerPoint’s and online articles can also
provide help to the proponents.
In coding, it is appropriate to run first the codes after completing or troubleshooting
it to be instantly checked if there is still problems occurring to minimize the time
that will be wasted.
In designing the GUI, it is efficient to have less and only the required GUI symbols
to result on inserting less codes. On the other hand, if the designer knows well
about MatLab and can handle such more and complicated GUI symbols or design,
it is also appropriate to apply it to the project to be more attractive and better GUI.
After completing all the requirements and finishing the GUI, run again the program
starting from the beginning or assigned front/first GUI in the project.
The GUI should be user-friendly built to be easily understand by the proponents
and the professor.
70
CI TE
2.0
U nle a shing Possibilit ie s
BIBLIOGRAPHY
Atkinson, K.E. (1978). An Introduction to Numerical Analysis. Nonlinear Systems of
Equations (pp. 88-95). Canada: John Wiley & Sons.
Burden, R.L., Faires, J.D (2005). Numerical Analysis. Numerical Solutions of Nonlinear
Systems of Equations, (pp. 597-640). Belmount: Thomson Brooks/Cole.
https://nyln.org/bisection-method-pros-and-cons-list
https://brainly.in/question/2518988
https://homepage.divms.uiowa.edu/~atkinson/ftp/ENA_Materials/Overheads/sec_3-
3.pdf
http://epoch.uwaterloo.ca/syde312/open_methods/page3.htm
https://studylib.net/doc/5711577/advantages-of-newton
71
CI TE
2.0
U nle a shing Possibilit ie s
APPENDICES
A. Home Page
72
CI TE
2.0
U nle a shing Possibilit ie s
73
CI TE
2.0
U nle a shing Possibilit ie s
74
CI TE
2.0
U nle a shing Possibilit ie s
75
CI TE
2.0
U nle a shing Possibilit ie s
76
CI TE
2.0
U nle a shing Possibilit ie s
B. Login
77
CI TE
2.0
U nle a shing Possibilit ie s
78
CI TE
2.0
U nle a shing Possibilit ie s
79
CI TE
2.0
U nle a shing Possibilit ie s
80
CI TE
2.0
U nle a shing Possibilit ie s
81
CI TE
2.0
U nle a shing Possibilit ie s
C. Register
82
CI TE
2.0
U nle a shing Possibilit ie s
83
CI TE
2.0
U nle a shing Possibilit ie s
84
CI TE
2.0
U nle a shing Possibilit ie s
85
CI TE
2.0
U nle a shing Possibilit ie s
86
CI TE
2.0
U nle a shing Possibilit ie s
D. Main Page
87
CI TE
2.0
U nle a shing Possibilit ie s
88
CI TE
2.0
U nle a shing Possibilit ie s
89
CI TE
2.0
U nle a shing Possibilit ie s
90
CI TE
2.0
U nle a shing Possibilit ie s
E. Graph
91
CI TE
2.0
U nle a shing Possibilit ie s
92
CI TE
2.0
U nle a shing Possibilit ie s
93
CI TE
2.0
U nle a shing Possibilit ie s
94
CI TE
2.0
U nle a shing Possibilit ie s
95
CI TE
2.0
U nle a shing Possibilit ie s
F. Saved Files
96
CI TE
2.0
U nle a shing Possibilit ie s
97
CI TE
2.0
U nle a shing Possibilit ie s
98
CI TE
2.0
U nle a shing Possibilit ie s
99
CI TE
2.0
U nle a shing Possibilit ie s
100
CI TE
2.0
U nle a shing Possibilit ie s
101
CI TE
2.0
U nle a shing Possibilit ie s
102
CI TE
2.0
U nle a shing Possibilit ie s
103
CI TE
2.0
U nle a shing Possibilit ie s
104
CI TE
2.0
U nle a shing Possibilit ie s
105
CI TE
2.0
U nle a shing Possibilit ie s
106
CI TE
2.0
U nle a shing Possibilit ie s
G. Iterative Method
107
CI TE
2.0
U nle a shing Possibilit ie s
108
CI TE
2.0
U nle a shing Possibilit ie s
109
CI TE
2.0
U nle a shing Possibilit ie s
110
CI TE
2.0
U nle a shing Possibilit ie s
111
CI TE
2.0
U nle a shing Possibilit ie s
112
CI TE
2.0
U nle a shing Possibilit ie s
113
CI TE
2.0
U nle a shing Possibilit ie s
H. Table
114
CI TE
2.0
U nle a shing Possibilit ie s
115
CI TE
2.0
U nle a shing Possibilit ie s
116
CI TE
2.0
U nle a shing Possibilit ie s
I. Select a Method
117
CI TE
2.0
U nle a shing Possibilit ie s
118
CI TE
2.0
U nle a shing Possibilit ie s
119