Engineering and technological research groups are becoming interested in neural network techniques to improve productivity, business strategies, and societal development. In this paper, an explicit numerical scheme is given for both linear and nonlinear differential equations. The scheme is correct to second order. Additionally, the scheme’s consistency and stability are guaranteed. Backpropagation of Levenberg–Marquardt, the effect of including an induced magnetic field in a mathematical model for electrical boundary layer nanofluid flow on a flat plate, is quantitatively investigated using artificial neural networks. Later, the model is reduced into a set of boundary value problems, which are then resolved using the suggested scheme and a shooting strategy. The outcomes are also contrasted with earlier studies and the MATLAB solver bvp4c for validation purposes. In addition, neural networking is also employed for mapping input to outputs for velocity, temperature, and concentration profiles. These results prove that artificial neural networks can make precise forecasts and optimizations. Using a neural network to optimize the fluid flow in an electrical boundary layer while subjected to an induced magnetic field is a promising application of the suggested computational scheme. Fluid dynamics benefits greatly from combining numerical methods and artificial neural networks, which could lead to new developments in various fields. Results from this study may aid in optimizing fluid systems, leading to greater productivity and effectiveness in numerous technical fields.