# A new numerical approach to solve Thomas–Fermi model of an atom using bio-inspired heuristics integrated with sequential quadratic programming

## Abstract

In this study, a novel bio-inspired computing approach is developed to analyze the dynamics of nonlinear singular Thomas–Fermi equation (TFE) arising in potential and charge density models of an atom by exploiting the strength of finite difference scheme (FDS) for discretization and optimization through genetic algorithms (GAs) hybrid with sequential quadratic programming. The FDS procedures are used to transform the TFE differential equations into a system of nonlinear equations. A fitness function is constructed based on the residual error of constituent equations in the mean square sense and is formulated as the minimization problem. Optimization of parameters for the system is carried out with GAs, used as a tool for viable global search integrated with SQP algorithm for rapid refinement of the results. The design scheme is applied to solve TFE for five different scenarios by taking various step sizes and different input intervals. Comparison of the proposed results with the state of the art numerical and analytical solutions reveals that the worth of our scheme in terms of accuracy and convergence. The reliability and effectiveness of the proposed scheme are validated through consistently getting optimal values of statistical performance indices calculated for a sufficiently large number of independent runs to establish its significance.

## Background

The aim of this study is to solve the Thomas–Fermi model of an atom (Fermi 1927; Thomas 1927) represented through nonlinear singular Thomas–Fermi equation (TFE) by exploiting the strength of artificial intelligence algorithms. The fundamental form of TFE is written as:

$$y''(t) - t^{ - 1/2} \left( {y(t)} \right)^{3/2} = 0,\quad \text{Re} \,\,t \in [0,\,\,\infty ],$$
(1)

along with the associated boundary conditions as:

$$y(0) = 1,\quad y(\infty ) = 0,$$
(2)

For practical analysis of the dynamics of TFE, most of the studies are conducted for restricted inputs instead of unbounded domain.

The Thomas–Fermi system (1) is one of the simplest approaches to the study of the potential and charge densities in a variety of models, for example, atoms (Banerjee et al. 1974; Coulson and March 1950; March 1957, 1983; March and Tomishina 1979), molecules (Banerjee et al. 1974; March 1952), atoms in strong magnetic fields (Banerjee et al. 1974; March and Tomishina 1979; March 1983), metals and crystals (Umeda and Tomishina 1955) and dense plasmas (Ying and Kalman 1989). The overview, importance and applications of classical numerical approaches for TFE can be seen (Kirzhnits 1957; Bush and Caldwell 1931). The research community has shown great interest in the accurate and reliable calculation of the solution for the TFE including sinc-collocation method (Parand et al. 2013a), Laguerre pseudospectral approximation (Liu and Zhu 2015), Chebyshev pseudospectral method (Kılıçman et al. 2014), rational Chebyshev pseudospectral approach (Parand and Shahini 2009), hermite collocation method (Bayatbabolghani and Parand 2014), rational approximation (Fernández 2011), Homotopy Analysis Method (HAM) (Yao 2008) improved HAM (Zhao et al. 2012), rational Bessel functions collocation method (Parand et al. 2016a), rational Euler functions based methods (Parand et al. 2016b), methods based on Jacobi rational functions with Gauss quadrature formula (Bhrawy and El-Soubhy 2015) and Padé–Hankel method (Amore et al. 2014), Beside these there are many other studies for solving Thomas–Fermi models, see (Fernández 2008; Liao 2003a; Filobello-Nino et al. 2015; Dahmani and Anber 2015; Feng et al. 2015) and the references therein.

After a profound study of the literature regarding Thomas–Fermi equation (TFE) it is observed that only deterministic solvers are applied to analyze its dynamics and no one yet applied the stochastic solvers. Recently, stochastic numerical techniques based on artificial intelligence techniques are effectively used to calculate the accurate solutions for initial and boundary value problems (BVPs) of differential equations involving both integer and fractional derivatives (Parand et al. 2013b; Arqub and Abo-Hammour 2014; Abo-Hammour et al. 2013; Abu Arqub et al. 2012, 2014). For instance, few potential application of stochastic solvers are solution of nonlinear Van-der-Pol oscillatory systems (Khan et al. 2015b), inverse Kinematics problem (Momani et al. 2016), problem arising in Electromagnetic theory (Khan et al. 2015a), nonlinear singular systems (Abo-Hammour et al. 2014a), plasma physics problems (Raja 2014a), nonlinear Navier–Stokes problems (Abo-Hammour et al. 2014b), nanotechnology problems involving carbon nanotubes (Raja et al. 2016a), magnetohydrodynamic problems (Raja et al. 2015a), fuel ignition model of combustion theory (Raja 2014b), fluid dynamics problem of thin film flow (Raja et al. 2016d), mathematical models of electrically conducting solids (Raja et al. 2016b), Schrödinger equation for the hydrogen atom (Caetano et al. 2011), nonlinear Jeffery–Hamel flow in the presence of high magnetic field (Raja and Samar 2014), and strong nonlinear systems based on Painlevé, Bratu, Emden–Fowler, Riccati, Bagley–Torvik, Troesch’s, Lane–Emden, Flierl–Petviashivili and pantograph models (see Mall and Chakraverty 2013, 2014, 2015; Raja et al. 2014, 2015b, c, 2016c) and references therein). Authors motivated from these studies to carry out exploration and exploitation in the field on stochastic numerical solvers to solve governing model of nonlinear TFE based on discritization with finite difference scheme and trained through bio-inspired computing integrated with sequential quadratic programming procedures.

The most incorporated stochastic solvers are normally based on bio-inspired computational heuristics through Genetic Algorithms (GAs), a kind of effective global search methodology. GAs are used extensively to solve variety of the problems arising in various applications in physical sciences (Homayouni et al. 2014; Chiroma et al. 2014, 2015; Toledo et al. 2014; Chiroma et al. 2016) which motivates the authors to exploit the strength of these techniques to study the dynamics of nonlinear singular TFE. The advantages of these methodologies are reflected through simplicity of the concept, ease in implementation processes, wider applicability, avoid divergence, stability, robustness and reliability, which make them impressive to be exploited for challenging models of mathematical physics like TFE. With the advent of modern computer architectures based on signal processing platform, an immense increase in computational power of the machines is achieved which gives a rebirth to population based meta-heuristic methodologies to be used for stiff problems of mathematical physics. The significance of the present research is a step forward in designing the machines learning algorithms for providing the solution of highly nonlinear and singular system for Thomas–Fermi model of an atom given in the form of boundary value problem of TFE for unbounded domain.

The rest of the paper is organized as follows: in “Methods” section, the proposed design methodology based on discretization of differential equation into system of difference equations by using a finite difference scheme is provided along with the optimization procedure for solving system of nonlinear equations; in “Numerical experimentation and results” section, the results of numerical simulations for different cases of TFE are presented in a number of graphs and numerical illustrations; conclusions are listed in the last section along with few suggested research directions.

## Methods

Proposed methodology for Thomas–Fermi Eq. (1) is presented here that consists of two parts. First part is the formulation of optimization problem with the construction of overall individual residual error with the help of finite different schemes satisfying the constrained boundary conditions, while is the second part, a hybrid computing framework based on Genetic Algorithms (GAs) supported with Sequential Quadratic Programming (SQP) is exploited for minimization of the overall residual error function.

### Discretization through finite difference scheme

The simplest and effective technique for solving differential equation is based on finite difference schemes which are used for approximation of derivative terms in the system by using difference quotients.

To obtain the approximate solution of the Thomas–Fermi equation on equally distributed mesh points in the finite interval $$t \in [0,\,\,T]$$, one can proceed by taking $$t_{i} = ih,\quad i = 0,1, \ldots ,N$$ for h = 1/N, hence the approximated equation is given for interior mesh points, $$t_{i} ,\,\,\,i = 1,2, \ldots ,N - 1$$ as:

$$y''(t_{i} ) = F(y(t_{i} )),\quad t_{1} \le t_{i} \le t_{N - 1} ,$$
(3)

while the boundary conditions are given as:

$$y(t_{0} ) = \beta_{1} ,\,\,\,\,y(t_{N} ) = \beta_{2} .$$
(4)

Here $$F(y(t_{i} )) = \sqrt {{{\left( {y(t_{i} )} \right)^{3} } \mathord{\left/ {\vphantom {{\left( {y(t_{i} )} \right)^{3} } t}} \right. \kern-0pt} t}_{i} } ,\,\,\,\beta_{1} = 1,$$ and $$\,\beta_{2} = 0$$ for Thomas–Fermi equation.

The difference quotients approximation formulates based on 5 interior mesh points is used to closely approximate $$y''(t_{i} ),\,\,\quad i = 1,2, \ldots ,N - 1$$, by taking small step size h with the error on the order of 0 $$(h^{3} )$$ and are written mathematically for forward Δ, central Π and backward $$\nabla$$ differences operators, respectively, as:

$$y^{\prime\prime}(t_{1} ) = \frac{1}{{h^{2} }}\Delta \left( {y(t_{0} ),y(t_{4} )} \right),$$
(5)
$$y^{\prime\prime}(t_{i} ) \approx \frac{1}{{h^{2} }}\varPi (y(t_{i - 2} ),y(t_{i + 2} )),\quad i = 2,3, \ldots ,N - 2,$$
(6)
$$y^{\prime\prime}(t_{N - 1} ) \approx \frac{1}{{h^{2} }}{\nabla }\left( {y(t_{N - 4} ),y(t_{N} )} \right),$$
(7)

where forward Δ, central Π and backward $${\nabla }$$ differences are defined as:

$$\Delta \left( {y(t_{0} ),\,\,y(t_{4} )} \right) = \left( {\frac{11}{12}y(t_{0} ) - \frac{5}{3}y(t_{1} ) + \frac{1}{2}y(t_{2} ) + \frac{1}{3}y(t_{3} ) - \frac{1}{12}y(t_{4} )} \right),$$
(8)
$$\Pi \left( {y(t_{i - 2} ),y(t_{i + 2} )} \right) = \left( { - \frac{1}{12}y(t_{i - 2} ) + \frac{4}{3}y(t_{i - 1} ) - \frac{5}{2}y(t_{i} ) + \frac{4}{3}y(t_{i + 1} ) - \frac{1}{12}y(t_{i + 2} )} \right)$$
(9)
$${\nabla }\left( {y(t_{N - 4} ),y(t_{N} )} \right) = \left( { - \frac{1}{12}y(t_{N - 4} ) + \frac{1}{3}y(t_{N - 3} ) + \frac{1}{2}y(t_{N - 2} ) - \frac{5}{3}y(t_{N - 1} ) + \frac{11}{12}y(t_{N} )} \right) .$$
(10)

The finite difference schemes are used for solving the Thomas–Fermi differential equations by the procedure of discretization.

### Fitness function formulation

Discretization procedure of differential equations converts the equation to the system of algebraic equations which are then solved by construction of fitness function based on individual residual errors of each equation. The necessary details for the construction of fitness function is given here.

The finite difference approximation formulae for $$y^{\prime\prime}(t_{i} ),\quad i = 1,2, \ldots ,N - 1$$, given in (5), (6) and (7) are used in (3) to transform the Thomas–Fermi equation as:

$$\frac{1}{{h^{2} }}\Delta \left( {y(t_{0} ),y(t_{4} )) - F(y(t_{1} )} \right) \approx 0,$$
(11)
$$\frac{1}{{h^{2} }}\varPi \left( {y(t_{i - 2} ),y(t_{i + 2} )) - F(y(t_{i} )} \right) \approx 0,\quad i = 2,3, \ldots ,N - 2,$$
(12)
$$\frac{1}{{h^{2} }}\nabla \left( {y(t_{N - 4} ),y(t_{N} )) - F(y(t_{N - 1} )} \right) \approx 0.$$
(13)

Equations (11), (12) and (13) are the system of algebraic equations with N dependent variables, i.e., $$y(t_{0} ),y(t_{1} ),$$ …,$$y(t_{N} )$$. In order to formulate a fitness function the residual errors R err are defined as:

$$R_{err} (1) = \frac{1}{{h^{2} }}\Delta \left( {y(t_{0} ),y(t_{4} )) - F(y(t_{1} )} \right),$$
(14)
$$R_{err} (i) = \frac{1}{{h^{2} }}\varPi (y(t_{i - 2} ),y(t_{i + 2} )) - F(y(t_{i} )),\quad i = 2,3, \ldots ,N - 2,$$
(15)
$$R_{err} (N - 1) = \frac{1}{{h^{2} }}\nabla \left( {y(t_{N - 4} ),y(t_{N} )) - F(y(t_{N - 1} )} \right),$$
(16)

The overall individual residual function O R is defined, similar to $$l_{2}$$ the norm of the residuals of all nodes and it is given mathematically as:

$$O_{R} = \sqrt {\left( {R_{err} (1)} \right)^{2} + \sum\limits_{i = 2}^{N - 2} {\left( {R_{err} (i)} \right)^{2} + \left( {R_{err} (N - 1)} \right)^{2} ,} }$$
(17)

Now the requirement is to minimize the fitness function O R for which the value of individual residual errors for each equation decreases. Consequently, the desired results or optimized solutions of the problem are achieved when O R approaches zero.

### Learning methodology

Residual error function (17) is minimized through hybrid computing approach consisting of GAs integrated with SQP method, i.e., GA-SQP algorithms.

First real application of GAs has been given by Holland (Holland 1975) in early 70’s of the last century and afterwards GAs is used as one of the premier derivative free solver for both constrained and non-constrained optimization problems. GAs belongs to the class of global search methods formulated through mathematical modeling of natural genetic mechanism. The standard operation of GAs is based on its reproduction operators, which are selection, crossover, and mutation. GAs are applied effectively as a good optimization mechanism in diverse fields such as electronics, optics, electromagnetism, controls, digital communication, robotics, astrophysics, chemical industry, materials, signal processing, nuclear power systems, bioinformatics, economics, and financial mathematics etc. (see Haupt and Haupt 2004; Kumar et al. 2010; Dasgupta and Michalewicz 2013; Grefenstette 2013, and references therein). Few recently reported potential applications of GAs are optimization in orbital maneuvers (dos Santos and da Silva Formiga 2015), overlapping community detection in complex networks (Yuxin et al. 2015), formulation of a public bicycle-sharing system (Askari and Bashiri 2015), preemptive identical parallel machines scheduling problem (Aalaei et al. 2015) and spacecraft guidance and control system (Shirazi and Mazinan 2015).

The GAs is implemented through built-in functions available in the MATLAB optimization toolbox and for effective optimization. GAs are hybridized with SQP for rapid local search. In this manner, a hybrid meta-heuristic optimization mechanism is designed for training of weights of ANNs based on GAs integrated with SQP to solve Thomas–Fermi equation. Detailed workflow of the proposed design scheme, in terms of the problem, modeling, optimization procedures and comparison, are shown in Fig. 1. Optimization of the fitness function given in Eq. (17) is carried out with the help of GA-SQP, which are implemented through built-in routines of GAs and FMINCON with algorithm SQP available in the Matlab optimization toolbox. The parameter settings applied for GAs and SQP are given in Table 1. These settings are made with care, after a lot of experimentation. A slight variation in these settings may result in pre-mature convergence of the algorithms.

The detailed description of the procedural steps of proposed GA-SQP algorithm is given as follows: Firstly, the initial chromosome for GAs are created with bounded real values randomly having genes or elements equal to the number of unknown variables in the residual error function. These chromosomes formulate an initial population P for the algorithm. Mathematically the population P based on chromosomes is given as:

\begin{aligned} \varvec{P} &= \left[ {\varvec{c}_{ 1} ,\varvec{c}_{ 2} , \ldots ,\varvec{c}_{M} } \right]^{T} ,\, \hfill \\ \varvec{c}_{i} &= [c_{1} ,\,c_{2} , \ldots ,c_{N} ]_{i} = [y_{1} ,\,y_{2} ,\, \ldots ,y_{N} ]_{i} , \hfill \\ \end{aligned}

where M is the total number of chromosomes in the population, while each chromosome has M elements or genes which represents the discritization points of finite difference scheme. The rest of parameters are set for GA as listed in Table 1. In second step, the value of fitness $$O_{R}$$ is determined for each chromosome c of the population P using Eq. (17) and its constituent parts given in Eqs. (1416). Each chromosome c of the population P with a minimum value of fitness $$O_{R}$$ is ranked high and vice versa. Ranking each chromosome of the population accordingly. Thirdly, algorithm stops its execution in case of fulfillments of the fitness limit; total number of generations/cycles executed, tolerance limits are attained such as function tolerance (TolFun) and nonlinear constraint tolerance (TolCon). If termination criteria satisfied just go SQP algorithm otherwise reproduced population using crossover, mutation and selection operations by invoking the built-in functions for these genetic operators, as listed in Table 1. Repeat the procedure accordingly. The rapid refinement of the results is carried out using SQP algorithm by using ‘fmincon’ routine with initial weights which are the global best solution of GAs. Initial declarations, setting and boundes for the algorithm are listed in Table 1. Determined the value of fitness $$O_{R}$$, as given in the Eq. (17) for each updated weights vector by SQP procedure and terminate the cyclic updating of weights if execution of total number of iterations, fitness, tolerances limits are achieved and refined design parameter are obtained. Finally, store the final optimized weights of both GA and GA-SQP algorithms along with their fitness, time consumed, generations executed, and functions evaluated.

## Numerical experimentation and results

The results of numerical experiments are presented in this section for solving Thomas–Fermi equation by taking five scenarios based on the size of input interval, while in each scenario three cases are taken with different values of the step size parameter. The scenarios with different cases are given as follows:

### Scenario 1

Study the dynamics of TFE for input span $$t \in [0,\,\,1]$$ with cases 1, 2 and 3 based on step size parameter h = 0.1, 0.05, and 0.02, respectively. Mathematically the model Eq. (1) for this scenario along with related boundary condition is given as:

\begin{aligned} & y''(t) - t^{ - 1/2} \left( {y(t)} \right)^{3/2} = 0, \quad \text{Re} \,t \in [0,\,\,1], \hfill \\ & y(0) = 1,\,\,\,\,\hat{y}(1) = 1 \hfill \\ \end{aligned}
(18)

### Scenario 2

In this scenario, TFE for input span $$t \in [0,\,\,5]$$ with cases 1, 2 and 3 based on step size parameter h = 0.5, 0.25, and 0.1, respectively is taken and mathematically is given as:

\begin{aligned} & y''(t) - t^{ - 1/2} \left( {y(t)} \right)^{3/2} = 0, \quad \text{Re} \,t \in [0,\,\,5], \hfill \\ & y(0) = 1,\,\,\,\,\hat{y}(5) = 0 \hfill \\ \end{aligned}
(19)

### Scenario 3

TFE (1) for input span $$t \in [0,\,\,25]$$ with cases 1, 2 and 3 based on step size parameter h = 2.5, 1.25, and 0.5, respectively is taken in this scenario and it is written as:

\begin{aligned} & y''(t) - t^{ - 1/2} \left( {y(t)} \right)^{3/2} = 0, \quad \text{Re} \,t \in [0,\,\,25], \hfill \\ & y(0) = 1,\,\,\,\,\hat{y}(25) = 0 \hfill \\ \end{aligned}
(20)

### Scenario 4

Study the dynamics of Thomas–Fermi model for relatively larger input span $$t \in [0,\,\,50]$$ with cases 1, 2 and 3 based on step size parameter h = 5.0, 2.5, and 1.0, respectively. Mathematically the model Eq. (1) for this scenario is given as:

\begin{aligned} & y''(t) - t^{ - 1/2} \left( {y(t)} \right)^{3/2} = 0, \quad \text{Re} \,t \in [0,\,\,50], \hfill \\ &y(0) = 1,\,\,\,\,\hat{y}(50) = 0 \hfill \\ \end{aligned}
(21)

### Scenario 5

Solution of TFE is analyzed for larger input span $$t \in [0,\,\,100]$$ with cases 1, 2 and 3 based on step size parameter h = 10.0, 5.0, and 2.0, respectively. Mathematically the model Eq. (1) for this scenario is written as:

\begin{aligned} & y''(t) - t^{ - 1/2} \left( {y(t)} \right)^{3/2} = 0, \quad \text{Re} \,t \in [0,\,\,100], \hfill \\ & y(0) = 1,\,\,\,\,\hat{y}(100) = 0 \hfill \\ \end{aligned}
(22)

Design methodology is applied to obtain the solution of Thomas–Fermi equation for all three cases of each scenario as per procedure given in the last section. Fitness function as given in Eq. (17) for inputs $$t \in [0,\,\,1]$$ with step size h = 0.1, 0.05, 0.02 i.e., N = 10, 20, 50, for cases 1, 2 and 3, are formulated, respectively as:

$$O_{R} = \sqrt {\left( {R_{err} (1)} \right)^{2} + \sum\limits_{i = 2}^{8} {\left( {R_{err} (i)} \right)^{2} + \left( {R_{err} (9)} \right)^{2} ,} }$$
(23)
$$O_{R} = \sqrt {\left( {R_{err} (1)} \right)^{2} + \sum\limits_{i = 2}^{18} {\left( {R_{err} (i)} \right)^{2} + \left( {R_{err} (19)} \right)^{2} ,} }$$
(24)
$$O_{R} = \sqrt {\left( {R_{err} (1)} \right)^{2} + \sum\limits_{i = 2}^{48} {\left( {R_{err} (i)} \right)^{2} + \left( {R_{err} (49)} \right)^{2} ,} }$$
(25)

Accordingly, fitness functions $$O_{R}$$ are developed for all three cases of scenarios 2–5.

Optimization of fitness function $$O_{R}$$ for each case of all five scenarios are carried out with the help of a hybrid computing approach based on GA-SQP in case of 100 independent runs using parameter settings as listed in Tables 1. Optimization output plots for the fitness function $$O_{R}$$ by GAs in terms of fitness values, current best chromosome, fitness scaling, selection, average distance between the individuals, best, mean and worst scores are shown in Fig. 2 for the case 1 of scenario 1. Accordingly, for the same case optimization plots of SQP algorithms in terms of current best point, function counts, learning curves, constraints violation, step size parameter, and first-order optimality, are given in Fig. 3. Similarly the optimization outputs for other cases are determined and results obtained with one of the runs of GA-SQP algorithms for each case of scenarios 1 and 2, are presented in Fig. 4, along with the values of fitness plotted against 100 independent runs of the GA-SQP algorithm. The fitness values are plotted on a semi-log scale in order to observe the small variation in the results. Accordingly, results of proposed solutions for all three cases of 3, 4 and 5 scenarios are given in Fig. 5, while result of statistical analysis are plotted in Fig. 6 for each scenario. In case of Fig. 4a the plots of all three cases based on values of step sizes h = 0.1, 0.05 and 0.02 are consistently overlapping. In case of Fig. 4b, it is seen that with the decrease in step size, the value of fitness also decreases, which is due to the fact that with the decreased step size, the discretization of the system using the finite difference scheme based on increased number of nonlinear equations. Consequently, the system becomes stiff with a decrease in step size and hence the solution is determined with less accuracy, generally by all methods. The same inferences and trend have been observed for scenarios 2–5 but the level of matching the results degraded because with more number of mesh points, i.e., for smaller values of h, the smooth results are obtained which is not possible for few mesh points. Additionally, it seems that small variations in the results are observed in each case of all five scenarios in the study, but closely seen reveals that for larger input span the variation in the results is rather more frequent.

The statistical indicator based on the minimum (MIN), mean and standard deviation (STD) values are calculated for 100 independent runs of the proposed scheme for each case of all five scenarios of the problem and results are given in Table 2 for five inputs. While in Tables 3 and 4 the statistical indices are given for more intermediate inputs to analyze dynamics of the problem for few selected cases and scenarios of TFE. From the values presented in these tables, no noticeable difference is apparently observed between the MIN and mean values because of very small values of STD for each case of all five scenarios. Additionally, it is seen that from smaller input span t [0, 1] to larger inputs t [0, 100], the values of STD degraded but still remains of the order of 10−09, which established the consistency of the proposed methodology for solving TFE.

Comparative study for the proposed solution of TFE is made with the results of existing techniques based on Rational Chebyshev PseudoSpectral Method (RCPSM) (Parand and Shahini 2009), Homotopy Analysis Method with Transform Approach (HAMTA) (Khan and Xu 2007), Nonlinear Distribution Homotopy Perturbation Method (NDHPM) (Filobello-Nino et al. 2015), and Variational Iterational Method (VIM) (He 2006). Results of the proposed scheme and reported solutions of RCPSM, HAM, NDHPM and VIM are given in Table 5 for inputs t [0, 5]. It can be seen that trend of the proposed results is aligned with the similar patterns of state of the art numerical and analytical solutions. Moreover, comparison of the results is presented on larger inputs span t [0, 100] in Table 6 for the proposed and reference solver based on HAMTA (Khan and Xu 2007), HAM (Liao 2003b) and Chebyshev PseudoSpectral Method (CPSM) (Kılıçman et al. 2014). The similarity of the proposed solutions is observed for a larger input span of TFE from reference standard results.

### Comparative analysis on global performance operators

Comparative analysis of the results is made on the basis of the mean value of fitness to analyze the accuracy and convergence and in case of examining the complexity operator based on mean time, mean generations and mean function counts are incorporated. The mean and STD values of fitness, time, generations and function counts are given in Table 7 for each case of all five scenarios of TFE. It is seen quite apparently that with the increase in length of input span, i.e., moving from scenario 1 to scenario 5, the accuracy of the algorithms decreases due to the fact that for large input span, handling of nonlinearity and singularity associated with TFE is rather more difficult.

It is seen from the results presented in Table 7 that the values of mean time for optimization of fitness function by GA-SQP algorithm in case of 11, 21, 51 and 101 input grid points are 6 ± 1, 11 ± 1, 22 ± 1, and 50 ± 1 s. While the number of generations is around 440 ± 10, 480 ± 10, 600 ± 20, and 720 ± 25 for 11, 21, 51 and 101 input grid points and respective values for function counts are around 60,950 ± 60, 63,400 ± 200, 76,500 ± 700 and 125,000 ± 14,000. With an increase in the number of grid points, the complexity of the fitness function increases due to which larger values of complexity operator are obtained.

### Conclusions

Although there has been achieved a number of solutions of Thomas–Fermi Equation but the highly impressive potent outcome of our study are summarized by the following concluding remarks:

• A novel design is presented for solving nonlinear singular Thomas–Fermi equation with the help of finite difference method for discritization of problem and resultant system of nonlinear equations are solved by exploiting the strength of bio-inspired computing technique based on genetic algorithms hybrid with sequential quadratic programming.

• Design scheme is applied to a number of variants of Thomas–Fermi equations by taking different input spans to probe the solution of the problem and it is found that the given scheme is equally reliable and effective for both small and large inputs intervals.

• To draw concrete inferences of the proposed scheme, statistical analysis is performed for a sufficient large number of independent executions of the algorithm and consistently getting similar values of statistical operators with small values of STD establishes the acceptability of the scheme.

• Comparison of the proposed approximate solutions with the reported results of the state of the art numerical and analytical solvers demonstrate that the given scheme is an accurate, viable and preferable alternate platform for studying the dynamics of Thomas–Fermi equation based on artificial intelligence techniques.

• Comparison of the results on the basis of mean values of residual error or fitness function shows that for wider input span the performance of the proposed scheme is slightly degraded but still achieving the values of fitness of the order 10−09.

• Computational complexity of the proposed scheme is examined through an average values of time, generations and function counts being consumed by GA-SQP algorithm for optimization of fitness functions and it is found that with increase in the number of grid points, the values of complexity operators are on the higher side because in these cases more computational drive is required for solving the decretization model of the equation.

• Beside the consistent accuracy and convergence, other perks of the proposed scheme are simplicity of the concept, easy implementation and a good alternate avenue to be exploited for solving the nonlinear and singular problems for which the conventional methodologies fail.

In future, present research may prove to be a beacon for researchers working in the domain of application of artificial intelligence techniques to stiff problems arising in physical models of practical importance.

## References

• Aalaei A, Kayvanfar V, Davoudpour H (2015) A multi-objective optimization for preemptive identical parallel machines scheduling problem. Comput Appl Math 1–21. doi:10.1007/s40314-015-0298-0

• Abo-Hammour ZE, Alsmadi O, Momani S, Abu Arqub O (2013) A genetic algorithm approach for prediction of linear dynamical systems. Math Probl Eng 2013:831657. doi:10.1155/2013/831657

• Abo-Hammour Z, Arqub OA, Alsmadi O, Momani S, Alsaedi A (2014a) An optimization algorithm for solving systems of singular boundary value problems. Appl Math Inf Sci 8(6):2809

• Abo-Hammour ZS, Samhouri AD, Mubarak Y (2014b) Continuous genetic algorithm as a novel solver for Stokes and nonlinear Navier Stokes problems. Math Problems Eng 2014:649630. doi:10.1155/2014/649630

• Abu Arqub O, Abo-Hammour Z, Momani S, Shawagfeh N (2012) Solving singular two-point boundary value problems using continuous genetic algorithm. Abstr Appl Anal 2012:205391. doi:10.1155/2012/205391

• Abu Arqub O, Abo-Hammour Z, Momani S (2014) Application of continuous genetic algorithm for nonlinear system of second-order boundary value problems. Appl Math 8(1):235–248

• Amore P, Boyd JP, Fernández FM (2014) Accurate calculation of the solutions to the Thomas–Fermi equations. Appl Math Comput 232:929–943

• Arqub OA, Abo-Hammour Z (2014) Numerical solution of systems of second-order boundary value problems using continuous genetic algorithm. Inf Sci 279:396–415

• Askari EA, Bashiri M (2015) Design of a public bicycle-sharing system with safety. Comput Appl Math 1–19. doi:10.1007/s40314-015-0278-4

• Banerjee B, Constantinescu DH, Rehák P (1974) Thomas-Fermi and Thomas–Fermi–Dirac calculations for atoms in a very strong magnetic field. Phys Rev D 10:2384–2395

• Bayatbabolghani F, Parand K (2014) Using hermite function for solving Thomas–Fermi equation. Int J Math Comput Sci Eng 8(1):73–76

• Bhrawy AH, El-Soubhy SI (2015) Numerical simulation for Thomas–Fermi equation on a semi-infinite interval. J Comput Theor Nanosci 12(11):4719–4723

• Bush V, Caldwell SH (1931) Thomas–Fermi equation solution by the differential analyzer. Phys Rev 38(10):1898

• Caetano C, Reis JL, Amorim J, Lemes M, Pino AD (2011) Using neural networks to solve nonlinear differential equations in atomic and molecular physics. Int J Quantum Chem 111(12):2732–2740

• Chiroma H, Gital AYU, Abubakar A, Usman MJ, Waziri U (2014) May. Optimization of neural network through genetic algorithm searches for the prediction of international crude oil price based on energy products prices. In: Proceedings of the 11th ACM conference on computing Frontiers. ACM

• Chiroma H, Abdulkareem S, Herawan T (2015) Evolutionary Neural Network model for West Texas Intermediate crude oil price prediction. Appl Energy 142:266–273

• Chiroma H et al (2016) Neural networks optimization through genetic algorithm searches: a review. Appl Math Inf Sci (in press)

• Coulson CA, March NH (1950) Momenta in atoms using the Thomas–Fermi method. Proc Phys Soc A 63:367–374

• Dahmani Z, Anber A (2015) Two Numerical Methods for Solving the Fractional Thomas-Fermi Equation. J Interdiscip Math 18(1–2):35–41

• Dasgupta D, Michalewicz Z (eds) (2013) Evolutionary algorithms in engineering applications. Springer Science & Business Media, Berlin

• dos Santos DPS, da Silva Formiga JK (2015) Application of a genetic algorithm in orbital maneuvers. Comput Appl Math 34(2):437–450

• Feng W, Sun S, Sun Y (2015) Existence of positive solutions for a generalized and fractional ordered Thomas-Fermi theory of neutral atoms. Adv Differ Equ 2015(1):350

• Fermi E (1927) Un metodo statistico par la determinzione di alcune Proprieta dell’atome. Rend Accad Naz Sci XL Mem Mat Appl 6:602–607

• Fernández FM (2008) Comment on: “series solution to the Thomas–Fermi equation” [Phys. Lett. A 365 (2007) 111]. Phys Lett A 372(31): 5258–5260

• Fernández FM (2011) Rational approximation to the Thomas–Fermi equations. Appl Math Comput 217(13):6433–6436

• Filobello-Nino U, Vázquez-Leal H, Boubaker K, Sarmiento-Reyes A, Perez-Sesma A, Diaz-Sanchez A, Jimenez-Fernandez VM, Cervantes-Perez J, Sanchez-Orea J, Huerta-Chua J, Morales-Mendoza LJ (2015) Nonlinearities Distribution Homotopy Perturbation Method Applied to Solve Nonlinear Problems: Thomas-Fermi Equation as a Case Study.Journal of Applied Mathematics, 2015

• Grefenstette JJ (2013) Genetic algorithms and their applications: proceedings of the second international conference on genetic algorithms. Lawrence Erlbaum Associates, Hillsdale

• Haupt RL, Haupt SE (2004) Practical genetic algorithms. Wiley, New York

• He J-H (2006) Some asymptotic methods for strongly nonlinear equations. Int J Mod Phys B 20(10):1141–1199

• Holland JH (1975) Adaptation in natural and artificial systems. University of Michigan Press, Ann arbor

• Homayouni SM, Tang SH, Motlagh O (2014) A genetic algorithm for optimization of integrated scheduling of cranes, vehicles, and storage platforms at automated container terminals. J Comput Appl Math 270:545–556

• Khan H, Xu H (2007) Series solution to the Thomas–Fermi equation. Phys Lett A 365(1–2):111–115

• Khan JA, Raja MAZ, Rashidi MM, Syam MI, Wazwaz AM (2015a) Nature-inspired computing approach for solving non-linear singular Emden-Fowler problem arising in electromagnetic theory. Connect Sci 27(04):377–396. doi:10.1080/09540091.2015.1092499

• Khan JA, Raja MAZ, Syam MI, Tanoli SAK, Awan SE (2015b) Design and application of nature inspired computing approach for non-linear stiff oscillatory problems. Neural Comput Appl 26(7):1763–1780. doi:10.1007/s00521-015-1841-z

• Kılıçman A, Hashim I, Kajani MT, Maleki M (2014) On the rational second kind Chebyshev pseudospectral method for the solution of the Thomas-Fermi equation over an infinite interval. J Comput Appl Math 257:79–85

• Kirzhnits DA (1957) Quantum corrections to the Thomas-Fermi equation. Soviet Phys JETP 5:1–12

• Kumar M, Husian M, Upreti N, Gupta D (2010) Genetic algorithm: review and application. Int J Inf Technol Knowl Manag 2(2):451–454

• Liao S (2003a) An explicit analytic solution to the Thomas–Fermi equation. Appl Math Comput 144(2):495–506

• Liao S (2003b) Beyond perturbation–introduction to the homotopy analysis method. Chapman & Hall/CRC, Boca Raton

• Liu C, Zhu S (2015) Laguerre pseudospectral approximation to the Thomas–Fermi equation. J Comput Appl Math 282:251–261

• Mall S, Chakraverty S (2013) Comparison of artificial neural network architecture in solving ordinary differential equations. Adv Artif Neural Syst 2013:12

• Mall S, Chakraverty S (2014) Chebyshev Neural Network based model for solving Lane–Emden type equations. Appl Math Comput 247:100–114

• Mall S, Chakraverty S (2015) Numerical solution of nonlinear singular initial value problems of Emden–Fowler type using Chebyshev Neural Network method. Neurocomputing 149:975–982

• March NH (1952) Thomas–Fermi fields for molecules with tetrahedral and octahedral symmetry. Proc Camb Philos Soc 48:665–682

• March NH (1957) The Thomas–Fermi approximation in quantum mechanics. Adv Phys 6:1–101

• March NH (1983) Origins-the Thomas–Fermi theory. In: Lundqvist S, March NH (eds) Theory of the inhomogeneous electron gas. Plenum Press, New York, London

• March NH, Tomishina Y (1979) Behaviour of positive ions in extremely strong magnetic fields. Phys Rev D 19:449–450

• Momani S, Abo-Hammour ZS, Alsmadi OMK (2016) Solution of inverse kinematics problem using genetic algorithms. Applied Mathematics & Information Sciences 10(1):225

• Parand K, Shahini M (2009) Rational Chebyshev pseudospectral approach for solving Thomas–Fermi equation. Phys Lett A 373(2):210–213

• Parand K, Dehghan M, Pirkhedri A (2013a) The Sinc-collocation method for solving the Thomas–Fermi equation. J Comput Appl Math 237(1):244–252

• Parand K, Roozbahani Z, Bayat Babolghani F (2013b) Solving nonlinear Lane–Emden type equations with unsupervised combined artificial neural networks. Int J Ind Math 5(4):355–366

• Parand K, Ghaderi A, Delkhosh M, Yousefi H (2016) A new approach for solving nonlinear Thomas–Fermi equation based on fractional order of rational Bessel functions. arXiv preprint arXiv:1606.07615

• Parand K, Yousefi H, Delkhosh M, Ghaderi A (2016b) A novel numerical technique to obtain an accurate solution to the Thomas–Fermi equation. Eur Phys J Plus 131(7):1–16

• Raja MAZ (2014a) Stochastic numerical techniques for solving Troesch’s Problem. Inf Sci 279:860–873. doi:10.1016/j.ins.2014.04.036

• Raja MAZ (2014b) Solution of the one-dimensional Bratu equation arising in the fuel ignition model using ANN optimised with PSO and SQP. Connect Sci 26(3):195–214. doi:10.1080/09540091.2014.907555

• Raja MAZ, Samar R (2014) Numerical treatment for nonlinear MHD Jeffery–Hamel problem using neural networks optimized with interior point algorithm. Neurocomputing 124:178–193. doi:10.1016/j.neucom.2013.07.013

• Raja MAZ, Samar R, Rashidi MM (2014) Application of three unsupervised neural network models to singular nonlinear BVP of transformed 2D Bratu equation. Neural Comput Appl 25:1585–1601. doi:10.1007/s00521-014-1641-x

• Raja MAZ, Samar R, Haroon T, Shah SM (2015a) Unsupervised neural network model optimized with evolutionary computations for solving variants of nonlinear MHD Jeffery–Hamel problem. Appl Math Mech 36(12):1611–1638. doi:10.1007/s10483-015-2000-6

• Raja MAZ, Manzar MA, Samar R (2015b) An efficient computational intelligence approach for solving fractional order Riccati equations using ANN and SQP. Appl Math Model 39:3075–3093. doi:10.1016/j.apm.2014.11.024

• Raja MAZ, Khan JA, Behloul D, Haroon T, Siddiqui AM, Samar R (2015c) Exactly satisfying initial conditions neural network models for numerical treatment of first Painlevé equation. Appl Soft Comput 26:244–256. doi:10.1016/j.asoc.2014.10.009

• Raja MAZ, Farooq U, Chaudhary NI, Wazwaz AM (2016a) Stochastic numerical solver for nanofluidic problems containing multi-walled carbon nanotubes. Appl Soft Comput 38:561–586. doi:10.1016/j.asoc.2015.10.015

• Raja MAZ, Samar R, Alaidarous ES, Shivanian E (2016b) Bio-inspired computing platform for reliable solution of Bratu-type equations arising in the modeling of electrically conducting solids. Appl Math Model 40(11):5964–5977. doi:10.1016/j.apm.2016.01.034

• Raja MAZ, Khan JA, Chaudhary NI, Shivanian E (2016c) Reliable numerical treatment of nonlinear singular Flierl–Petviashivili equations for unbounded domain using ANN, GAs, and SQP. Appl Soft Comput 38:617–636. doi:10.1016/j.asoc.2015.10.017

• Raja MAZ, Shah FH, Ahad A, Khan NA (2016d) Design of bio-inspired computational intelligence technique for solving steady thin film flow of Johnson–Segalman fluid on vertical cylinder for drainage problem. J Taiwan Inst Chem Eng 60:59-75. doi:10.1016/j.jtice.2015.10.020

• Shirazi A, Mazinan AH (2015) Mathematical modeling of spacecraft guidance and control system in 3D space orbit transfer mission. Comput Appl Math 1–15. doi:10.1007/s40314-015-0290-8

• Thomas LH (1927) The calculation of atomic fields. Proc Camb Philos Soc 23:542–548

• Toledo CFM, Oliveira L, França PM (2014) Global optimization using a genetic algorithm with hierarchically structured population. J Comput Appl Math 261:341–351

• Umeda K, Tomishina Y (1955) On the influence of the packing on the atomic scattering factor based on the Thomas-Fermi theory. J Phys Soc Jpn 10:753–758

• Yao B (2008) A series solution to the Thomas–Fermi equation. Appl Math Comput 203(1):396–401

• Ying R, Kalman G (1989) Thomas–Fermi model for dense plasmas. Phys Rev A 40:3927–3950

• Yuxin Z, Shenghong L, Feng J (2015) Overlapping community detection in complex networks using multi-objective evolutionary algorithm. Comput Appl Math 1–20. doi:10.1007/s40314-015-0260-1

• Zhao Y, Lin Z, Liu Z, Liao S (2012) The improved homotopy analysis method for the Thomas–Fermi equation. Appl Math Comput 218(17):8363–8369

## Authors’ contributions

All the authors, i.e., MAZR, AZ, AUK, and AMW contributed towards the main idea, structure, organization of the article. The simulation works in Mathematica and Matlab softwares is carried out but MAZR and AUK. All the authors, i.e., MAZR, AZ, AUK, and AMW contributed equally in the write-up of the paper, while necessary reviews/correction/checking has been carried out by AZ and AMW. All authors read and approved the final manuscript.

### Competing interests

The authors declare that they have no competing interests.

## Author information

Authors

### Corresponding author

Correspondence to Muhammad Asif Zahoor Raja.

## Rights and permissions 