1 Introduction

A singular and nonlinear model is widely used in atomic physics represented with a governing second-order ODE known as Thomas–Fermi equation (TFE) that is mathematically expressed as:

$$y^{\prime \prime } - \frac{1}{\sqrt x }y^{\frac{3}{2}} = 0,$$
(1)

along with the corresponding boundary conditions:

$$y\left( 0 \right) = 1,y\left( \infty \right) = 0.$$
(2)

Nonlinear singular models appear extensively in the major areas of physics, such as Astrophysics [1] for modeling the stellar structure of stars, models of energy analysis in plasma physics [2], investigating scattering factors of atoms in crystals [3], circular membrane theory models [4, 5], oxygen diffusion problems [6], nonlinear models in biophysics for the conduction of heat in human brain [7,8,9] and the models in atomic physics for the electrical potential theory in atoms [10, 11], in molecules [12] and atoms in strong magnetic fields [13, 14], respectively. Due to the vast use of the TFE, a variety of analytical and deterministic numerical solvers have been used, in past, to approximate the extreme problems of singularity and nonlinearity. The deterministic collocation methods recently developed for approximating the solution of TFE include sinc-collocation method [15], Hermite polynomials-based collocation method [16] and exponentials-based spectral method [17]. Also numerical methods with Laguerre pseudo-spectral approximation method [18], optimal homotopy asymptotic method [19], rational Chebyshev pseudo-spectral method [20], Pade-Hankel method [21] and homotopy perturbation method [22] have been employed to approximate solution. However, these deterministic methods are serial in nature and computationally costly.

On the other hand, exponential functions have been useful to find the solutions in optical and quantum electronics [23,24,25,26,27]. The use of exponential functions also has profound application in finding approximate solutions for Thomas–Fermi equation [28]. They used coupled polynomials and exponential basis. Furthermore, the analysis method with exponential functions and difference approximation has been used to find approximations of the solution. Also the nonlinear algebraic system derived from the Exponential Polynomial method [29] can be solved using the minimization methods. However, the convergence rate is slow for less number of base functions and a wide range of parameters defining the basic set are needed to attain high accuracy.

Stochastic solvers based on finite difference scheme for discretizing the input domain and using artificial neural networks [30, 31] have been used for converting the solution to a minimization problem. Many use hybrid GA with quadratic sequential programming to achieve quick convergence. Recent applications of stochastic solvers including solution of ordinary differential equations are GA-optimized Taylor series matrix method and neural networks [32, 33].

The genetic algorithm is a random-based classical evolutionary algorithm. In order to find a solution using the GA, random changes are applied to the current solutions to generate new ones. Note that GA is called simple GA (SGA) when simple operators such as Selection, Crossover and Mutation are used as opposed to Elite, Hybrid and Complex operators making Elite, Hybrid and Complex Gas, respectively.

Genetic algorithms have many advantages over the traditional methods as it progresses from a population of candidate solutions instead of a single value which reduces the likelihood of finding a local optimum instead of the global optimum. Genetic algorithms do not require extra information (such as derivatives) that is unrelated to the values of the possible solutions themselves. The only mechanism that guides their search is the fitness value of the candidate solutions. This allows them to work when the search space is noisy, nonlinear and derivatives do not even exist. Furthermore, genetic algorithm (GA) does not require the selection of initial points existing in the traditional algorithms. The mutation operator is used in GAs to force the algorithm to explore and search fully the variables [34, 35].

Optimization techniques like differential evolution (DE) have weak exploitation capability for mutation selection, whereas Cuckoo Search (CS) method easily falls into the local optimal solution and has the slow rate of convergence [36, 37]. Moreover, particle swarm optimization (PSO) algorithm is sensitive to the choice of initial population and the global optimum in it depends extremely on the initial values of the control parameters [38].

Genetic algorithm can optimize various problems such as discrete functions, multi-objective problems and continuous functions. It provides answers that improve over time. Thus GAs are not only used for discontinuous functions but also for continuous search spaces. Furthermore, its advantage is that even though the function might be continuous, the coding will still discretize the search space. Besides that, a discrete or discontinuous function can also be controlled with no extra burden. Genetic algorithm operators make use of the resemblances in string structures to make an effective search. The expected genetic algorithm solution is the global solution because more than one string has been processed. Genetic algorithm emphasizes the good information that are found previously by using reproductive operator and propagates adaptively through mutation and crossover operators. By using population-based search algorithm, genetic algorithm will reduce the workload to apply the same algorithm many times because multiple optimal solutions can be captured easily in the population. We have preferred GAs for its excellent parallel capabilities, best global searches, fast convergence, robust solutions and independence of solution from initial guess [34].

In the present work, a new computing model exploiting the strength of GA and exponential collocation is being reported for solution of the Thomas–Fermi model of the atom. Exponential convergence is expected to achieve with less number of exponential basis function. The innovative features of the proposed scheme are:

  • A Genetic Exponential Collocation Algorithm (GECA) has been used to tackle nonlinearity and fractional singularity in TFE.

  • Fitness function constitutes of coupled set of algebraic equations at the collocation points.

  • The exponential collocation is hybridized with GA, and solution is obtained by minimization of the residual error.

  • Simulations have been conducted to find the best set of operators for the solution of TFE.

  • Robustness and stability analysis is done using results of minimum (MIN), mean, standard deviation (STDV) and mean residual error (MRE).

  • Comparison of measured solution from GECA program is carried out with the existing techniques.

Section 2 of the paper deals with a brief introduction and description of the Thomas–Fermi model based on nonlinear singular system of ODE. The proposed methodology with GAs is also presented in Sect. 2. In Sect. 3, GECA-based optimization is discussed with simulation results and the graphical abstract of the obtained solution. The statistical analysis of the results of numerical experimentation for Thomas–Fermi model with appropriate graphical and numerical illustrations is also given in Sect. 3. Finally concluding remarks are presented in the last section.

2 The GECA scheme for Thomas–Fermi equation

This section comprises a brief overview of the Thomas–Fermi model equation for neutral atoms governed by the second-order nonlinear singular ordinary differential equation, along with the proposed solution, collocation-based discretization procedure and adapted heuristic Genetic Algorithm optimization scheme. The overall method is given as Fig. 1.

Fig. 1
figure 1

The proposed methodology for solution of Thomas–Fermi equation

2.1 Thomas–Fermi model for neutral atoms

The Thomas–Fermi equation arises in the statistical estimates of various models in atomic physics, astrophysics, solid-state physics and in applied science. The model is a quantum mechanical view of the electronic structure of many electrons system, considering the system as noninteracting gas of electrons. According to energy conservation law each electron possesses a potential energy \(e\emptyset \left( r \right)\), where \(\emptyset \left( r \right)\) is the average potential energy of the nucleus and all other electrons, where all the electrons of an atom are considered to be in satisfying spherically symmetric condition; then, relation for electronic charge density \(\rho \left( r \right)\) with \(\emptyset \left( r \right)\) can be expressed as [39]:

$$\frac{1}{ r}\frac{{d^{2} }}{{dr^{2} }}\left[ {\emptyset \left( r \right)} \right] + 4\pi \rho \left( r \right) = 0$$
(3)

The gas of electrons around the atomic nucleus obeys the Pauli exclusion principle, at the absolute zero of temperature. The maximum electron kinetic energy in a neutral atom is given as [39]:

$$\frac{{\left[ {\rho \left( r \right)} \right]^{2} }}{2m} = e \emptyset \left( r \right).$$
(4)

Here, \(m\) is the mass of an electron. Considering the uniformly distributed gas of electrons the number density of the electrons is given as [39]:

$$n = \frac{{8\pi \rho^{3} }}{{3h^{3} }}$$
(5)

In the above expression \(h\) is a Plank constant. For the total energy to be constant at every point in space the potential energy (r) to depend on the charge density value \(\rho = - en\), thus we get:

$$\rho = - \frac{1}{{3\pi^{2} }}\left( {\frac{2m}{{h^{2} }}} \right)^{3/2} [e \emptyset \left( r \right)]^{3/2}$$
(6)

By using Eq. (3) and Eq. (6) Thomas and Fermi independently derived a differential equation for \(\emptyset \left( r \right)\) given as:

$$\frac{1}{r}\frac{{{\text{d}}^{2} }}{{{\text{d}}r^{2} }}\left[ {r\emptyset \left( r \right)} \right] - \frac{4e}{{3\pi }}\left( \frac{2m}{h} \right)^{3/2} [e\emptyset \left( r \right)]^{3/2} = 0$$
(7)

Equation (7) represents the potential inside a neutral atom having an atomic number \(Z\), and the boundary conditions for the neutral atoms are given as:

$$r\emptyset \left( r \right)~ \to eZ\;{\text{when}}\;r \to 0$$
(8)
$$\emptyset \left( r \right) \to 0\;{\text{when}}\;r \to \infty$$
(9)

Further simplification of Eq. (7) can be done by suitably changing the variables as follows:

$$r = \mu x\;{\text{and}}\;y\left( r \right) = \frac{r\emptyset \left( r \right)}{{eZ}}$$
(10)

where x is dimensionless variable and \(\mu\) is defined as:

$$\mu = \frac{1}{2}\left( {\frac{3\pi }{4}} \right)^{2/3} \frac{{h^{2} }}{{me^{2} }}Z^{ - 1/3} .$$
(11)

Thus Eq. (7) simplifies to the Thomas–Fermi model equation. This model equation in new variables can be written as mentioned in Eqs. (1) and (2).

In this work, we have chosen the right-hand side boundary to be X, where X is taken as 50, 200 and 300, respectively. The complete derivation and description of the steps along with the terms used are given in the literature.

2.2 The proposed solution

The proposed solution of the Thomas–Fermi model for neutral atom is of the form [40, 41]:

$$y\left( x \right) = c_{0} + \mathop \sum \limits_{n = 1}^{b} c_{n} e^{{ - \gamma_{n} x}} , 0 \le x \le X$$
(12)
$$y\left( x \right)^{^{\prime\prime}} = \mathop \sum \limits_{n = 1}^{b} c_{n} \gamma_{n}^{2} e^{{ - \gamma_{n} x}}$$
(13)

where for \(b = 3\), the exponential basis set is given by \(\left\{ { e^{{ - \gamma_{1} x}} , e^{{ - \gamma_{2} x}} , e^{{ - \gamma_{3} x}} } \right\}\) and \(\left( {c_{0} ,c_{1} ,c_{2} ,c_{3} , \gamma_{1} ,\gamma_{2} ,\gamma_{3} } \right)\) are unknown coefficients, respectively. While the solution function value-based adaptive collocation points can be used, it requires dynamic updates during GA iterations. Also, therefore, acceleration in convergence is not assured through adaptive approach. Therefore, we have discretized the input domains using the equally spaced collocation points.

2.3 Collocation-based discretization procedure

Discretization procedure involves the transformation of proposed solution into algebraic system of interrelated equations which are then used to formulate the fitness function. Equation (1) is converted into a set of algebraic equations in the form of exponential basis functions with constants \(\left( {c_{0} ,c_{1} ,c_{2} ,c_{3} } \right)\) and \(\left( {\gamma_{1} ,\gamma_{2} ,\gamma_{3} } \right)\), respectively. The transformation is achieved by substituting in Eq. (1) the solution of the form considered in Eq. (12) and its second derivative \(y^{{\prime \prime }} \left( x \right)\).

After substitution the residual equation is obtained:

$$R = \mathop \sum \limits_{n = 1}^{3} c_{n} \gamma_{n}^{2} e^{{ - \gamma_{n} x}} - \frac{1}{\sqrt x } \left( {c_{0} + \mathop \sum \limits_{n = 1}^{3} c_{n} e^{{ - \gamma_{n} x}} } \right)^{3/2}$$
(14)

Using the left boundary \(y\left( 0 \right) = 1\) in Eq. (12), we get:

$$c_{0} + c_{1} + c_{2} + c_{3} = 1$$
(15)

Placing the right boundary value, \(y\left( X \right) = 0,\) in Eq. (12):

$$c_{0} + c_{1} e^{{ - \gamma_{1} X}} + c_{2} e^{{ - \gamma_{2} X}} + c_{3} e^{{ - \gamma_{3} X}} = 0$$
(16)

2.4 Fitness function formulation

The fitness function requirements are the residual equations that are made by the discretization procedure as discussed above together with the residual equations at the boundary points. The residual equation for discretized input domain is obtained from Eq. (12), and it is given as:

$$R\left( {x_{i} } \right) = \mathop \sum \limits_{n = 1}^{3} c_{n} \gamma_{n}^{2} e^{{ - (x_{i} )\gamma_{n} }} - \frac{1}{{\sqrt {x_{i} } }} \left( {c_{0} + \mathop \sum \limits_{n = 1}^{3} c_{n} e^{{ - \left( {x_{i} } \right)\gamma_{n} }} } \right)^{3/2} .$$
(17)

where \(x_{i} = x_{0} + ih\) for different step sizes of \(h\) as 1.75, 2 and 3, respectively. The residual equations at the boundary points are given as follows:

$$R\left( {x_{0} } \right) = c_{0} + c_{1} + c_{2} + c_{3} - 1$$
(18)
$$R\left( X \right) = c_{0} + c_{1} e^{{ - \gamma_{1} X}} + c_{2} e^{{ - \gamma_{2} X}} + c_{3} e^{{ - \gamma_{3} X}} .$$
(19)

The overall residual function is defined as the norm of the residuals of the whole input domain, and its mathematical form is given as:

$$O_{R} = \sqrt {R\left( {x_{0} } \right)^{2} + \mathop \sum \limits_{i = h}^{X - h} \left( {R\left( {x_{i} } \right)} \right)^{2} + R\left( X \right)^{2} }$$
(20)

Now the fitness function \(O_{R}\) is to be minimized such that the individual errors of each equation decrease and the optimized results are achieved when the value of \(O_{R }\) approaches to zero.

2.4.1 Scenario one (small input domain \(x \in \left[ {0, 50} \right]\))

In this scenario Thomas–Fermi model for neutral atoms is taken with small input domain and is governed by Eq. (21):

$$y^{{\prime \prime }} - \frac{1}{\sqrt x }y^{\frac{3}{2}} = 0, 0 \le x \le 50$$
(21)

The right boundary equation for the scenario one at X = 50.0 will be

$$c_{0} + c_{1} e^{{ - 50\gamma_{1} }} + c_{2} e^{{ - 50\gamma_{2} }} + c_{3} e^{{ - 50\gamma_{3} }} = 0$$
(22)

The input domain is discretized with the step size \(h\) = 3.0, 2.0 and 1.75, respectively.

2.4.2 Scenario two (large input domain \(x \in \left[ {0, 200} \right]\))

In this scenario Thomas–Fermi model for neutral atoms is taken with relatively larger input domain and is governed by Eq. (23):

$$y^{\prime\prime} - \frac{1}{\sqrt x }y^{\frac{3}{2}} = 0\;0 \le x \le 200$$
(23)

The right boundary equation for the scenario two at X = 200 will be

$$c_{0} + c_{1} e^{{ - 200\gamma_{1} }} + c_{2} e^{{ - 200\gamma_{2} }} + c_{3} e^{{ - 200\gamma_{3} }} = 0$$
(24)

The input domain is discretized with the step size h = 3.0, 2.0 and 1.75, respectively.

2.4.3 Scenario three: (larger input domain \(x \in \left[ {0, 300} \right]\))

In this scenario Thomas–Fermi model for neutral atoms is taken with small input domain and is governed by Eq. (25):

$$y^{{\prime \prime }} - \frac{1}{\sqrt x }y^{\frac{3}{2}} = 0\;0 \le x \le 300$$
(25)

The right boundary equation for the scenario three at X = 300.0 will be

$$c_{0} + c_{1} e^{{ - 300\gamma_{1} }} + c_{2} e^{{ - 300\gamma_{2} }} + c_{3} e^{{ - 300\gamma_{3} }} = 0$$
(26)

The input domain is discretized with the step size h = 3.0, 2.0 and 1.75, respectively.

2.5 Genetic algorithm (GA)

The GECA scheme is designed by altering the variants involved in GA process, and the performance of each scheme is tested on the basis of fitness value achieved for the three case scenarios. The overall scheme adapted in this work is demonstrated in the form of flow chart as shown in Fig. 1.

2.5.1 Initial phase

Initial matrix \(\left( {p \times r} \right)\) of \(p\) number of chromosomes (solution set) of the GA is created by randomly bound numbers containing genes equal to a number of unknown variables \(r\) in the operation of the residual function. Here each chromosome represents the discretization points of collocation scheme. This matrix will form the first population of the solution.

2.5.2 Fitness evaluation phase I

The value of fitness \(O_{R}\) is determined for each chromosome \(p\) of the population matrix using Eq. (20). Chromosomes of the population matrix are positioned according to the minimum value of fitness \(O_{R}\) achieved. Chromosomes with minimum fitness value are superiorly ranked contrary to those with comparatively larger fitness values.

2.5.3 Reproduction phase

The essential steps of reproduction phase of genetic algorithm are as follows:

  • Selection The population for the next generation is produced by recombination of chromosomes. The recombination process takes place through mutations in the parent's crossover and chromosome.

  • Crossover New off-springs are made by combining selected genes from a pair of existing chromosomes.

  • Mutation A random change in the genes of an individual chromosome to produce a new off-spring and prevent the solution from being trapped in the local minima.

2.5.4 Fitness evaluation phase II

In phase II of fitness evaluation, the fitness value of the population processed through the reproduction phase is evaluated and then the individuals with best fitness value are selected for further processing.

2.5.5 Termination

The execution of program is performed until any one-off stopping criteria are satisfied. The stopping criterions are as follows:

  • Maximum generations limit is reached.

  • Stagnation: The value of fitness does not improve for user-defined limit for consecutive generations

  • Convergence: The required fitness value is obtained.

The algorithm has been coded in MATLAB R2017a, and the simulations were performed on Intel (R) Core (TM) i7-10,700 CPU 2.90 GHz machine having 8 GB inbuilt RAM and 64-bit operating system. The computational time for the execution of these schemes is approximately 18–20 s.

3 Experimental results and discussion

In the present research study, four variants of GECA scheme, GECA1, GECA2, GECA3 and GECA4, respectively, are tested for optimization. The initial population matrix for five variables is 100 × 5 and 200 × 5 which are selected by test and trial methods. The operators chosen in each GECA scheme are given in Table 1.

Table 1 Operators settings of GECA variants

The selection function chooses parents for the next generation based on their scaled values from the fitness scaling function. One of the selection operator is stochastic uniform operator which lays out a line in which each parent corresponds to a section of the line of length proportional to its expectation. The algorithm moves along the line in steps of equal size, one step for each parent. At each step, the algorithm allocates a parent from the section it lands on. However, uniform operator selects parents at random from a uniform distribution using the expectations and number of parents. This results in an undirected search. Among different types of crossovers, heuristic and arithmetic operators are employed in this work. Heuristic operator creates children that randomly lie on the line containing the two parents, whereas arithmetic operator creates children that are a random arithmetic mean of two parents, uniformly on the line between the parents. For mutation we have selected uniform and adaptive feasible operators in this work. Uniform mutation is a two-step process. First, the algorithm selects a fraction of the vector entries of an individual for mutation, where each entry has the same probability as the mutation rate of being mutated. In the second step, the algorithm replaces each selected entry by a random number selected uniformly from the range for that entry. Adaptive feasible mutation randomly generates directions that are adaptive with respect to the last successful or unsuccessful generation. A step length is chosen along each direction so that linear constraints and bounds are satisfied.

The parameter settings of these GECA schemes are presented in Table 2. As indicated in the recent literature, the parameter space appears to have abundant viable solutions for meta- or hyper-parameters [42]. The values of these hyper-parameters have been found through random search technique in various trial runs.

Table 2 Parameters settings of all GECA schemes

3.1 Performance analysis of GECA variants

The fitness value is evaluated at each GECA scheme for 100 independent runs. Figure 2 shows the variations in fitness values of four different GECA schemes keeping 200 collocation points and step size \(h = 3\) for 100 and 200 population size, respectively. The results obtained by four variants of GECA scheme are listed in Table 3. It can be observed that the fitness value achieved at population size of 100 for GECA1 scheme is 0.001113 to 0.076353, 0.000407 to 0.01066 and 0.000209 to 0.007527, for GECA2 scheme the fitness value ranges 0.000129 to 0.00064353, 0.000105697 to 0.000937365 and 0.00010579 to 0.001092, for GECA3 scheme the fitness value comes in the range of 0.00034 to 0.01486, 0.000811 to 0.013457 and 0.000209 to 0.013457 and for GECA4 scheme the range of obtained fitness value is 0.000835 to 0.01066, 0.00114 to 0.013074 and 0.000407 to 0.003827 for scenario1, scenario2 and scenario 3, respectively. Since each scheme of GECA is initially tested for same number of collocation points and same step size, these values are not normalized with the collocation points. It is evident that the fitness values obtained in Fig. 2 will further decrease by a factor of 200 when normalized with the collocation points.

Fig. 2
figure 2

Variation of fitness value for 100 independent runs of GECA1, GECA2, GECA3 and GECA4 schemes, respectively, for optimization

Table 3 Fitness value for 100 independent runs of four schemes for optimization

The fitness value is least for the GECA2 configuration; also the variation range of the fitness is very small for GECA2 scheme compared with all the other configurations. Similarly at the population size of 200 for GECA1 scheme the fitness values are in the range of 0.000797 to 0.002614, 0.000209 to 0.001844 and 0.000711 to 0.003798, for GECA2 scheme the fitness value ranges 0.000126096 to 0.00115629, 0.00010567 to 0.0001915 and 0.000105672 to 0.00115492, respectively, for GECA3 scheme the fitness value comes in the range of 0.000778 to 0.01064, 0.000835 to 0.00403 and 0.000949 to 0.013457 and for GECA4 the range of obtained fitness value is 0.00056 to 0.004257, 0.00114 to 0.004944 and 0.001167 to 0.01486 for scenario1, scenario2 and scenario3, respectively. The fitness value is least for the GECA2 with a small variation range.

The comparison for the two different population size confirms that the fitness value is smaller at the 200 population size for GECA2 scheme, and also there are very small fluctuations appearing in the fitness value for 100 independent runs. Therefore, we can conclude that GECA2 scheme is a promising configuration to be applied to approximate the solution of TFE. Also, population size has a slight effect on the fitness value obtained for all the configurations. Therefore, owing to the least fitness achieved by GECA 2 scheme at the population size of 200 it is selected for further simulations and the solution of TFE. The solution of TFE is approximated for three case scenarios by using GECA2 scheme and is given in Fig. 3. It is safe to say that the expressions obtained using exponential collocation method can be linked to underlying physical processes only vaguely. To support this, we submit the nonexistence of general analytical solutions. However, Fig. 3 shows the solution monotonically decreases with the increase in the collocation points for different values of h at different rates. Further evaluation of the fitness for GECA2 scheme under three case scenarios for 100 discrete runs is done at three different step sizes \(\left( {h = 1.75, h = 2\;{\text{and}}\;h = 3} \right)\) keeping population size of 200. The corresponding results are shown in Fig. 4. Fitness value obtained for step size \(h = 1.75\) varies from 0.00293531 to 0.00409721, 0.00291678 to 0.004097340 and 0.002935320 to 0.004097210 for scenario1, scenario2 and scenario3, respectively. Fitness value obtained for step size \(h = 2\) varies from 9.984830E-04 to 0.003048210, 9.931850E-04 to 0.003048450 and 9.98483E-04 to 0.003048210 for scenario1, scenario2 and scenario3, respectively. Fitness value obtained for step Fig. 3 size \(h = 3\) varies from 1.056720E-04 to 1.1549E-03, 1.260960E-04 to 1.1562E-03 and 1.056720E-04 to 1.1549E-03 for scenario1, scenario2 and scenario3, respectively. It can be seen here that fitness value for step size of \(h = 1.75\) is of the order of 10–3, whereas for step size of \(h = 2\) and \(h = 3\) the fitness achieved is on the order of 10–4. Furthermore, it was observed that the fitness is more stable at the step size of \(h = 3\) and after certain step size it becomes independent of collocation points.

Fig. 3
figure 3

Solution of Thomas–Fermi equation for all three different scenarios for GECA2 configuration

Fig. 4
figure 4

Fitness value of all three scenarios at step sizes of 1.75, 2 and 3 for GECA2 scheme

3.2 Statistical comparative analysis

Performance of the designed exponential collocation technique, optimized with GECA2 scheme, is examined by means of mean residual error (MRE) and standard deviation (STDV). MRE is defined as \({\text{MRE}} = \frac{1}{N}\mathop \sum \nolimits_{k = 1}^{N} \left| {y_{k}^{^{\prime\prime}} - x_{k}^{ - 1/2} \left( {y_{k}^{3/2} } \right)} \right|\). Results in terms of MRE and STDV magnitudes for multiple discrete runs are plotted in Fig. 5 and Fig. 6, respectively. It is observed that very low magnitudes of these statistical performance indicators are attained consistently for each case scenario, which demonstrate the invariable accuracy of the scheme. It is evident that most of the independent runs achieved MRE values around 10–05 to 10–04, 10–05 to 10–04 and 10–07 to 10–05, respectively. It can also be seen that for each case scenario, least stable values are achieved when number of collocation points are less and input domain values are large. Figure 6 suggests that standard deviation values are maximum around 20 and then starts decreasing, indicating minimum of 20 collocation points is required to find the solution with better accuracy at each step size. The statistics results through the values of mean, minimum (MIN) and STDV for all three scenarios are calculated for 100 discrete runs of the proposed scheme, and results are tabulated in Table 4. The data presented in Table 4 show that no variation between the mean and MIN values as the magnitude of STDV reaches to order of 10–11; also STDV values remain consistently small that exhibits the accuracy of the method for approximating TFE. The results are accurate, having smaller values of the statistical indices that prove consistency in precision and convergence of the proposed methodology.

Fig. 5
figure 5

Mean residual error for all three case scenarios at GECA2 scheme

Fig. 6
figure 6

Standard deviation values for all the three case scenarios for GECA2 scheme

Table 4 Results of statistical indices for the selected case scenarios of TFE at intermediate collocation points for population size = 200

Comparison of proposed solutions with reported results of the deterministic and stochastic numerical problem solving and analysis techniques [19, 30, 31] is given in Table 5. Exact analytical solution for this particular problem of Thomas–Fermi model does not exist. However, semi-analytical solution in the input domain of 0 to 100 has been studied by M. Vasile et.al using Optimal Homotopy Asymptotic Method (OHAM) [19]. The solutions from OHAM, Artificial Neural Network (ANN) [31] and Finite Difference Scheme (FDS) [30] are used as reference solutions. Generally, the proposed solution through GECA scheme falls in close proximity of previously reported solutions through numerical and analytical solvers. It indicates that the proposed technique is one of the most intuitive, efficient and preferred platforms for the study of the power of Thomas–Fermi equation.

Table 5 Comparison of the proposed solutions with existing deterministic and stochastic solvers

Comparative analysis of the results is made on the basis of the mean value of fitness to analyze the accuracy and convergence. The mean and STDV values of fitness are given in Table 4 for each case of all scenarios of TFE. The previously reported works of M.A. Z. Raja et.al [30] utilizing bio-inspired heuristic integrated with sequential quadratic programming were giving effective results for small input domains. FDS gave solutions for small input domains of [0–1], [0–5], [0–25], [0–50] and large input domains of [0–100], respectively, whereas ANN technique was used for the input domains of [0–20] and [0–200], respectively. Both of these techniques gave good results for small input domains. The standard deviation obtained by FDS was approximately 10–11 for small input domains, whereas it was 10–05 for large input domains. Similarly the magnitude of standard deviation was of the order of 10–06. Moreover, by increasing the input spans the accuracy of the FDS and ANN schemes decreased due to inherent nonlinearity and singularity of the Thomas–Fermi system. The technique proposed in our work based on Genetic Exponential Collocation Algorithm (GECA) gives solutions with higher accuracy for both small and large input domains. We have further extended our work for input domains of [0–300], which was not previously achieved by other researchers, with very small standard deviation of 10–14 as shown in Fig. 4, indicating higher accuracy of GECA.

4 Conclusions

A genetic exponential collocation algorithm is developed in the present study for the domains of boundaries ranging from 0 to 50, 0 to 200 and 0 to 300, respectively, and following conclusions can be drawn from it:

  • The proposed scheme performs well for a series of runs by varying step size and input range for multiple independent runs demonstrating good convergence and robustness.

  • Statistical analysis illustrates the stability of our hybrid approach with STDV and MRE reaches to 10–11 and 10–6, respectively.

  • The solutions achieved by the proposed GECA scheme are in good agreement with already published results employing deterministic and stochastic methods for the boundary condition x = 0 to 50 and x = 0 to 200.

  • The proposed technique is extended for x = 0 to 300 with good convergence.

  • It is inferred in this work that the developed technique is robust, reliable and efficient.

  • The effectiveness of the proposed scheme is demonstrated by consistently obtaining the optimal values of the statistical performance indices for multiple runs.

The proposed method can also incorporate Genetic Programming (GP). Therefore, GP optimizes the structure of a model in addition to coefficients. Therefore, variables appearing in the model equation can be randomized using GP [43]. This work can be extended using GP for future studies.