# A new algorithm for solving the nonlinear Lane–Emden equations arising in astrophysics

- 87 Downloads

**Part of the following topical collections:**

## Abstract

Hybrid orthonormal Bernstein and block-pulse function wavelet method for many phenomena in mathematical physics and astrophysics is considered. We use a fundamental administrator and convert Lane–Emden conditions into necessary conditions. The upsides of utilizing the proposed strategy are introduced. At that point, an effective error estimation for the proposed technique is additionally presented lastly a few examinations and their numerical arrangements are given; and looking at between the numerical outcomes acquired from alternate strategies, we demonstrate the high exactness and productivity of the proposed strategy. Our method is characterized then the singular equations are transformed to Volterra integro-differential equations. We modify this equations to an algebraic system of equations. The solution to this application is achieved by solving this system and the constructed solutions are on approximation form. The acquired results guarantee the method provides a truncate solution to the Lane–Emden equations.

## Keywords

Hybrid orthonormal Bernstein and block-pulse functions Wavelet method Convergence analysis Lane–Emden equation Gaussian integration Collocation method## 1 Introduction

*y*

_{0},

*y*

_{1}are constants,

*h*(

*x*),

*f*(

*x*,

*y*)are continuous functions.if we take \(f(x,y) = f(y) = y^{n}\) then Eq. (1) is given by:

*f*(

*y*).

For *y*_{0} = 1, this equation is the LEE.

The name of this equation is due to the two astrophysicists Jonathan Lane and Robert Emden [1]. Equation (1) has a singularity at *x *= 0. An effective strategy was established in [5] to modify the Lane–Emden to equivalent Volterra integral equations (VIE) off any order. The VIE in [8], combined with (ADM), to address the singularity issue. This strategy was proven to be reliable and efficient as confirmed in [9]. The physical structure introduced in [10] Many researchers focused to give a truncate solution to these equations and many methods were proposed. A general study has been given in [10] to construct both correct and series solutions to Lane–Emden equations through ADM. In [11, 12, 13, 14, 15, 16, 17, 18] introduced Bernstein, several methods for numerical solutions of VIDE form the unique Emden–Fowler initial value problems. In [19] approach developed to obtain analytical–numerical solutions to two separate Lane–Emden problems. In [20, 21, 22, 23, 24] introduced the exponential transformation to resolve the difficulty of a singular point to solve the LEE.

The paper introduces as. In Sect. 2, we present the properties of the HOBW and the approximation of the function using it. In Sect. 3, We establish that the VIDE is the singular Lane–Emden equation. In Sect. 4, we use HOBW method and its convergence analysis for getting the solution VIDE form of the singular Lane–Emden equation. The efficiency of our method is characterized by solving numerical examples in Sect. 5. Conclusion part is given in Sect. 6.

## 2 The HOBW method and the operational matrix of the integration

### 2.1 Wavelets and the HOBW method

*ψ*(

*x*) called the mother wavelet. In which parameter of dilation

*a*and parameter of a translation

*b*vary continuously.

*a*and

*b*be discrete values such as

*a*=

*a*

_{0}

^{- k},

*b*=

*nb*

_{0}

*a*

_{0}

^{- k},

*a*

_{0}> 1,

*b*

_{0}> 0, where

*n*and

*k*are positive integers, we attain the family of discrete wavelets:

*ψ*

_{k,n}(

*t*) forms a wavelet basis for

*L*

^{2}(

*R*). In particular, when,

*a*

_{0}= 2,

*b*

_{0}= 1, then \(\psi_{k,n} (t)\) forms a basis. Here, \(HOBW_{i,j} (t) = HOBW(k,i,j,t)\) involves four arguments,

*i*= 1, …, 2

^{k−1},

*k*is to be any positive integer,

*j*is the degree of the Bernstein polynomials, and

*t*is the normalized time. They \(HOBW_{i,j} (t)\) are defined on [0, 1) as [11, 12]:

*i*= 1, 2, …., 2

^{k−1},

*j*= 0, 1, …,

*M*− 1 and

*k*is a positive integer. Thus, we attain our new basis as \(\{ {\text{HOBW}}_{1,0} ,{\text{HOBW}}_{1,1} , \ldots ,{\text{HOBW}}_{{2^{k - 1} ,M - 1}} \}\) and any function is truncated with them.

*HOBW*detect orthonormal basis is:

*HOBW*has compact support \([\frac{i - 1}{{2^{k - 1} }},\frac{i}{{2^{k - 1} }}],\,\)

*i*= 1, …., 2

^{k−1}.

### 2.2 Function approximation by the HOBW functions

*y*(

*t*) [10, 11, 12], which is integrable in [0, 1), is truncated by the HOBW method as follows:

*c*

_{ij}calculated as given below:

*y*(

*t*) by a series as follows:

*C*are \((2^{k - 1} )\,(M - 1) \times 1\) vectors given by

*k*(

*x*,

*t*) ∊

*L*[0, 1] as follows:

*K*is a \((2^{k - 1} )\,(M - 1) \times (2^{k - 1} )\,(M - 1)\) matrix that we attain as:

### 2.3 Multiplication of the hybrid functions

We can evaluate \({\text{HOBW}}_{{((2^{k - 1} )\,(M - 1) \times 1)}} (t)\)\({\text{HOBW}}^{T}_{{((2^{k - 1} )\,(M - 1) \times 1)}} (t)\) for VIE of the second kind via the HOBW functions as detailed below.

With the recursive formulas, we calculate \(M_{{((2^{k - 1} )\,(M - 1) \times (2^{k - 1} )\,(M - 1))}} (t)\) for any *k* and *M*.

*k*= 3 and

*M*= 4. Thus, we have

*C*

_{i},

*i*= 0, 1, 2, 3 are 4 × 4 matrices.

*F*(

*x*,

*t*) and \(\frac{dF}{dx}\) are continuous in the domain

*D*in the

*xt*- plane that contains the region

*R*,

*α*≤

*x*≤

*β*,

*t*

_{0}≤

*t*≤

*t*

_{n}and

*a*(

*x*),

*b*(

*x*) are defined functions having continuous derivatives for

*α*≤

*x*≤

*β*. A global Leibniz rule presented modifies VIE to several equations.

## 3 VIDE form the Lane–Emden type

*f*(

*y*)can take any linear or nonlinear forms.

*y*

^{′}(

*x*) in (20) by \(\frac{k}{x}\) and add to

*y*

^{″}(

*x*) in (21) we get Eq. (18). That is the VIDE is the LEE (18) that given by:

The VIE (10)–(11) were proved to be equivalent to the homogenous LEE (18).

*k*→ 1, the integral form of Eq. (19) is

## 4 Application of HOBW method for Lane–Emden in its integrodifferential form

*D*is a \((2^{k - 1} )\,(M - 1) \times (2^{k - 1} )\,(M - 1)\) matrix, and is said the dual matrix of

*HOBW*(

*x*)

*τ*

_{j1}and

*τ*

_{j2}are

*s*

_{1}and

*s*

_{2}zeros of Legendre polynomials \(p_{{s_{1} + 1}} (.)\) and \(p_{{s_{2} + 1}} (.)\) and \(w_{{j_{1} }}\) and \(w_{{j_{2} }}\) are weights. The idea for the above approximation is the exactness of the Gaussian integration formula for polynomials of degree at most 2

*s*

_{1}+ 1 and 2

*s*

_{2}+ 1 Eq. (32) yields \((2^{k - 1} )\,(M - 1)\) nonlinear algebraic equations with the unknowns coefficient matrix C. By using Newton’s method to solve this system, the values of C are obtained and hence we get the solution.

### 4.1 Convergence analysis

In this section, an analysis of the speed of convergence for our numerical method will be obtained.

### **Theorem 1**

*The series solution* \(y_{m} (x) = \sum\limits_{i = 1}^{k} {\sum\limits_{j = 0}^{M} {c_{ij} } {\text{HOBW}}_{ij} (x)} \, = \,C^{T} {\text{HOBW}}(x)\), *where C and* \({\text{HOBB}}(x)\) *are defined in (*6*) converges to y*(*x*) then lim _{m→∞}‖*y*(*x*) − *y*_{m}(*x*)‖_{2} = 0.

### *Proof*

Let \(L^{2} (\Re )\) is the Hilbert space, \(y(x) \in L^{2} [0,1]\) is approximated by HOBW as Eq. (6):

Let \(y(x) \cong \sum\nolimits_{j = 0}^{n} {c_{ij} \,} {\text{HOBW}}_{ij} (x)\) for a fixed *i* be the solution of the Eq. (2) where \(c_{ij} \, = D^{ - 1} \left\langle {y(x),{\text{HOBW}}_{ij} (x)} \right\rangle\)) in which \(\left\langle {.,.} \right\rangle\) denotes the inner product.□

Assume \(HOBW(x) = HOBW(x_{m} )\) and assume \(\delta_{m} = \left\langle {y(x),{\text{HOBW(x}}_{\text{m}} )} \right\rangle\), the sequence of partial sum is \(\left\{ {\sigma_{i} } \right\}\) of \((\delta_{m} {\text{HOBW}}_{{}} (x_{m} ))\) Let \(\left\{ {\sigma_{i} } \right\}\) and \(\left\{ {\sigma_{j} } \right\}\) be the partial sums with \(i \ge j\).

We show that {*σ*_{i}} is a Cauchy sequence in Hilbert space.

Let, \(\sigma_{i} = \sum\limits_{m = 1}^{i} {\delta_{m} {\text{HOBW}}_{{}} (x_{m} )} .\)

*i*→ 0 we have \(\sum\limits_{m = 1}^{\infty } {\left| {\delta_{m} } \right|^{2} } ,\) convergent and hence

*σ*

_{i}} is a Cauchy sequence and it converges to for example w (say). We assert that

The above relation possible only if *y*(*x*) = *σ*. so that *y*(*x*) and *σ*_{i} converges to the same value. It provides the convergence guarantee of the HOBW method.

## 5 Illustrative numerical examples

In this section, we will study the Lane–Emden with the initial value having a singularity at *x *= 0, the high exactness of the solution acquired by HOBW method are demonstrated and then we compare all results with the required solution.

### *Example 1*

*y*(

*x*) =

*x*

^{2}+

*x*

^{3}.

*y*(

*x*) of (37) at \(2^{k - 1} = 4\) and

*M*= 3 method, we get 16 number algebraic equations with the same number of unknowns and these equations are numerically solved by Newton’s method with help of maple program, with the initial guess zero, we get the HOBW coefficients as:

*y*(

*x*) will be decreased rapidly in comparison with ADM.

Comparison of truncate solutions acquired by HOBW at \(2^{k - 1} = 4\) and *M* = 3 ADM for Example 1

| HOBW | ADM | Exact | AE of HOBW | AE of ADM |
---|---|---|---|---|---|

0.1 | 0.011 | 0.011 | 0.011 | 0 | 0 |

0.2 | 0.048 | 0.04800000004 | 0.048 | 0 | 4 × 10 |

0.3 | 0.117 | 0.1170000002 | 0.117 | 0 | 2 × 10 |

0.4 | 0.224 | 0.2240000003 | 0.224 | 0 | 3 × 10 |

0.5 | 0.375 | 0.3750000001 | 0.375 | 0 | 1 × 10 |

0.6 | 0.576 | 0.5760000004 | 0.576 | 0 | 4 × 10 |

0.7 | 0.833 | 0.83300000003 | 0.833 | 0 | 0 |

0.8 | 1.152 | 1.1520000007 | 1.152 | 0 | 1 × 10 |

0.9 | 1.539 | 1.5390000009 | 1.539 | 0 | 9 × 10 |

### *Example 2*

*y(x)=x*

^{4}−

*x*

^{3.}

*M*. These results have been included to demonstrate the validity and capability of HOBW (Fig. 1).

Maximum AE at several values of 2^{k−1} and *M* for Example 2 via HOBW

2 | | |||
---|---|---|---|---|

7 | 11 | 15 | 19 | |

8 | 4.59 × 10 | 8.02 × 10 | 4.19 × 10 | 7.38 × 10 |

12 | 5.47 × 10 | 2.49 × 10 | 3.17 × 10 | 2.12 × 10 |

16 | 3.39 × 10 | 2.95 × 10 | 1.21 × 10 | 4.24 × 10 |

### *Example 3*

*y*(

*t*) by HOBW at

*r*=

*m*= 0

*g*= 2, and

*r*= 0,

*m*= 1,

*g*= 2.

Numerical solutions for Example 3 when *g* = 2, *m* = 0

| Correct solution | HOBW solution | AE |
---|---|---|---|

0.1 | 0.9983333333 | 0.9983333334 | 1 × 10 |

0.2 | 0.9933333333 | 0.9933333321 | 1.2 × 10 |

0.3 | 0.9850000000 | 0.9850000002 | 1 × 10 |

0.4 | 0.9733333333 | 0.9733333364 | 3.1 × 10 |

0.5 | 0.9583333333 | 0.9583333336 | 1 × 10 |

0.6 | 0.9400000000 | 0.9400000015 | 1.5 × 10 |

0.7 | 0.9183333333 | 0.9183333331 | 1 × 10 |

0.8 | 0.8933333333 | 0.8933333344 | 1.1 × 10 |

0.9 | 0.8650000000 | 0.8650000056 | 5.6 × 10 |

A truncate solutions for Example 3 when *g* = 2, *m* = 1

| Correct solution | HOBW solution at 2 | AE at 2 | AE at 2 |
---|---|---|---|---|

0.1 | 0.9983341665 | 0.9983341428 | 2.37 × 10 | 4.61 × 10 |

0.2 | 0.9933466540 | 0.9933467756 | 1.260 × 10 | 7.02 × 10 |

0.3 | 0.9850673556 | 0.9850674729 | 1.173 × 10 | 2.35 × 10 |

0.4 | 0.9735458558 | 0.9735458342 | 2.161 × 10 | 5.11 × 10 |

0.5 | 0.9588510772 | 0.9588503494 | 7.278 × 10 | 2.73 × 10 |

0.6 | 0.9410707892 | 0.9410707712 | 1.80 × 10 | 6.35 × 10 |

0.7 | 0.9203109820 | 0.9203110906 | 1.086 × 10 | 1.05 × 10 |

0.8 | 0.8966951136 | 0.8966952102 | 9.66 × 10 | 3.24 × 10 |

0.9 | 0.8703632328 | 0.8703632216 | 1.12 × 10 | 4.01 × 10 |

*r*=

*m*= 0, and

*g*= 2, the above equation has a correct solution

Table 3 shows that, for *g* = 2, *m* = 0, the acquired results coincides with the required solution and efficiency of the method described through the AE.

^{k}= 4,

*M*= 3, HOBW coefficients

*C*is:

*r*= 0,

*m*= 1, and

*k*= 2, Eq. (39) is:

The correct solutions for this problem are given by \(y(x) = \frac{\sin (x)}{x}\) applying HOBW method, and taking 2^{k} = 4, *M* = 3, we note that HOBW coefficients *C* as

^{k}= 8,

*M*= 7, if 2

^{k},

*M*increases, the truncate solution gets the required solution. The truncate solutions acquired by HOBW for shape factor

*g*= 2 and 2

^{k}= 4,

*M*= 3, at 2

^{k}= 8,

*M*= 7 with require solutions and AE demonstrated in Table 2. By increasing, 2

^{k},

*M*the computed results have appropriated the exactness was increased as well. and the truncate solution gets an approximate to the correct solution as demonstrated in Table 4. The CPU time for running a case may depend on the choice of 2

^{k},

*M*for solving the system of linear algebraic equations resulting from the discretized equations. If a different value 2

^{k},

*M*would have been used, the CPU time would be different.

### *Example 4*

^{k}= 16,

*M*= 15 are very promising and superior to those of SDMM. It is demonstrated that, for a certain value of

*M*, as 2

^{k}increases, the exactness increases and for a certain value of 2

^{k}, as

*M*increases, the exactness increases as well. Therefore, HOBW for solving this problem is very effective and more accurate as compared with the second derivative multistep method.

A truncate and correct solutions for Example 4

x | Correct solution | HOBW at 2 | AE of HOBW at 2 | AE of SDMM |
---|---|---|---|---|

0.25 | \(1. 0 6 4 4 9 4 4 5 8 9 1 7 8 6\) | \(1. 0 6 4 4 9 4 4 5 8 9 1 7 8 9\) | 3 × 10 | 1.77 × 10 |

0.5 | \(1. 2 8 4 0 2 5 4 1 6 6 8 7 7 4\) | \(1. 2 8 4 0 2 5 4 1 6 6 8 7 7 9\) | 5 × 10 | 2.14 × 10 |

0.75 | \(1. 7 5 5 0 5 4 6 5 6 9 6 0 3 0\) | \(1. 7 5 5 0 5 4 6 5 6 9 6 0 7 3\) | 4.3 × 10 | 2.93 × 10 |

1 | \(2. 7 1 8 2 8 1 8 2 8 4 5 9 0 4\) | \(2. 7 1 8 2 8 1 8 2 8 4 5 9 1 6\) | 1.2 × 10 | 4.54 × 10 |

The results acquired by the present method are compared with the correct solution as demonstrated in Table 5. For examples 4, we have very less AE by increasing the order of HOBW.

## 6 Conclusion

In this paper, we introduced VIDE as equivalent to the LEE. The acquired VIDE form of LEE to overcome the difficulty of the singular behavior at *x* = 0. The HOBW has been connected for settling the most prominent differential conditions. Despite this reality, such a model gives an imperative hypothetical point of view concerning the hypothesis, as one may see this as the fringe between polytropic one that is physically attainable. It is additionally important to take note of that such an outstanding model has, despite the unending range, a limited mass. Moreover, other outstanding models, which are made in a “layered” form where each layer comprises of a polytope of an alternate record, may likewise use this capacity for a bit of the star, in which case a limited sweep would be conceivable. Notwithstanding these relations, there are likewise a few different determinations that one can make from the polytropic model of stars. For relations of this sort, there exists a connection between the polytropic file, the mass of a star, and the span. It is maybe apparent in the talk of the investigative arrangements of the polytropic record that one could gather a connection between the polytropic file of the star and the range that one would ascertain from that star. The class of the equations was released, by changing the coefficient *y*^{′}and the method was introduced. Using this method, the VIDE forms is reduced to algebraic equations. We got these equations involving 2^{k} × (*M* − 1)variables which solved using Newton’s iterative method through MAPLE program. It was evident that the method for a certain value of *M* as 2^{k} increased, the exactness was increased, and also for a certain value of *M*, as *M* increased, the exactness was increased high as well.

## Notes

### Acknowledgements

The authors are grateful to the anonymous referee for his suggestions, which have greatly improved the presentation of the paper.

### Authors’ contributions

The author has made an equal contribution. The author read and approved the final manuscript.

### Funding

This research work is not supported by any funding agencies.

### Compliance with ethical standards

### Competing interests

The authors declare that they have no competing interests.

## References

- 1.Kaur H, Mittal RC, Mishra V (2013) Haar wavelet approximate solutions for the generalized Lane–Emden equations arising in astrophysics. Comput Phys Commun 184(9):2169–2177MathSciNetzbMATHGoogle Scholar
- 2.Luo T, Xin Z, Zeng H (2016) On nonlinear asymptotic stability of the Lane-Emden solutions for the viscous gaseous star problem. Adv Math 291(1):90–182MathSciNetzbMATHGoogle Scholar
- 3.Deniz Sinan, Bildik Necdet (2017) A new analytical technique for solving Lane–Emden type equations arising in astrophysics. Bull Belgian Math Soc-Simon Stevin 24(2):305–320MathSciNetzbMATHGoogle Scholar
- 4.Bildik Necdet, Deniz Sinan (2018) New analytic approximate solutions to the generalized regularized long wave equations. Bull Korean Math Soc 55(3):749–762MathSciNetzbMATHGoogle Scholar
- 5.Bildik Necdet, Deniz Sinan (2018) Solving the Burgers’ and regularized long wave equations using the new perturbation iteration technique. Numer Methods Partial Differ Equ 34(5):1489–1501MathSciNetGoogle Scholar
- 6.Wazwaz AM, Rach R, Duan J-S (2013) Adomian decomposition method for solving the Volterra integral form of the Lane–Emden equations with initial values and boundary conditions. Appl Math Comput 219(10):5004–5019MathSciNetzbMATHGoogle Scholar
- 7.Aslanov A (2016) An elegant correct solution for the Emden-Fowler equations of the first kind. Math Methods Appl Sci 39(5):1039–1042MathSciNetzbMATHGoogle Scholar
- 8.Wazwaz AM (2005) Analytical solution for the time-dependent Emden-Fowler type of equations by Adomian decomposition method. Appl Math Comput 166(3):638–651MathSciNetzbMATHGoogle Scholar
- 9.Bencheikh A, Chiter L, Abbassi H (2017) Bernstein polynomials method for numerical solutions of integro-severalial form of the singular Emden-Fowler initial value problems. J Math Comput Sci 17(1):66–75Google Scholar
- 10.Boubaker K, Van Gorder RA (2012) Application of the BPES to Lane–Emden equations governing polytropic and isothermal gas spheres. New Astron 17:565–569Google Scholar
- 11.Aslanov A (2009) Approximate solutions of Emden–Fowler type equations. Int J Comput Math 86:807–826MathSciNetzbMATHGoogle Scholar
- 12.Harley C, Momoniat E (2008) Instability of invariant boundary conditions of a generalized Lane–Emden equation of the second-kind. Appl Math Comput 198:621–633MathSciNetzbMATHGoogle Scholar
- 13.Ramadan MA, Ali MR (2017) Numerical solution of Volterra-Fredholm integral equations using hybrid orthonormal bernstein and block-pulse functions. Asian Res J Math 4(4):1–14Google Scholar
- 14.Ramadan MA, Ali MR (2017) Application of Bernoulli wavelet method for numerical solution of fuzzy linear Volterra-Fredholm integral equations. Commun Math Model Appl 2(3):40–49Google Scholar
- 15.Ramadan MA, Ali MR (2017) Solution of integral and integro-differential equations system using hybrid orthonormal bernstein and block-pulse functions. J Abstract Comput Math 2(1):35–48Google Scholar
- 16.Parand K, Khaleqi S (2016) The rational Chebyshev of second kind collocation method for solving a class of astrophysics problems. Eur Phys J Plus 131:1–24Google Scholar
- 17.Sadat R, Kassem M (2018) Explicit solutions for the (2 + 1)-dimensional Jaulent–Miodek equation using the integrating factors method in an unbounded domain. Math Comput Appl 23(1):1–9MathSciNetzbMATHGoogle Scholar
- 18.Ramadan MA, Ali MR (2017) An efficient hybrid method for solving fredholm integral equations using triangular functions. New Trends Math Sci 5(1):213–224Google Scholar
- 19.Ali MR, Hadhoud AR (2019) Hybrid orthonormal Bernstein and Block-Pulse functions wavelet scheme for solving the 2D Bratu problem. Results Phys 12:525–530Google Scholar
- 20.Hojjati G, Parand K (2011) An efficient computational algorithm for solving the nonlinear Lane–Emden type equations. World Acad Sci Eng Technol 5:182–187Google Scholar
- 21.Ali MR (2018) Darboux transformation for soliton solutions of the modified Kadomtsev-Petviashvili-II equation. Commun Math Model Appl 3(3):28–36Google Scholar
- 22.Parand K, Roozbahani Z, Bayat-Babolghani F (2013) Solving nonlinear Lane–Emden type equations with unsupervised combined artificial neural networks. Int J Ind Math 5(4):355–366Google Scholar
- 23.Parand K, Pirkhedri A (2010) Sinc-collocation method for solving astrophysics equations. New Astron 15(6):533–537Google Scholar
- 24.Hossayni SA, Rad JA, Parand K, Abbasbandy S (2015) Application of the exact operational matrices for solving the Emden-Fowler equations, arising in astrophysics. Int J Ind Math 7(4):351–374Google Scholar
- 25.Parand K, Hemami M (2016) Numerical study of astrophysics equations by Meshless collocation method based on compactly supported radial basis function. Int J Appl Comput Math 3(2):1053–1075MathSciNetzbMATHGoogle Scholar
- 26.Ali MR (2018) Solution of KdV and boussinesq using Darboux transformation. Commun Math Model Appl 3(3):16–27Google Scholar