Hybridization of the Rayleigh-Ritz method with the particle swarm algorithm for solving ordinary differential equations (Journal of the College of Basic Education, 2025)
Ordinary differential equations subject to boundary conditions (BVPs) play a crucial role in many scientific disciplines. Boundary value problems (BVPs) can be solved analytically, however, there are different types of boundary value problems are difficult to solve. Therefore, the numerical and approximation approaches for solving boundary value problems are used. In this paper, an algorithm is proposed for hybridizing the Rayleigh-Ritz method with the particle swarm algorithm to find approximate solutions of boundary value problems. To achieve this, it is vital to minimize the fitness function value. A discrete least squares weighted function is used to calculate the fitness function. Linear and non-linear boundaryalue problems are solved using the proposed algorithm. A comparison was made between the approximate and exact solutions. This is carried out by presented variety of linear and nonlinear examples. Moreover, the convergence of the proposed algorithm presented. The results of the approximate solution are promising in terms of convergence and accuracy.