Comparative Study of Two Optimization Algorithms for Solving

Nonlinear Differential Equations: A Performance Analysis

Qasim Abd Ali Tayyeh1,*

1 Department of Mechanical Techniques,Al-Nasiriya Technical Institute, Southern Technical University, Thi-Qar, Al-Nasiriya 64001,

Iraq

Email: qassim.tayih@stu.edu.iq

Received: April 02, 2026 Revised: June 05, 2026 Accepted: August 05, 2026 ⋆ Corresponding author

ABSTRACT

The purpose of this work was to benchmark three population-based metaheuristic optimizers—Particle Swarm

Optimization, Differential Evolution, and Grey Wolf Optimizer—when used to solve nonlinear ordinary differential

equations within the Neural Network Trial Solution methodology. Problems used for testing were the Riccati initial

value problem, the nonlinear pendulum IVP, the Bratu boundary value problem, and the Lane-Emden equation with

index five. All problems were implemented such that their boundary/initial conditions were satisfied exactly through

analytical construction while their residuals at collocation points were minimized through unconstrained optimization.

Thirty Monte Carlo runs of each algorithm were performed with same underlying settings to facilitate statistical

comparisons between algorithms. Metrics used for comparisons were mean absolute error (MAE), root mean square

error (RMSE), maximum error at any point, and rate of convergence. All significant testing was performed with

the Wilcoxon signed-rank test. PSO is shown to consistently provide the smallest mean absolute error across three

of the four problems, with an MAE as small as 2.78×10−5 on the Bratu BVP, while GWO was shown to stagnate

prematurely when solving boundary value problems.

Keywords: Metaheuristic optimization Neural network trial solution Particle swarm optimization Differential

evolution Grey wolf optimizer Nonlinear ODEs Bratu equation Lane-Emden equation Comparative study.

1. INTRODUCTION

ODEs are among the most ubiquitous problems encountered

in both science and engineering [1]. Applications range from

astronomy and chemical reaction networks to fluid dynamics

and biological modelling. While several numerical methods

exist to solve ODEs (such as Runge-Kutta methods [2], finite

difference discretization, and shooting methods), most can

require mesh refinement, special treatment of stiffness, and

manual imposition of boundary conditions [3].

One technique instead frames the problem of ODE solving

as an unconstrained optimization problem using a neural network

representation of the trial solution posed by Lagaris

et al. (1998) [4]. In this framework, boundary conditions

are implicitly satisfied by construction of the approximate

solution ansatz, so there is no need to manually iterate to

enforce boundary conditions [5]. A residual cost is formed

and minimized with respect to parameters of the neural network.

Although this method was initially implemented using

gradient-based optimizers (such as quasi-Newton methods)

[6], such techniques rely heavily on initial parameterization

and can get stuck in local minima for highly nonlinear problems

[7].

Population-based metaheuristics present an attractive solution

due to their ability to search globally in a stochastic manner

while requiring no gradient information [8]. Particle Swarm