Global Online Journal of Academic Research (GOJAR), Vol. 4, No. 1 February 2025 Global Online Journal of Academic Research (GOJAR), Vol. 4, No. 1 February 2025 26 Implementation and Comparative Analysis of AMGT Method in Maple 24: Convergence Performance in Optimization Problems Mark Laisin & Rosemary U. Adigwe Abstract This study investigates the utilization of the Accelerated Modified Gradient Technique (AMGT) in Maple 24 for optimization problem-solving. The research focuses on enhancing and evaluating the convergence speed of AMGT in comparison to the Gradient Descent (GD) and Conjugate Gradient (CG) methods. The analysis covers a range of function types, such as convex functions (e.g., production cost, energy consumption, and transportation cost functions) and a non- convex function. Findings showcase the effectiveness and versatility of AMGT, shedding light on its utility for addressing practical optimization challenges. Keywords: AMGT method, Maple 24, convergence performance, optimization problems, comparative analysis 1. Introduction Optimization techniques are crucial for solving complex problems in various fields, such as engineering, economics, machine learning, and operations research. They are essential for decision-making processes, from designing efficient systems to finding optimal financial strategies (Boyd & Vandenberghe, 2004). Gradient-based methods like Gradient Descent (GD) and Conjugate Gradient (CG) are widely used due to their computational efficiency and well-understood theoretical properties (Nocedal & Wright, 2006). These methods iteratively improve solutions by using gradients to guide the search for the optimal solution, making them effective for continuous optimization problems. However, in some cases, basic gradient-based methods face limitations in terms of convergence speed and stability, especially in large or complex Global Online Journal of Academic Research (GOJAR), Vol. 4, No. 1 February 2025 27 problem spaces. As optimization problems become high-dimensional or non- convex, traditional methods like GD and CG may struggle, leading to slower convergence rates and potential failure to escape local minima (Bertsekas, 1999). Accelerated Gradient Methods, including the Accelerated Modified Gradient Technique (AMGT), have been proposed to address these challenges and offer improvements in convergence speed and stability (Nesterov, 1983). The AMGT combines the theoretical robustness of traditional gradient methods with acceleration strategies that optimize the search for a minimum. It adapts the gradient direction dynamically to enhance the rate of convergence, a feature that can be critical when dealing with large-scale optimization tasks or when high precision is required (Dauphin et al., 2015). Despite its potential, there is a limited comparative analysis of AMGT concerning traditional methods such as GD and CG in contemporary optimization applications, particularly in symbolic and numerical computation environments. This paper investigates the implementation of AMGT in Maple 24, a versatile software for mathematical modeling, simulation, and optimization (Maplesoft, 2023). The objective is to compare the convergence performance of AMGT with GD and CG across various optimization problems, including convex and non-convex scenarios, to assess their relative effectiveness in different contexts. II. Methods and Materials Problem Formulation Optimization problems are expressed as minimizing a cost function. The study considers the following types of functions: ο‚· Production cost function 𝐢(π‘₯, 𝑦) = π‘Žπ‘₯2 + 𝑏𝑦2 + 𝑐π‘₯𝑦 + 𝑑 where 𝐢(π‘₯, 𝑦) is the cost of producing x units of labour and y units of capital, and a, b, c, and d are constants. ο‚· Energy consumptionfunction 𝐸(𝑇, 𝐻) = 𝛼𝑇2 + 𝛽𝐻2 + 𝛾𝑇𝐻 + πœ” where 𝐸(𝑇, 𝐻) is energy consumption as a function of temperature and humidity while 𝛼, 𝛽, 𝛾 π‘Žπ‘›π‘‘ πœ” are constants. ο‚· Transportation cost function 𝑇(𝑄, 𝐷) = 𝛼𝑄2 + 𝛽𝐷2 + 𝛾𝑄𝐷 + πœ” where 𝑇(𝑄, 𝐷) is the transportation cost as a function of quantity (Q) of goods to be transported and distance to be covered in transportation (D). 𝛼, 𝛽, 𝛾 π‘Žπ‘›π‘‘ πœ” are constants. Non-Convex Function: A non-convex function in mathematics refers to a function where the line segment joining any two points on the graph of the Global Online Journal of Academic Research (GOJAR), Vol. 4, No. 1 February 2025 28 function is not entirely above or on the graph. More formally, a function f(x) is non-convex if, for some π‘₯1, π‘₯2 ∈ 𝑅𝑛 and for some πœ† ∈ [0,1], we have: 𝑓(πœ†π‘₯1 + (1 βˆ’ πœ†)π‘₯2) > πœ†π‘“(π‘₯1) + (1 βˆ’ πœ†)𝑓(π‘₯2) which means that the epigraph (the set of points above the graph) is not convex. A convex function satisfies the reverse inequality: 𝑓(πœ†π‘₯1 + (1 βˆ’ πœ†)π‘₯2) ≀ πœ†π‘“(π‘₯1) + (1 βˆ’ πœ†)𝑓(π‘₯2) A non-convex function is simply one that does not satisfy this condition in general. E.g. the convex function 𝑓(π‘₯, 𝑦) = 2π‘₯𝑦 + 𝑦 βˆ’ π‘₯2 βˆ’ 2𝑦2. With the three methods using π‘₯0 = 2 and 𝑦0 = 2, while AMGT uses π‘š0(π‘₯, 𝑦) = (1000,1000), 𝛼 = 50, 𝛽 = 0.13, 𝛾 = 0.1, is a non-convex function. Algorithms ο‚· Gradient Descent (GD): Iterative optimization algorithm using the gradient to update parameters. ο‚· Conjugate Gradient (CG): Enhances GD by using conjugate directions for faster convergence in quadratic problems. ο‚· Accelerated Modified Gradient Technique (AMGT): Combines momentum-based acceleration with gradient optimization for enhanced performance for the optimization of nonlinear unconstrained optimization. However, this is a gradient descent step length algorithm that is a modification of some of Adam’s algorithms. Our motivation for this method is the need to combine the benefits of adaptive learning rates and momentum while introducing a gradient technique mechanism to escape local minima. Update Rules for the proposed AMGT: a. Define the convex function to be optimized b. Initialize π‘₯0, 𝛼0, Ο„, Ξ² , Ξ³, π‘š0, tolerance and number of iterations c. Compute the gradient of the given convex function to be optimized: βˆ‡π‘“(π‘₯π‘˜) = βˆ‚f βˆ‚π‘₯π‘˜ d. Next compute the adaptive learning rate: π›Όπ‘˜ = π›Όπ‘˜βˆ’1/(1 + Ξ³/𝜏) e. Compute the momentum: π‘šπ‘˜ = Ξ² βˆ— π‘šπ‘˜βˆ’1 + (1 βˆ’ 𝛽) βˆ— βˆ‡π‘“(π‘₯π‘˜) Global Online Journal of Academic Research (GOJAR), Vol. 4, No. 1 February 2025 29 f. Apply gradient technique on the momentum: οΏ½Μ‚οΏ½π‘˜ = π‘šπ‘˜ βˆ— (1 βˆ’ Ξ³ βˆ— |βˆ‡π‘“(π‘₯π‘˜)| |π‘šπ‘˜| ) g. Update parameters or variable values of the convex function: π‘₯π‘˜ = π‘₯π‘˜βˆ’1 βˆ’ π›Όπ‘˜ βˆ— οΏ½Μ‚οΏ½π‘˜ h. Continue steps b to g till the specified number of iterations. Convergence Criteria: AMGT converges when the following conditions are met: ο‚· Parameter Convergence: The updates to the parameters (π‘₯π‘˜) become negligible, i.e., |π‘₯π‘˜ βˆ’ π‘₯π‘˜βˆ’1| < tolerance. ο‚· Objective Function Convergence: The change in the objective function value becomes negligible, i.e., |𝑓(π‘₯π‘˜) βˆ’ 𝑓(π‘₯π‘˜βˆ’1)|0 and b>0. Supposed a=2, b=4, c=5 and d=9 then; 𝐢(π‘₯, 𝑦) = 2π‘₯2 + 4𝑦2 + 5π‘₯𝑦 + 9 and with the three methods using π‘₯0 = 2 and 𝑦0 = 2, while AMGT uses π‘š0(π‘₯, 𝑦) = (1000,1000), 𝜏 = 50, 𝛽 = 0.13, 𝛾 = 0.1, we have the following results: Table 4.2: Production cost function Methods Gradient Descent Conjugate Gradient AMGT Iteration C(x,y)at 𝛼 = 0.1 C(x,y)at 𝛼 = 0.1 C(x,y)at 𝛼0 = 0.1 C(x,y) at 𝛼0 = 0.2 C(x,y)at 𝛼0 = 0.3 1 9.740000 9.920000 35.214992 293.4537351 827.7162300 10 9.000489 9.013961 9.002196 10524.22355 3.893467833*10^9 20 9.000091 9.001823 9.000617 574721.6499 1.019715961*10^17 30 9.000017 9.000238 9.000174 31411103.41 2.670679931*10^24 40 9.000003 9.000031 9.000049 1716782917 6.994625548*10^31 50 9.000001 9.000004 9.000014 93831291380 1.831922500*10^39 100 9.000000 9.000000 9.000000 4.576244859*10^19 2.257460882*10^76 Fig 4.5: Convergence chart 0 10 20 30 40 1 2 3 4 5 6 7 Convergence Chart GRADIENT DESCENT CONJUGATE GRADIENT AMGT Global Online Journal of Academic Research (GOJAR), Vol. 4, No. 1 February 2025 35 Fig 4.6: AMGT optimization path Fig 4.7: Objective function for production in 3D Application 3: Let us consider the energy consumption function 𝐸(𝑇, 𝐻) = 𝛼𝑇2 + 𝛽𝐻2 + 𝛾𝑇𝐻 + πœ” where 𝐸(𝑇, 𝐻) is energy consumption as a function of temperature and humidity while 𝛼, 𝛽, 𝛾 π‘Žπ‘›π‘‘ πœ” are constants. This function is convex if 𝛼>0 and 𝛽>0. Supposed𝛼 =5, 𝛽 =5, 𝛾 =7 and πœ” =10 then; 𝐸(𝑇, 𝐻) = 5𝑇2 + 5𝐻2 + 7𝑇𝐻 + 10 and with the three methods using π‘₯0 = 2 and 𝑦0 = 2, while AMGT uses π‘š0(π‘₯, 𝑦) = (1000,1000), 𝜏 = 50, 𝛽 = 0.13, 𝛾 = 0.1, we have the following results: Table 4.3: Energy consumption function Methods Gradient Descent Conjugate Gradient AMGT Iteration 𝐸(𝑇, 𝐻) at 𝛼 = 0.1 𝐸(𝑇, 𝐻) at 𝛼 = 0.1 𝐸(𝑇, 𝐻) at 𝛼0 = 0.1 𝐸(𝑇, 𝐻) at 𝛼0 = 0.2 1 14.998000 43.320000 129.59045 917.0755341 10 10.000013 10.000000 10.043577 3.831893089*10^9 20 10.000000 10.000000 10.000006 8.801297678*10^16 30 10.00000 10.00000 10.000000 2.021529286*10^24 40 10.000000 10.000000 10.000000 4.643156981*10^31 50 10.000000 10.000000 10.000000 6.817314683*10^75 Fig 4.8: Convergence chart for GD, CG and AMGT 0 50 100 150 1 2 3 4 5 6 Convergence Chart Gradient Descent Conjugate Gradient AMGT Global Online Journal of Academic Research (GOJAR), Vol. 4, No. 1 February 2025 36 Fig 4.9: AMGT optimization path for GD and CG Fig 4.10: Objective function for energy cost Application 4: Let us consider transportation cost function 𝑇(𝑄, 𝐷) = 𝛼𝑄2 + 𝛽𝐷2 + 𝛾𝑄𝐷 + πœ” where 𝑇(𝑄, 𝐷) is the transportation cost as function of quantity (Q) of goods to be transported and distance to be covered in transportation (D). 𝛼, 𝛽, 𝛾 π‘Žπ‘›π‘‘ πœ” are constants. This function is convex if 𝛼>0 and 𝛽>0 indicating that transportation cost increases at an increasing rate as either quantity or distance increases. Supposed𝛼 =4, 𝛽 =1, 𝛾 =-1 and πœ” =0 then; 𝑇(𝑄, 𝐷) = 4𝑄2 + 𝐷2 βˆ’ 2𝑄𝐷 and with the three methods using π‘₯0 = 2 and 𝑦0 = 2, while AMGT uses π‘š0(π‘₯, 𝑦) = (1000,1000), 𝜏 = 50, 𝛽 = 0.13, 𝛾 = 0.1, we have the following results: Table 4.4: Transportation cost function Methods GD at 𝛼 = 0.1 CG at 𝛼 = 0.1 AMGT at 𝛼 = 0.1, 0.2, π‘Žπ‘›π‘‘ 0.3 π‘Ÿπ‘’π‘ π‘π‘’π‘π‘‘π‘£π‘–π‘’π‘™π‘¦ Iteration 𝑇(𝑄, 𝐷) 𝑇(𝑄, 𝐷) 𝑇(𝑄, 𝐷) 𝑇(𝑄, 𝐷) 𝑇(𝑄, 𝐷) 1 2.841600 3.360000 2.100208 31.996444 101.6887051 10 0.135361 0.050166 0.011700 0.024588 185200.1144 20 0.005533 0.000429 0.000578 0.000012 8.452832713*10^8 30 0.000226 0.000004 0.000029 0.000000 3.858009564*10^12 40 0.000009 0.000000 0.000001 0.000000 1.760857964*10^16 50 0.000000 0.000000 0.000000 0.000000 8.036840592*10^19 100 0.000000 0.000000 0.000000 0.000000 1.591807268*10^38 Fig 4.11: Convergence path for transportation cost function Global Online Journal of Academic Research (GOJAR), Vol. 4, No. 1 February 2025 37 Fig 4.12 AMGT optimization path for GD and CG Fig 4.13: Objective function for transportation cost Application 5: Let's consider the convex function 𝑓(π‘₯, 𝑦) = 2π‘₯𝑦 + 𝑦 βˆ’ π‘₯2 βˆ’ 2𝑦2. With the three methods using π‘₯0 = 2 and 𝑦0 = 2, while AMGT uses π‘š0(π‘₯, 𝑦) = (1000,1000), 𝜏 = 50, 𝛽 = 0.13, 𝛾 = 0.1, we have the following results; Table 4.5: Non convex Methods Gradient Descent Conjugate Gradient AMGT Iteration f(x,y) at 𝛼 = 0.1 f(x,y) at 𝛼 = 0.1 f(x,y) at 𝛼0 = 0.1 1 -3.080000 -3.08 -0.084282334 10 -4263.708589 -603182.468126262 -490.5670125 20 -34952895.710000 -1110219359887.00 -2146227.90 Fig 4.14: AMGT optimization path for GD and CG Fig 4.15: Objective function: Nonconvex function From the diagram above, this is a non-convex function; thus, it doesn’t have a minimum. Instead, what it has is a maximum and therefore none of the Global Online Journal of Academic Research (GOJAR), Vol. 4, No. 1 February 2025 38 methods converges. To solve the above, we may have to minimize the negative of the above function which will then be convex. Discussion The discussion emphasizes AMGT's rapid convergence and stability, making it well-suited for a variety of optimization problems. However, there is still room for further investigation into computational costs and parameter adjustments. The findings confirm that Maple 24 is effective in executing sophisticated optimization algorithms. Conclusion This study underscores AMGT's advantages in convergence rate and stability, making it a promising alternative to GD and CG. However, the convex functions showed the following results. ο‚· Production Cost Function: AMGT demonstrated faster convergence compared to GD and CG, with reduced iterations for similar accuracy levels. ο‚· Energy Consumption Function: AMGT showcased enhanced stability in scenarios with fluctuating gradients. ο‚· Transportation Cost Function: The performance gain of AMGT was significant in multi-variable optimization tasks. Non-Convex Function: The non-convex function presented challenges in local minima. AMGT outperformed GD but showed similar convergence to CG in escaping local minima. Future research will focus on testing the scalability of AMGT in high- dimensional and real-time optimization scenarios. References Bertsekas, D. P. (1999). Nonlinear Programming (2nd ed.). Athena Scientific. Boyd, S., & Vandenberghe, L. (2004). Convex Optimization. Cambridge University Press. Dauphin, Y. N., Pascanu, R., Gulcehre, C., Cho, K., Ganguli, S., & Bengio, Y. (2015). Identifying and attacking the saddle point problem in high- dimensional non-convex optimization. In Proceedings of the 34th International Conference on Machine Learning (Vol. 37, pp. 2967- Global Online Journal of Academic Research (GOJAR), Vol. 4, No. 1 February 2025 39 2975). Diederikm, P. K and Jimmy, L. B. (2015). Adam: A method for Stochastic Optimization. Published as a conference paper at ICLR, 2015. Kingma, D. P., & Ba, J. (2015). "Adam: A Method for Stochastic Optimization." arXiv preprint arXiv:1412.6980. MapleSoft. (2023). Maple 24 Documentation. [Online]. Available: https://www.maplesoft.com/documentation. Nesterov, Y. (1983). A method of solving a convex programming problem with convergence rate O(1/k^2). DokladyAkademiiNauk SSSR, 269(3), 543–547. Nesterov, Y. (2004). Introductory Lectures on Convex Optimization: A Basic Course. Springer. Nocedal, J., & Wright, S. J. (2006). Numerical Optimization (2nd ed.). Springer. Noel J. (2023). Nesterovs Method for Convex Optimization. Society for Industrial and Applied Mathematics. Vol. 65, No. 2, pp. 539–562. Polyak, B. T. (1964). "Some Methods of Speeding up the Convergence of Iteration Methods." USSR Computational Mathematics and Mathematical Physics, 4(5), 1-17. Rahul, A. (2023). Complete Guide to the Adam Optimization Algorithm. https://builtin.com/machine-learning/adam-optimization. (Retrieved November 11, 2024) Satyam, T (2024)/Adagrad Optimizer Explained: How It Works, Implementation, & Comparisons | DataCamp www.gabormelli.com/RKB/Root_Mean_Square_Propagation_Algorithm_(R MSprop) (Retrieved November 11, 2024). Author Information: Mark Laisin is a Professor of Applied Mathematics at Chukwuemeka Odumegwu Ojukwu University, Uli, Anambra State, Nigeria. Email: laisinmark@gmail.com Rosemary U. Adigwe is of the Department of Mathematics, Chukwuemeka Odumegwu Ojukwu University, Uli, Anambra State, Nigeria. Email: Global Online Journal of Academic Research (GOJAR), Vol. 4, No. 1 February 2025 40 rosemaryadigwe14@gmail.com APA Laisin, M. & Adigwe, R. U. (2025). Implementation and Comparative Analysis of AMGT Method in Maple 24: Convergence Performance in Optimization Problems. Global Online Journal of Academic Research (GOJAR), 4(2), 26-40. https://klamidas.com /gojar-v4n1-2025-02/. MLA Laisin, Mark and Adigwe, Rosemary U. β€œImplementation and Comparative Analysis of AMGT Method in Maple 24: Convergence Performance in Optimization Problems”. Global Online Journal of Academic Research (GOJAR), vol. 4, no. 1, 2025, pp. 26-40. https://klamidas.com /gojar-v4n1-2025-02/.