Usually in our daily life, we often encounter complex problems that require the theory of solving non-linear equations. This research aims to obtain programs for the Newton Raphson method and the Secant method in Python and to compare the efficiency of non-linear equations from the Newton and the Secant method in terms of the number of iterations, errors and program execution time. The functions that will be tested are polynomial functions, exponential functions and trigonometric functions. The research used is application type research. The program test was carried out three times by changing the coefficients and initial values. The format of a polynomial function is , exponential function ), trigonometric function . The output of this research is program code for polynomial functions, exponential functions and trigonometric functions. in one program it consists of the declaration of Newton's formula, Secant's formula, error, iteration table and execution time formula. From the six experiments carried out, results were obtained using the Newton method on polynomial functions, exponential functions and trigonometric functions, the number of iterations obtained was fewer with smaller errors and less time than the Secant method. So it was concluded that the Newton Raphson method was more efficient than the Secant method.
Copyrights © 2023