Table of Contents
Abstract
The present project will study three numerical techniques, namely Bisection, Newton–Raphson, and Secant Methods, for the solution of nonlinear equations. These three methods have become indispensable tools in computational mathematics since many nonlinear equations do not lend themselves to analytical solutions due to complexity or/and impossibility. Their convergence rate, accuracy, and computational efficiency are compared via MATLAB implementation. The Bisection method ensures convergence but with very slow performance, whereas the Newton–Raphson method converges rapidly when derivatives are known and an initial guess is close to the root. The Secant method offers a compromise of both, needing no derivative but depending on two initial guesses. The results presented demonstrate a balance between the reliability and speed of the numerical root-finding technique, which is the basis for solving problems in computer science and engineering applications, including optimization, data modeling, and simulation.
Introduction
In many real-world problems in the fields of engineering and computer science, equations arise that cannot be solved analytically. Be it the simulation of physical systems, the optimization of neural networks, or simply the modeling of dynamic processes, there are usually demands for numerical methods that approximate unknown quantities.
This project focuses on solving nonlinear equations using three classical iterative methods: Bisection, Newton-Raphson, and Secant. Each of the three methods uses a different way of converging on a root - that is, the x value where f(x) = 0.
- Bisection method is a bracketing technique based on the Intermediate Value Theorem. It repeatedly halves an interval [a, b] where f(a) and f(b) have opposite signs until a desired accuracy is reached.
- Newton–Raphson Method. This is a calculus-based technique that utilizes derivatives so that the process of convergence may be accelerated. Given an initial guess x₀, the next approximation is given by:
Solving the Problem (3 Methods)
Bisection Method
Handwritten solution for the Bisection Method
Newton-Raphson Method
Handwritten solution for the Newton-Raphson Method
Secant Method
Handwritten solution for the Secant Method
Comparison with MATLAB/Octave
All three methods were implemented and tested using Octave, a MATLAB-compatible environment. The numerical results from all methods converged to the same root x = 2.000000 for f(x) = x² − 4 = 0. The consistency between methods and the plotted curve verifies the correctness of the implementation and highlights the precision of MATLAB's numerical computation capabilities.
Figure 1. Numerical Output from Octave
Figure 2. Graph of f(x) = x² − 4
Applications in Computer Science and Engineering
The significance of numerical root-finding extends much beyond pure mathematics:
-
Machine Learning and Optimization
Practical optimization algorithms, including gradient descent, are based on principles similar to Newton–Raphson for minimizing loss functions. -
Computer Graphics and Simulation
Root-finding methods have many applications, including computing intersections when ray tracing, solving implicit curves, and approximating the equations of motion in physics engines. -
Control Systems and Signal Processing
Engineers tune system parameters, design filters, and estimate the roots of transfer functions by applying iterative numerical algorithms. -
Data Modeling and Computational Algorithms
Many algorithms, such as logistic regression, non-linear regression, polynomial fitting, require the solution of equations numerically when no closed-form solution exists. -
Software Engineering and Algorithm Design
Numerical methods are part of algorithmic analysis for performance tuning, numerical stability, and error minimization.
In all, numerical methods provide an algorithmic backbone for computational problem-solving, aiding engineers and scientists in translating mathematical models into executable computer code that can be used to predict, simulate, and optimize real-world systems.
Conclusion
This project illustrates how numerical root-finding methods bridge mathematical theory and computational practice. The Bisection method offers guaranteed convergence but at a very slow computational time. The Newton–Raphson method rapidly converges, using derivative information and a good initial guess, while the Secant method often allows for an effective middle ground, with fast results without derivatives and with sometimes sacrificed stability. Understanding these various trade-offs will prepare the Computer Science and Engineering student in choosing and implementing the right algorithm, based on problem constraints, making both accurate and efficient the computational solution at hand.
References
- Burden, R. L., & Faires, J. D. (2011). Numerical Analysis (9th ed.). Brooks/Cole.
- Chapra, S. C., & Canale, R. P. (2015). Numerical Methods for Engineers (7th ed.). McGraw-Hill Education.
- Lecture Slides: Math 221 – Chapter 2: Bisection, Fixed Point, Newton–Raphson, and Secant Methods, Prince Sultan University (2025).
- MATLAB Documentation: Root Finding – fzero Function (MathWorks, 2025).
- Alomran, Shoug. Math221_Numerical-Analysis [Source Code]. GitHub, 2025. Available at: https://github.com/Shoug-Alomran/Math221_Numerical-Analysis