Professional Documents
Culture Documents
FINAL REPORT
MODULE :2
TITLE : Successive Approximation and Newton-Raphson
ASSISTANT
Assistant Name 1 : Hugo
Assistant NRP 1 : 5008201154
Assistant Name 2 : Edbert Gervais de Liyis
Assistant NRP 2 : 5008201168
LECTURER
Lecturer Name : Firman Kurniawansyah, S.T., M.Eng.Sc., Ph.D
NIP : 197705292003121002
The iteration will stop if (xn+1 – xn)/xn becomes smaller than the largest
error allowed (tolerance). (Altway et al, 2021)
1.3
I.2.1
II Listing Discussion
• Successive Approximation
1. Clc
This command clears the command window in MATLAB, removing
any text or output that was previously displayed. It stands for "clear
command window."
2. clear all
This command clears all the variables in the MATLAB workspace. It
removes any data that was previously stored in memory. Be cautious
when using clear all as it will remove all variables, and this action cannot
be undone.
3. close all
This command closes all open figure windows in MATLAB. If you had
any plots or graphs open, they would be closed, and the figures would
be removed from the screen.
4. X = input ('Masukkan nilai X =');
entering a value for the variable X represents the variable that we would
like to gain by input a certain value
6. E = 1;
Initialize the variable E (error) with an initial value of 1. This will be
used as the initial stopping criterion in the while loop.
7. iterasi = 0;
Initialize the iteration variable to calculate the number of iterations
required.
8. while E>Tol
Initialize the iteration variable to calculate the number of iterations
required.
9. f = ((-0.016464*X^3)+0.1252832*X^2+0.04704)/0.1558592;
calculates a value for the variable f based on the value of the variable X
which is equation that we need to be solve
10. X1 = f;
X1 is the next root approximation, which is calculated based on the
value of f.
11. E =abs((X1-X)/X);
This line, you calculate the error (E) as the absolute difference between
the value of the next root estimate X1 and the value of the previous root
estimate X, then divide it by the value of the previous root estimate next
root as a proportion of the estimate of the previous root.
14. End
This line means that the calculation is done
• Newton-Raphson
1. Clc
This command clears the command window in MATLAB, removing
any text or output that was previously displayed. It stands for "clear
command window."
2. clear all
This command clears all the variables in the MATLAB workspace. It
removes any data that was previously stored in memory. Be cautious
when using clear all as it will remove all variables, and this action cannot
be undone.
3. close all
This command closes all open figure windows in MATLAB. If you had
any plots or graphs open, they would be closed, and the figures would
be removed from the screen.
4. X = input ('Masukkan nilai X =');
entering a value for the variable X represents the variable that we would
like to gain by input a certain value
7. iterasi = 0;
Initialize the iteration variable to calculate the number of iterations
required.
8. while E>=Tol
Initialize the iteration variable to calculate the number of iterations
required.
9. f = 0.016464*X^3-0.1252832*X^2+0.1558592*X-0.04704;
calculates a value for the variable f based on the value of the variable X
which is equation that we need to be solve
10. df = 0.049392*X^2-0.2505664*X+.1558592;
It is obliged to do the derivative from the first equation.
11. X1 = X - (f/df);
Input the Rhapson method equation. The Newton-Raphson method's
central step is this one. Here, using the estimated value of X, the first
derivative of the function with respect to X (df), and the current estimate
of X, you may estimate the next root of X1. The estimated root is now
getting closer to the real root thanks to this phase.
14. X = X1;
The variable of X is equal to X1
15. End
This line means that the calculation is done
From the result above we can see that we already obtain the data needed to
answer the problem from both method, there are different in result of
iteration and error. The Newton-Raphson method and the Successive
Approximation method are two numerical techniques used to approximate
the roots or solutions of equations, but they have different approaches and
characteristics. The Newton-Raphson method is an iterative technique that
uses the derivative of the function to find better and better approximations
of the root. The Successive Approximation method is also an iterative
technique but does not rely on the derivative. It can be used for a wide range
of functions, including nonlinear and non-differentiable functions. the
choice between these two methods depends on the specific problem, the
nature of the function, and whether or not derivatives are available. The
Newton-Raphson method is a powerful tool when derivatives can be
computed, while the Successive Approximation method offers more
flexibility for a wider range of functions.
IV Conclusion
From the practicum that has been carried out, it can be conclude both
the Successive Approximation Method and the Newton-Raphson Method
are powerful numerical techniques for approximating equation solutions,
although their approaches and efficiency differ. The Successive
Approximation Method is suited for a wide range of issues due to its
comparatively simple iterative methodology. However, for all equations,
convergence is not guaranteed, and the pace of convergence can be slow,
depending on the formula chosen and the starting guess. It is very useful for
situations with complicated analytical answers, but it may take more
iterations to obtain the requisite accuracy. The Newton-Raphson Method,
on the other hand, is recognized for its quick convergence and effectiveness
in locating the roots of functions. It uses the function's derivative to direct
the iteration process. The approach quickly arrives at a solution when the
initial guess is sufficiently near the root and other requirements are satisfied.
It is commonly utilized in domains of science, engineering, and
mathematics where accuracy and speed are essential.
REFERENCE
Altway, A. et al. (2021) Komputasi Numerik Teknik Kimia. Surabaya: ITS Press.
Burden, R. L. and Faires, J. D. (1985) Numerical Analysis. 10th edn. PWS-KENT
Publishing Company.
Chapra, S. C. and Canale, R. P. (2005) Numerical Methods for Engineers. 7th edn.
McGraw-Hill Science/Engineering/Math.
APPENDIX
Successive Approximation Method Flowchart
Metode Newton-Raphson Method Flowchar
Listing Coading
clc
clear all
close all
disp('Aryasatya Wicaksono');
disp('NRP 5008211047');
disp('Successive Aproximation Method Test');
clc
clear all
close all
disp('Aryasatya Wicaksono');
disp('NRP 5008211047');
disp('Newton Rhapson Method Test');