AI-Enhanced Performance Evaluation of Python, MATLAB, and Scilab for Solving Nonlinear Systems of Equations: A Comparative Study Using the Broyden Method

Abstract

This research extensively evaluates three leading mathematical software packages: Python, MATLAB, and Scilab, in the context of solving nonlinear systems of equations with five unknown variables. The study’s core objectives include comparing software performance using standardized benchmarks, employing key performance metrics for quantitative assessment, and examining the influence of varying hardware specifications on software efficiency across HP ProBook, HP EliteBook, Dell Inspiron, and Dell Latitude laptops. Results from this investigation reveal insights into the capabilities of these software tools in diverse computing environments. On the HP ProBook, Python consistently outperforms MATLAB in terms of computational time. Python also exhibits a lower robustness index for problems 3 and 5 but matches or surpasses MATLAB for problem 1, for some initial guess values. In contrast, on the HP EliteBook, MATLAB consistently exhibits shorter computational times than Python across all benchmark problems. However, Python maintains a lower robustness index for most problems, except for problem 3, where MATLAB performs better. A notable challenge is Python’s failure to converge for problem 4 with certain initial guess values, while MATLAB succeeds in producing results. Analysis on the Dell Inspiron reveals a split in strengths. Python demonstrates superior computational efficiency for some problems, while MATLAB excels in handling others. This pattern extends to the robustness index, with Python showing lower values for some problems, and MATLAB achieving the lowest indices for other problems. In conclusion, this research offers valuable insights into the comparative performance of Python, MATLAB, and Scilab in solving nonlinear systems of equations. It underscores the importance of considering both software and hardware specifications in real-world applications. The choice between Python and MATLAB can yield distinct advantages depending on the specific problem and computational environment, providing guidance for researchers and practitioners in selecting tools for their unique challenges.

Share and Cite:

Azure, I. , Wiredu, J. , Musah, A. and Akolgo, E. (2023) AI-Enhanced Performance Evaluation of Python, MATLAB, and Scilab for Solving Nonlinear Systems of Equations: A Comparative Study Using the Broyden Method. American Journal of Computational Mathematics, 13, 644-677. doi: 10.4236/ajcm.2023.134036.

1. Introduction

In the realm of computational mathematics and scientific computing, the choice of software can profoundly impact the efficiency and accuracy of numerical solutions. This research represents a significant follow-up to the pioneering work of Isaac Azure, aimed at delving deeper into the performance attributes of three prominent mathematical software packages: Python, MATLAB, and Scilab. These software tools serve as cornerstones in the arsenal of mathematicians, engineers, and scientists, enabling them to tackle complex mathematical problems and simulations with relative ease [1] [2] [3] [4] .

The core objective of this study was to conduct a comprehensive assessment of these software packages’ capabilities when confronted with the formidable challenge of solving nonlinear systems of equations, each comprising five unknown variables. This is a critical endeavor, as nonlinear systems frequently arise in a myriad of scientific and engineering disciplines, necessitating efficient and reliable numerical techniques for their resolution [5] [6] [7] [8] .

A general mathematical representation of a system of nonlinear equations involving “n” variables can be expressed as follows:

Let “x” represent the vector of variables: x = ( x 1 , x 2 , , x n ) .

The system of nonlinear equations can then be written as:

f 1 ( x ) = 0 f 2 ( x ) = 0 f m ( x ) = 0 (1)

Here, “m” represents the number of equations in the system, and each f i ( x ) is a nonlinear function of the variables x 1 , x 2 , , x n that must equal zero. In a more compact vector form, the system can be represented as:

F ( x ) = [ f 1 ( x ) f 2 ( x ) f m ( x ) ] = [ 0 0 0 ] (2)

The objective of solving such a system is to find a vector “x” that simultaneously satisfies all “m” equations F ( x ) = 0 . This often involves iterative numerical methods, as analytical solutions are typically not available for arbitrary nonlinear systems [9] [10] [11] [12] .

1.1. The Broyden Method

To navigate this intricate terrain, the Broyden method, a widely recognized numerical approach, was chosen as the numerical workhorse for our investigations. The specific focus on nonlinear systems and the utilization of a consistent numerical method provides a controlled and rigorous framework for the comparative analysis of Python, MATLAB, and Scilab [13] .

The Broyden method, also known as the Broyden–Fletcher–Goldfarb–Shanno (BFGS) update method, is an iterative numerical technique used to solve systems of nonlinear equations. It is named after its developers, Charles W. Broyden and Roger Fletcher, and it is an extension of the more well-known Broyden method for solving nonlinear systems. The BFGS variant is primarily used for solving unconstrained nonlinear optimization problems, while the original Broyden method is designed for solving systems of nonlinear equations [14] .

The Broyden method was developed as an alternative to traditional Newton’s method for solving nonlinear equations. Newton’s method involves iteratively linearizing a nonlinear system of equations and solving the linearized system at each iteration. However, Newton’s method can be computationally expensive, especially when dealing with large systems, because it requires the computation of the Jacobian matrix (a matrix of partial derivatives) at each iteration [15] [16] .

The Broyden method aims to overcome this computational burden by approximating the Jacobian matrix with each iteration, rather than recomputing it from scratch. It does so by updating an initial approximation of the Jacobian matrix using information from previous iterations. This update makes the method more efficient and less computationally demanding than Newton’s method [17] .

The Broyden method is adopted as the numerical technique for solving the nonlinear systems in each software package, providing a consistent approach for performance assessment. According to Charles Broyden, (1965), two methods can be used to find the approximate solution for nonlinear systems of equations as reported in [18] .

The first method gives an approximate matrix for B k using the following assumption;

B k must satisfy the secant equation

B k s ( k ) = y ( k ) (3)

where

s ( k ) = x ( k ) x ( k 1 ) (4)

and

y ( k ) = F ( x ( k ) ) F ( x ( k 1 ) ) (5)

However, Broyden’s method involves the computation of B k 1 and not B k , this brings our attention to the next theorem.

THEOREM: (Sherman-Morrison Formula) If B is a nonsingular matrix and x and y are vectors, then B + x y t is nonsingular provided that y t A 1 x 1 and

( B + x y t ) 1 = B 1 B 1 x y t B 1 1 + y t B 1 x (6)

The theorem above is a matrix inverse formula. It allows B k 1 to be computed directly using B k 1 1 , rather than computing B k and then its inverse at each iteration. Hence, using the theorem and setting B = B k + 1 , x = y i B k 1 s k s k 2 2 , and y = s k , as well as using B k as defined above we have that

B k 1 = ( B k 1 + y k B k 1 s k s k 2 2 s k t ) 1 (7)

B k 1 = B k 1 1 B k 1 1 ( B k 1 + y k B k 1 s k s k 2 2 s k t ) B k 1 1 1 + s k t B k 1 1 ( y k B k 1 s k s k 2 2 ) (8)

B k 1 = B k 1 1 ( B k 1 1 y k s i ) s k t B k 1 1 s k 2 2 + s k t B k 1 1 y k s k 2 2 (9)

Hence, we get

B k 1 = B k 1 1 + ( s k B k 1 1 y k ) s k t B k 1 1 s k t B k 1 1 y k (10)

From the assumption above, Broyden’s method is defined as

x ( k + 1 ) = x ( k ) B k 1 F ( x ( k ) ) (11)

where B k 1 is computed using Equation (10).

1.2. Related Works

Nonlinear equations, unlike their linear counterparts, feature at least one nonlinear term, making them considerably more challenging to solve. In tackling these intricate equations, numerical methods come to the rescue, often relying on an initial guess [19] .

In a closely related study, five numerical techniques for resolving nonlinear equations were investigated after obtaining their solutions manually. The Bisection method, Newton-Raphson method, Regula Falsi method, Secant method, and Fixed-Point Iteration method were all subject to comparison. Researchers developed manual computational algorithms for each approach and employed them to manually find a root using a TI-Inspire calculator. All methods eventually converged to an exact solution. However, the Bisection method reached convergence by the 14th iteration, the Fixed-Point Iterative Method by the 7th iteration, the Secant method by the 5th iteration, and both the Regula Falsi and Newton Raphson methods by the 2nd iteration [20] .

In another pertinent study, the challenge of finding roots for nonlinear equations, arising frequently in practical applications across science and engineering, was extensively explored. The process of locating a root is referred to as root-finding, with the value of “x” that satisfies f ( x ) = 0 termed a root of f ( x ) = 0 . This research meticulously compared the convergence rates of two prevalent root-finding methods: Bisection and Newton-Raphson. MATLAB software was harnessed to locate the root of a specific function and juxtapose the outcomes of these two methods. The study’s conclusion favored Newton’s approach, which outperformed the Bisection method [20] .

Throughout these aforementioned studies, MATLAB software took center stage in estimating the roots of nonlinear equations. In a related comparative analysis, Python emerged as the frontrunner due to its remarkable efficiency and precision. Python achieved fitting approximations with the fewest iterations and minimal computational time. Notably, the research underscored the Newton-Raphson method’s robustness, as it consistently converged efficiently with minimal iteration counts across various benchmark problems. This underscored the method’s superiority in terms of efficiency and reliability, especially when dealing with complex nonlinear equations [21] .

This research is a continuation of the work aimed at identifying which mathematical software package performs better numerical analysis. It however, set out to discern the disparities among three mathematical software packages: Python, Scilab, and MATLAB, particularly in the context of solving a system of nonlinear equations using the Broyden method on different computer environments [3] .

2. Objectives of the Study

The objectives of this study are:

1) To assess and compare the performance of Python, MATLAB, and Scilab in solving nonlinear systems of equations with five unknown variables.

2) To utilize a set of five standardized benchmark problems, featuring nonlinear equations, to provide a consistent platform for comparative analysis.

3) To employ key performance metrics, including computational time, convergence iterations, and robustness index, to quantitatively evaluate software performance.

4) To investigate the influence of varying computer hardware specifications on software performance, emphasizing the importance of hardware considerations in software selection and real-world applications.

3. Methodology

The methodology employed in this research builds upon the seminal work of Isaac Azure, aiming to rigorously assess the performance of three prominent mathematical software packages: Python, MATLAB, and Scilab. The research seeks to comprehensively investigate their capabilities in solving nonlinear systems of equations featuring five unknown variables. Key metrics, including computational time, the number of iterations for convergence, and the robustness index, are utilized to differentiate the software packages. Furthermore, the study explores the influence of varying computer hardware specifications on computational performance and solution robustness, ultimately providing valuable insights for software selection and real-world applications.

3.1. Benchmark Problems Selection

Five benchmark problems comprising of a system of nonlinear equations with five unknowns were chosen to serve as test cases, ensuring standardized evaluation across the software packages.

Problem 1

e x 1 + sin ( x 2 ) x 3 2 + cos ( x 4 ) x 5 = 2

x 1 + ln ( x 2 ) + x 3 + tan ( x 4 ) x 5 2 = 1

x 1 2 e x 2 + x 3 + sin ( x 4 ) + cos ( x 5 ) = 3 (12)

cos ( x 1 ) x 2 + x 3 3 + ln ( x 4 ) + tan ( x 5 ) = 0

tan ( x 1 ) x 2 + sin ( x 3 ) cos ( x 4 ) + e x 5 = 1

Problem 2

ln ( x 1 ) + sin ( x 2 ) x 3 2 + cos ( x 4 ) x 5 = 1.5

x 1 2 + ln ( x 2 ) + x 3 + tan ( x 4 ) x 5 2 = 2

e x 1 e x 2 + x 3 + sin ( x 4 ) + cos ( x 5 ) = 3 (13)

cos ( x 1 ) x 2 + x 3 2 + ln ( x 4 ) + tan ( x 5 ) = 0

tan ( x 1 ) x 2 + sin ( x 3 ) cos ( x 4 ) + e x 5 = 1

Problem 3

e x 1 + sin ( x 2 ) x 3 2 + cos ( x 4 ) x 5 = 2

x 1 + x 2 2 + x 3 + tan ( x 4 ) ln ( x 5 ) = 1

x 1 2 e x 2 + x 3 + sin ( x 4 ) + cos ( x 5 ) = 3 (14)

cos ( x 1 ) x 2 + x 3 2 + ln ( x 4 ) + tan ( x 5 ) = 0

tan ( x 1 ) x 2 + sin ( x 3 ) cos ( x 4 ) + e x 5 = 1

Problem 4

ln ( x 1 ) + sin ( x 2 ) x 3 2 + cos ( x 4 ) x 5 = 1.5

x 1 2 + ln ( x 2 ) + x 3 + tan ( x 4 ) x 5 2 = 2

e x 1 e x 2 + x 3 + sin ( x 4 ) + cos ( x 5 ) = 3 (15)

cos ( x 1 ) x 2 + x 3 2 + ln ( x 4 ) + tan ( x 5 ) = 0

tan ( x 1 ) x 2 + sin ( x 3 ) cos ( x 4 ) + e x 5 = 1

Problem 5

e x 1 + sin ( x 2 ) x 3 2 + cos ( x 4 ) x 5 = 2

x 1 + x 2 2 + x 3 + tan ( x 4 ) ln ( x 5 ) = 1

x 1 2 e x 2 + x 3 + sin ( x 4 ) + cos ( x 5 ) = 3 (16)

cos ( x 1 ) x 2 + x 3 2 + ln ( x 4 ) + tan ( x 5 ) = 0

tan ( x 1 ) x 2 + sin ( x 3 ) cos ( x 4 ) + e x 5 = 1

The following initial guess values (Table 1) were used for the estimation of the root of the benchmark problems with the help of the Broyden method.

3.2. Numerical Methodology

Below is the Broyden’s method algorithm:

STEP 1: Let x ( 0 ) = ( x 1 ( 0 ) , x 2 ( 0 ) , , x n ( 0 ) ) be the initial vector given.

STEP 2: Calculate F ( x ( 0 ) ) .

STEP 3: In this step we compute B 0 1 . Because we do not have enough information to compute B 0 directly, Broyden’s method permits us to let B 0 = J ( x ( 0 ) ) , which implies that B 0 1 = J ( x ( 0 ) ) 1 .

Table 1. Selected initial guess values for benchmark problems.

STEP 4: Calculate x ( 1 ) = x ( 0 ) B 0 1 F ( x ( 0 ) ) .

STEP 5: Calculate F ( x ( 1 ) ) .

STEP 6: Take F ( x ( 0 ) ) and F ( x ( 1 ) ) and calculate y 1 = F ( x ( 1 ) ) F ( x ( 0 ) ) . Next, take the first two iterations of x ( k ) and calculate s 1 = x ( 1 ) x ( 0 ) .

STEP 7: Calculate s k t B k 1 1 y k .

STEP 8: Compute B 1 1 = B 0 1 + 1 s 1 t B 0 1 y 1 [ ( s 1 B 0 1 y 1 ) s 1 t B 0 1 ] .

STEP 9: Take B 1 1 that we found in step 8, and calculate x ( 2 ) = x ( 1 ) B 1 1 F ( x ( 1 ) ) .

STEP 10: Repeat the process until it converges at x ¯ , i.e. when x ( k ) = x ( k + 1 ) = x ¯ . This will indicate that we have solved of the system.

Broyden’s method as well as all of the Quasi-Newton methods converge superlinear, which means that

lim k x ( k + 1 ) p x ( k ) p = 0 (17)

where p is the solution to F ( x ) = 0 , and x ( k ) and x ( k + 1 ) are successive approximations to p.

3.3. Performance Metrics

A triad of pivotal performance metrics guided our exploration: computational time, the number of iterations needed for convergence, and the robustness index. These metrics collectively encapsulate the essence of software performance in numerical problem-solving. Computational time offers insights into the efficiency and speed of each software package, iterations unveil the underlying numerical convergence properties, and the robustness index serves as a gauge of solution reliability and stability.

The robustness index is a quantitative measure of how well a given solution satisfies a system of nonlinear equations. The algorithm for the calculation of the robustness index for the system of nonlinear equations:

STEP 1: Define the system of nonlinear equations: Begin with a set of nonlinear equations, typically represented as F ( x ) = 0 , where F is a vector-valued function of x, and x is the vector of the unknowns you want to solve.

STEP 2: Find a solution: Use a numerical solver or method (Broyden method) to find a solution x * that approximately satisfies the system of equations, i.e., F ( x * ) 0 .

STEP 3: Calculate the Residual Vector: The residual vector, denoted as R, is defined as the vector of the differences between the left-hand side (LHS) and the right-hand side (RHS) of the equations for the solution x * . Mathematically, it can be expressed as:

R ( x * ) = F ( x * ) .

where:

R ( x * ) is the residual vector.

F ( x * ) is the vector of equations evaluated at the solution x * .

STEP 4: Calculate the Norm (Magnitude) of the Residual Vector: The 2-norm (Euclidean norm) of the residual vector is computed to measure how far the solution is from satisfying the equations. The 2-norm of a vector υ is calculated as:

υ 2 = i = 1 n | υ i | 2

where:

υ 2 is the 2-norm of the vector υ.

υ i represents the i-th component of vector υ.

n is the dimension of the vector.

In our case, υ is the residual vector R ( x * ) .

STEP 5: Display the robustness index: The robustness index is simply the value of the 2-norm of the residual vector R ( x * ) . It quantifies how well the solution x * satisfies the equations. A smaller robustness index indicates a solution that is closer to satisfying the equations. In summary, the robustness index is calculated by finding a solution to the system of nonlinear equations, calculating the residual vector that measures how well the solution satisfies the equations, and then computing the 2-norm (Euclidean norm) of the residual vector to quantify the solution’s robustness or closeness to satisfying the equations.

3.4. Experimental Setup

The study involved multiple facets of experimentation, ranging from software configuration to hardware variation. In the case of the software configuration, the 2023 versions of the Python, MATLAB, and Scilab packages were employed for the study. Codes were developed for each benchmark problem using the Broyden method and ensuring that each code looked out for the root of the problems, computational time, number of iterations, and the robustness index.

The second part of the experimental setup considered the hardware variation. Here, four laptops with different specifications were used simultaneously to run the codes (Python, MATLAB, Scilab) developed to solve the benchmark problems. The table below (Table 2) shows the specifications of the laptop computers used for this study:

Table 2. Specifications of Laptop devices.

4. Results and Discussion

Pursuant to the fourth objective of this investigation, we subjected the codes crafted for the three mathematical software packages to rigorous testing on a spectrum of four distinct laptop computers, each characterized by unique specifications, as detailed in Table 2. The overarching aim was to evaluate the performance of Python, MATLAB, and Scilab in root-finding for five designated benchmark problems. This evaluation encompassed the computation time, iteration count, and robustness index, all adjudicated through the lens of the Broyden method. Notably, these software packages were examined across an eclectic array of computing environments, namely the HP Probook, HP Elitebook, Dell Inspiron, and Dell Latitude laptops.

It is worth highlighting that within this triad of mathematical tools, Scilab faced convergence challenges for all five benchmark problems across the four computers employed in this study. Consequently, our dataset predominantly relies on the outcomes produced by MATLAB and Python software. Each table below is accompanied by a graphical representation, facilitating a comprehensive juxtaposition of computational times and robustness indices for Python and MATLAB across diverse computing environments.

Using the initial guess values in Table 1 above, the solutions of the bench-mark problems using the HP Probook laptop is shown in Table 3 below are graphs showing each problem was solved using the software.

Table 3. Results of HP Probook Laptop.

The collected data from running the codes on an HP Probook laptop reveals noteworthy insights. Python consistently exhibited significantly shorter computational times across all five benchmark problems when compared to MATLAB and this can be seen in Figures 1(a)-5(a). Specifically, Python’s computational time ranged from 0.0017950 seconds as the lowest to 0.00465234 seconds as the highest, whereas MATLAB’s computational time spanned from 0.0448 seconds (minimum) to 0.2690 seconds (maximum).

Regarding the robustness index, Python outperformed MATLAB by achieving a lower index in problems 3 and 5. Notably, for problem 1, Python achieved an identical index as MATLAB for initial guess values 1 and 2. However, Python surpassed MATLAB for initial guess 3, while MATLAB exhibited better performance for initial guess values 4 (Figures 1(b)-5(b)).

(a)(b)

Figure 1. (a) CT against IG for Problem 1; (b) RI against IG for Problem 1.

(a)(b)

Figure 2. (a) CT against IG for Problem 2; (b) RI against IG for Problem 2.

(a)(b)

Figure 3. (a) CT against IG for Problem 3; (b) RI against IG for Problem 3.

(a)(b)

Figure 4. (a) CT against IG for Problem 4; (b) RI against IG for Problem 4.

(a)(b)

Figure 5. (a) CT against IG for Problem 5; (b) RI against IG for Problem 5.

Table 4 is a summary of results obtained from HP Elitebook Laptop.

When examining the data collected on the HP Elitebook laptopas shown in Table 4, intriguing disparities emerged, presenting a stark contrast to the findings on the Probook HP device. Unlike the Probook HP laptop, MATLAB consistently exhibited notably shorter computational times than Python for all four benchmark problems investigated in this study, resulting in significant differences between the two software platforms.

Table 4. Results of HP Elitebook Laptop.

The analysis of the robustness index data revealed a consistent pattern. Employing the Broyden method, MATLAB consistently yielded a lower robustness index than Python for all benchmark problems, except for problem 5. However, the data obtained from the HP Elitebook laptop unveiled a distinct challenge; Python failed to converge for problem 4 (Figure 9(a)) with initial guess values 2, while MATLAB successfully delivered results for the same problem with those initial guess values. In general, MATLAB consistently solved all five bench-mark problems with lower computational time as shown in the figures above (Figures 6(a)-10(a)). In a similar way, MATLAB recorded the least robustness index as compared with Python (Figures 6(b)-10(b)).

A summary of results obtained from Dell Inspiron Laptop is displayed in Table 5.

Analyzing the data acquired from the Dell Inspiron laptop as shown in Table 5, intriguing patterns emerged in terms of computational efficiency and robustness. Python outshone MATLAB in terms of computational time, delivering quicker solutions for problems 2, 3, and 4 (Figures 12(a)-14(a)). In contrast, MATLAB displayed its computational prowess by surpassing Python in tackling problems 2 and 5 (Figure 11(a) and Figure 15(a)).

The story was similar when it came to the robustness index. Python demonstrated a significantly smaller robustness index for problems 1, 3, and 5, proving

(a)(b)

Figure 6. (a) CT against IG for Problem 1; (b) RI against IG for Problem 1.

(a)(b)

Figure 7. (a) CT against IG for Problem 2; (b) RI against IG for Problem 2.

(a)(b)

Figure 8. (a) CT against IG for Problem 3; (b) RI against IG for Problem 3.

(a)(b)

Figure 9. (a) CT against IG for Problem 4; (b) RI against IG for Problem 4.

(a)(b)

Figure 10. (a) CT against IG for Problem 5; (b) RI against IG for Problem 5.

Table 5. Results of Dell Inspiron Laptop.

its efficiency. Conversely, MATLAB excelled by achieving the lowest robustness index for problems 2 and 5, showcasing its capability to handle these particular challenges effectively (Figures 11(b)-15(b)).

Table 6 shows the results from the Dell Latitude Laptop.

(a)(b)

Figure 11. (a) CT against IG for Problem 1; (b) RI against IG for Problem 1.

(a)(b)

Figure 12. (a) CT against IG for Problem 2; (b) RI against IG for Problem 2.

(a)(b)

Figure 13. (a) CT against IG for Problem 3; (b) RI against IG for Problem 3.

(a)(b)

Figure 14. (a) CT against IG for Problem 4; (b) RI against IG for Problem 4.

(a)(b)

Figure 15. (a) CT against IG for Problem 5; (b) RI against IG for Problem 5.

Table 6. Results of Dell Latitude Laptop.

Upon meticulous examination of the data garnered from the Dell Latitude laptop as shown in Table 6, an array of captivating trends about computational efficiency and robustness came to light. Python took the lead in computational time, offering expeditious solutions for problems 2, 3, and 4 as shown in Figures 16(a)-18(a). In contrast, MATLAB flexed its computational muscle, outperforming Python when it came to addressing problems 1 and 5 (Figure 19(b) and Figure 20(b)).

(a)(b)

Figure 16. (a) CT against IG for Problem 2; (b) RI against IG for Problem 2.

(a)(b)

Figure 17. (a) CT against IG for Problem 3; (b) RI against IG for Problem 3.

(a)(b)

Figure 18. (a) CT against IG for Problem 4; (b) RI against IG for Problem 4.

(a)(b)

Figure 19. (a) CT against IG for Problem 1; (b) RI against IG for Problem 1.

(a)(b)

Figure 20. (a) CT against IG for Problem 5; (b) RI against IG for Problem 5.

A similar narrative unfolded regarding the robustness index. Python exhibited a notably lower robustness index for problems 1 and 5 as in Figure 19(a) and Figure 20(a), demonstrating its efficiency. Conversely, MATLAB shone by securing the lowest robustness index for problems 2, 3, and 4 (Figures 16(b)-18(b)), underscoring its adeptness in handling these specific challenges with finesse.

5. Conclusion and Recommendations

This study embarked on a comprehensive evaluation of three prominent mathematical software packages, namely Python, MATLAB, and Scilab, in their quest to solve nonlinear systems of equations with five unknown variables. Four primary objectives guided our research, which included comparing software performance using standardized benchmark problems, utilizing key performance metrics for quantitative evaluation, and assessing the impact of varying computer hardware specifications on software performance.

While numerous software packages are available for solving problems related to numerical analysis and computations, the most widely recognized and utilized ones include MATLAB, SCILAB, and Python. This prompted the authors of this research to conduct a comparative analysis of the results obtained from these software platforms.

Before the study began, it was expected that the computational time would vary due to the diverse computing environments anticipated to be used. However, this variation was not anticipated for the robustness index.

The utilization of the Broyden method as a numerical technique paved the way for meticulous comparisons. Across a diverse spectrum of computing environments represented by the HP Probook, HP Elitebook, Dell Inspiron, and Dell Latitude laptops, the performance of these software packages was assessed.

Firstly, our findings on the HP Probook laptop unveiled intriguing trends. Python consistently demonstrated shorter computational times, significantly outperforming MATLAB. Python’s computational time ranged from 0.0017950 seconds to 0.00465234 seconds, whereas MATLAB’s spanned from 0.0448 seconds to 0.2690 seconds. In terms of the robustness index, Python showcased superiority by achieving a lower index in problems 3 and 5. Notably, for problem 1, Python mirrored MATLAB’s index for initial guess values 1 and 2 but outperformed MATLAB for initial guess 3, while MATLAB displayed better performance for initial guess values 4.

The HP Elitebook laptop presented contrasting results. Here, MATLAB consistently exhibited notably shorter computational times than Python for all four benchmark problems, marking a significant divergence from the Probook HP device. In terms of robustness, MATLAB consistently yielded a lower index than Python across all benchmark problems except for problem 5. However, a distinct challenge emerged; Python failed to converge for problem 4 with initial guess values 2, whereas MATLAB successfully produced results for the same problem with those initial guess values.

The data collected from the Dell Inspiron laptop uncovered intriguing patterns. Python demonstrated superior computational efficiency for problems 1, 3, and 4, while MATLAB excelled in addressing problems 2 and 5. This pattern persisted in terms of the robustness index, where Python displayed a smaller index for problems 1, 3, and 5, while MATLAB secured the lowest index for problems 2 and 5.

The examination of data from the Dell Latitude laptop revealed intriguing insights into computational efficiency and robustness. Python demonstrated exceptional speed in solving problems 2, 3, and 4, making it a strong choice for these tasks. On the other hand, MATLAB showcased its computational prowess by outperforming Python in addressing problems 1 and 5. This trend was mirrored in the robustness index, with Python proving highly efficient for problems 1 and 5, while MATLAB excelled in ensuring robust solutions for problems 2, 3, and 4. These findings highlight the strengths of each tool in different problem-solving scenarios, emphasizing the importance of selecting the right programming language for specific computational needs.

In summation, this study has contributed valuable insights into the comparative capabilities of Python, MATLAB, and Scilab for tackling nonlinear systems of equations. Our findings underscore the significance of considering both software and hardware specifications in real-world applications. Depending on the specific problem and computational environment, the choice between Python and MATLAB can yield distinct advantages. We hope that these results will guide researchers and practitioners in selecting the most suitable tools for their unique challenges.

Conflicts of Interest

The authors declare no conflicts of interest that could influence the objectivity, integrity, or impartiality of the research presented in this paper.

References

[1] Azure, I. (2023) An Analysis of Solutions of Nonlinear Equations Using AI Inspired Mathematical Packages. International Journal of Systems Science and Applied Mathematics, 8, 23-30.
https://doi.org/10.11648/j.ijssam.20230802.12
[2] Downey, A.B. (2015) Think Python: How to Think like a Computer Scientist. Green Tea Press, St, Erie.
http://greenteapress.com/thinkpython2/html/index.html
[3] Hahn, B. and Valentine, D.T. (2020) Essential MATLAB for Engineers and Scientists. Academic Press, Cambridge.
[4] Hanselman, D.C. and Littlefield, B.L. (2018) The Art of MATLAB. Cambridge University Press, Cambridge.
[5] Mahdy, A.M.S. (2022) A Numerical Method for Solving the Nonlinear Equations of Emden-Fowler Models. Journal of Ocean Engineering and Science.
https://doi.org/10.1016/j.joes.2022.04.019
[6] Nagar, S. (2021) Introduction to Scilab. Notion Press, Chennai.
[7] Python Software Foundation (2021) Python 3.10.0 Documentation.
https://docs.python.org/3/
[8] Rasheed, M., Shihab, S., Rashid, A., Rashid, T., Hamed, S.H.A. and Aldulaimi, M.A.H. (2021) An Iterative Method to Solve Nonlinear Equation. Journal of Al-Qadisiyah for Computer Science and Mathematics, 13, 87.
https://doi.org/10.29304/jqcm.2021.13.1.753
[9] Isaac, A., Stephen, T.B. and Seidu, B. (2021) A Comparison of Newly Developed Broyden-Like Methods for Solving System of Nonlinear Equations. International Journal of Systems Science and Applied Mathematics, 6, 77-94.
https://doi.org/10.11648/j.ijssam.20210603.11
[10] Rasheed, M., Rashid, A., Rashid, T., Hamed, S.H.A. and Al-Farttoosi, O.A.A. (2021) Application of Numerical Analysis for Solving Nonlinear Equation. Journal of Al-Qadisiyah for Computer Science and Mathematics, 13, 70.
https://doi.org/10.29304/jqcm.2021.13.1.752
[11] Biswa, N.D. (2012) Lecture Notes on Numerical Solution of Root-Finding Problems MATH 435.
[12] Martınez, J.M. (2000) Practical Quasi-Newton Methods for Solving Nonlinear Systems. Journal of Computational and Applied Mathematics, 124, 97-121.
https://doi.org/10.1016/S0377-0427(00)00434-9
[13] Mikac, M., Logožar, R. and Horvatić, M. (2022) Performance Comparison of Open Source and Commercial Computing Tools in Educational and Other Use—Scilab vs. MATLAB. Tehnički Glasnik, 16, 509-518.
https://doi.org/10.31803/tg-20220528171032
[14] Biegler, L.T. (2010) Nonlinear Programming: Concepts, Algorithms, and Applications to Chemical Processes. Society for Industrial and Applied Mathematics, Philadelphia.
https://doi.org/10.1137/1.9780898719383
[15] Kelley, C.T. (1995) Iterative Methods for Linear and Nonlinear Equations. Society for Industrial and Applied Mathematics, Philadelphia.
https://doi.org/10.1137/1.9781611970944
[16] Srivastava, R.B. and Srivastava, S. (2011) Comparison of Numerical Rate of Convergence of Bisection, Newton-Raphson’s and Secant Methods. Journal of Chemical, Biological and Physical Sciences (JCBPS), 2, 472.
[17] Xu, X.-B. (2022) An Algorithm on the Numerical Continuation of Asymmetric and Symmetric Periodic Orbits Based on the Broyden Method and Its Application. Chinese Astronomy and Astrophysics, 63, 401-421.
[18] Tolner, F., Barta, B. and Eigner, G. (2022) Comparison of Newton’s and Broyden’s Method as Nonlinear Solver in the Implementation of MFV-Robustified Linear Regression. 2022 IEEE International Conference on Systems, Man, and Cybernetics (SMC), Prague, 9-12 October 2022, 1518-1523.
https://doi.org/10.1109/SMC53654.2022.9945222
[19] Ebelechukwu, O.C., Johnson, B.O., Michael, A.I. and Fidelis, A.T. (2018) Comparison of Some Iterative Methods of Solving Nonlinear Equations. International Journal of Theoretical and Applied Mathematics, 4, 22-28.
https://doi.org/10.11648/j.ijtam.20180402.11
[20] Ahmad, A.G. (2015) Comparative Study of Bisection and Newton-Raphson Methods of Root-Finding Problems. International Journal of Mathematics Trends and Technology, 19, 121-129.
https://doi.org/10.14445/22315373/IJMTT-V19P516
[21] Kazemi, M., Deep, A. and Nieto, J. (2023) An Existence Result with Numerical Solution of Nonlinear Fractional Integral Equations. Mathematical Methods in the Applied Sciences, 46, 10384-10399.
https://doi.org/10.1002/mma.9128

Copyright © 2024 by authors and Scientific Research Publishing Inc.

Creative Commons License

This work and the related PDF file are licensed under a Creative Commons Attribution 4.0 International License.