Abstract
The purpose of this paper is to propose an efficient numerical method for solving Lane–Emden type equations arising in astrophysics using Hermit polynomials. Our method depends on collocation method. This method based on first taking the truncated Hermite series of the solution function in the Lane–Emden equation and then, transforms Lane–Emden type equation and given conditions into a matrix equation and then, we have the system of linear or nonlinear algebraic equation using collocation points. Then, solving the system of algebraic equations and we have the coefficients of the truncated Hermite series. Some illustrative examples are given to demonstrate the efficiency and validity of the proposed algorithm.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1 Introduction
In recent years, the studies of singular initial value problems in the ordinary differential equations have attracted the attention of many mathematicians and astrophysics. One of the equations describing this type is the Lane–Emden-type equation, which describes the equilibrium density distribution in self-gravitating sphere of polytrophic isothermal gas, and has a singularity at the origin and is of fundamental importance in the field of stellar structure, radiative cooling and modelling of clusters of galaxies.
Let \(P(r)\) denote the total pressure at a distance \(r\) from the center of spherical gas cloud. The total pressure is due to the usual gas pressure and a contribution from radiation:
where \(\xi \), \(T\), \(R\) and \(\upsilon \) are, respectively, the radiation constant, the absolute temperature, the gas constant, and the specific volume (Parand and Pirkhedri 2010). Let \(M(r)\) be the mass within a sphere of radius \(r\) and \(G\) the constant of gravitation. The equilibrium equations for the configuration are
where \(\rho \) is the density, at a distance \(r\) from the center of a spherical star.
Eliminating \(M\) yields:
Pressure and density \(\rho =v^{-1}\) vary with \(r\) and \(P=K\rho ^{1+\frac{1}{m}}\) where \(K\) and \(m\) are constant. We can insert this relation into Eq. (2) for the hydrostatic equilibrium condition and from this rewrite the equation as:
where \(\lambda \) representing the central density of the star and \(y\) is dimensionless quantity that are both related to \(\rho \) through the following relation:
and
Inserting these relations into our previous relations we obtained the Lane–Emden equation (Parand and Pirkhedri 2010; Dehghan and Shakeri 2008)
and simplifying the previous equation we have
with the boundary conditions:
In this paper, we consider the most general the Lane–Emden type equations as:
with initial conditions
where \(\alpha _0 \) and \(\alpha _1 \) are constant, \(P_2 (t)=1,\,\,P_1 (t)=\frac{\alpha }{t}\), \(f(t,y)\) is a continuous real valued function and \(g(t)\in C[0,1]\). In Biles et al. (2002), the authors proved local existence of solutions and under additional assumptions, uniqueness of the solutions for the initial value problem Eq. (10). Since, Lane–Emden type equations have significant applications in many fields of scientific and technical world, a variety of forms of \(f(t,y)\) and \(g(t)\) have been investigated by many researchers. A discussion of the formulation of these models and the physical structure of the solutions can be found in the literature. For example, for \(f(t,y)=y^m\), \(g(t)=0\), Eq. (10) is the standard Lane–Emden equation that was used to model the thermal behaviour of a spherical cloud of gas acting under the mutual attraction of its molecules and subject to the classical laws of thermodynamics (Agarwala and O’Reganb 2007; Shawagfeh 1993; Davis 1962) and for \(f(t,y)=e^y\), \(g(t)=0\), Eq. (10) is the isothermal gas sphere equation, where the temperature remains constant (Agarwala and O’Reganb 2007; Shawagfeh 1993).
Several methods for the solution of Lane–Emden equations have been presented, which are sinc-collocation method (Parand and Pirkhedri 2010), the variational iteration method (Dehghan and Shakeri 2008), Hermite functions collocation method (Parand et al. 2010), the modified Homotopy analysis method (Singh et al. 2009), the variational iteration method (Yıldırım and Öziş 2009), the Adomian decomposition method (Hasan and Zhu 2009), Legendre operational matrix method (Pandey et al. 2012) and other methods (Kumar and Singh 2010; Varani and Aminataei 2010; Benko et al. 2009; Aslanov 2008; Yıldırım and Öziş 2007; Wazwaz 2001; Pandey and Kumar 2012).
Nowadays, collocation method is very useful for solving differential equations, difference equations, delay-difference equations, pantograph equations, integro-differential-difference equations and nonlinear problems such as Abel equation (Sezer 1996; Gulsu and Sezer 2005; Gülsu et al. 2010, 2011a, b, c; Daşçıoğlu and Yaslan 2011; Öztürk et al. 2011; Öztürk and Gülsu 2010). This method is based on matrix relation and matrix equation. Given the Lane–Emden equation transforms the matrix equation. Using collocation points, we obtain the system of algebraic equations. Then, solving this system, we obtain the coefficients of truncated Hermite series.
The aim of this study is to get solution as truncated Hermite series defined by
where \(H_n (t)\) denotes the Hermite polynomials, \(a_n \;(0\le n\le N)\) are unknown Hermite coefficients and \(N\) is chosen any positive integer.
2 Fundamental Relations
Let us consider the Eq. (10) and find the matrix forms of the equation. We first consider the solutions \(y_N (x)\) and its derivatives \(y_N^{(k)} (x)\) defined by a truncated Hermit series. Then, we can write the truncated Hermit series in the matrix form
where
Then, we know that the relation between \(t^n\) and \(H_n (t)\) is
and
By using Eqs. (14–15) and taking \(n=0,1,\ldots ,N\) we find the corresponding matrix relation as follows:
where
and for even \(N\)
for odd \(N\)
Then, by taking into account (16), we obtain
and
To obtain the matrix \(\mathbf X ^{(k)}(t)\) in terms of the matrix \(\mathbf X (t)\), we can use the following relation (Sezer 1996; Gulsu and Sezer 2005; Gülsu et al. 2010, 2011a, b, c; Daşçıoğlu and Yaslan 2011; Öztürk et al. 2011; Öztürk and Gülsu 2010)
where
Therefore, the matrix representation of the solution and its derivatives can be given by
3 Method of solution
In Eq. (10), we assume that \(f(t,y)=P_0 (t)\) that is \(f(t,y)\) is linear. For \(t=0\), \(P_1 (t)=\frac{\alpha }{t}\) has a singular point. Since \(t+\varepsilon \rightarrow t\) as \(\varepsilon \rightarrow 0\) then \(\mathop {\lim }_{\varepsilon \rightarrow 0} P_1 ^*(t+\varepsilon )=P_1 (t)\), where \(P_1 ^*(t+\varepsilon )=P_1 (t+\varepsilon )\).
We using collocation points \(t_i \) defined by
and we get the matrix equations
So, the fundamental matrix equation is gained
where
Hence, the fundamental matrix Eq. (22) corresponding to Eq. (10) can be written in the form
where
On the other hand, the matrix form for conditions can be written as
To obtain the solution of Eq. (10) under conditions (11), by replacing the row matrices (24) by the last 2 rows of the matrix (23), we have the new augmented matrix
The Eq. (25) is a system of \((N+1)\) linear algebraic equations with \((N+1)\) unknown Hermit coefficients. If \(rank\tilde{\mathbf{W }}=rank[\tilde{\mathbf{W }}; \tilde{\mathbf{F }}]=N+1\), then we can write
Thus the matrix \(\mathbf A _\varepsilon \) is uniquely determined. Also the Eq. (10) with conditions (11) has a unique solution. This solution is given by truncated Hermit series
Let assume that \(f(t,y)=y^m(t)\) that is \(f(t,y)\) is nonlinear. Now, we construct the matrix form of the nonlinear term.
where
and using collocation points in Eqs. (20, 21)
where
then, we construct the following matrix relation
After we obtained the matrix form of nonlinear part, we apply the above procedure.
We can easily check the accuracy of the method. Since the truncated Hermit series (12) is an approximate solution of Eq. (10), when the solution \(y_N (t)\) and its derivatives are substituted in Eq. (10), the resulting equation must be satisfied approximately; that is (Sezer 1996; Gulsu and Sezer 2005; Gülsu et al. 2010, 2011a, b, c; Daşçıoğlu and Yaslan 2011; Öztürk et al. 2011; Öztürk and Gülsu 2010), for \(t=t_q \in [0,1],\;\;q=0,1,2,...\)
On the other hand, the error can be estimated by the function as
4 Illustrative Examples
In this section, several numerical examples are given to illustrate the accuracy and effectiveness properties of the method and all of them were performed on the computer using a program written in Maple 13. The absolute errors in Tables are the values of \(N_e =\left| {y(t)-y_N (t)} \right| \) at selected points.
Example 1
Let us first consider the following linear homogeneous Lane–Emden equation (Parand et al. 2010)
subject to initial conditions
Then, \(P_0 (t)=t\), \(P_1^*(t)=\frac{8}{t+\varepsilon }\), \(P_2 (t)=1\) and \(f(t)=t^5-t^4+44t^2-30t\).
Now, we can apply our technique described in Sect. 3 for \(N=4\) that is;
Fundamental matrix relation of this equation is
where
Also, we have the matrix representation of conditions as,
We solve the new augmented matrix with conditions of Eq. (26), we obtain the approximate solution
which is the exact solution of Eq. (32).
Example 2
Consider the following linear Lane–Emden equation which is the isothermal gas spheres equation (Dehghan and Shakeri 2008; Agarwala and O’Reganb 2007; Parand et al. 2010; Wazwaz 2001; Pandey and Kumar 2012)
with \(y(0)=1\) and \(y^{\prime }(0)=0\). The exact solution of this problem is \(y(t)=\exp (t^2)\). The solution of the is obtained for\(N=10,15,20\). For numerical results, see Table 1. Moreover, we compare the numerical results with Parant (Parand et al. 2010), Wazwaz (Wazwaz 2001) and Pandey (Pandey et al. 2012; Pandey and Kumar 2012) in Table 2.
Example 3
Consider the following nonlinear Lane–Emden equation which is the temperature variation of a spherical gas cloud under the mutual attraction of its molecules and subject to the laws of classical thermodynamics. It also describes the variation of density as a function of the radial distance for a polytrope. The polytropic theory of stars essentially follows out of thermodynamic considerations, that deal with the issue of energy transport, through the transfer of material between different levels of the star (Dehghan and Shakeri 2008; Davis 1962; Parand et al. 2010).
with \(y(0)=1\,\,y^{\prime }(0)=0\). This equation is linear for \(m=0,1\) and nonlinear otherwise. Exact solutions exist only for \(m=0,1,5\).
Case I: For \(m=0\), Eq. (34) has exact solution \(y(t)=1-\frac{t^2}{6}\). Applying the method developed in Sect. 3 for \(N=2\), we obtain the exact solution.
Case II: For \(m=1\), Eq. (34) has exact solution \(y(t)=\frac{\sin (t)}{t}\)
We solve the equation approximately, we have the approximate solutions in Table 3. Moreover, we display the approximate solutions and exact solution in Fig. 1 and errors is given in Fig. 2.
Case III: For \(m=5\), Eq. (34) has exact solution \(y(t)=(1+\frac{t^2}{3})^{-1/2}\). Applying the method developed in Sect. 3 with Eq. (29), we solve the nonlinear Lane–Emden equation for some \(N\). Figure 3 compare the approximate solutions and exact solution and Fig. 4 shows errors functions of the approximate solutions for various \(N\).
Example 4
Consider the following nonlinear Lane–Emden equation which is the isothermal gas spheres equation (Dehghan and Shakeri 2008; Davis 1962; Parand et al. 2010; Wazwaz 2001)
with\(y(0)=0,\,\,y^{\prime }(0)=0\). In this problem \(f(x,y)=e^y\). Using Taylor series we can write \(f(x,y)\) as
We give the numerical results in Table 4 and it is obtained the numerical results by Parand et al. (2010) and Wazwaz (2001) in Table 5. We plot the approximate solutions in Fig. 5 and errors functions in Fig. 6. Moreover, the numerical results of Parand et al. (2010) and Wazwaz (2001) is plotted in Fig. 7. The numerical results is the same line in Figs. 5 and 7.
5 Conclusion
A method for the solution of the Lane–Emden equation has been proposed and investigated. The method was illustrated by accurately solving Lane–Emden equations. Also, efficiency of this method has been shown in the examples. In recent years, the studies of Lane–Emden equation have attracted the attention of many mathematicians and physicists. The Hermit collocation methods are used to solve the Lane–Emden equation numerically. Illustrative examples are included to demonstrate the validity and applicability of the technique and performed on the computer using a program written in Maple 13. To get the best approximating solution of the equation, we take more forms from the Hermit expansion of functions; that is, the truncation limit \(N\) must be chosen large enough. In addition, an interesting feature of this method is to find the analytical solutions if the equation has an exact solution that is a polynomial functions. Illustrative examples with the satisfactory results are used to demonstrate the application of this method. Suggested approximations make this method very attractive and contributed to the good agreement between approximate and exact values in the numerical example.
References
Agarwala RP, O’Reganb D (2007) Second order initial value problems of Lane–Emden type. Appl Math Lett 20:1198–1205
Aslanov A (2008) A generalization of the Lane–Emden equation. Int J Comp Math 85:1709–1725
Benko D, Biles DC, Robinson MP, Spraker JS (2009) Numerical approximation for singular second order differential equations. Math Comput Modell 49:1109–1114
Biles DC, Robinson MP, Spraker JS (2002) A generalization of the Lane–Emden equation. J Math Anal Appl 273:654–666
Daşçıoğlu A, Yaslan H (2011) The solution of high-order nonlinear ordinary differential equations by Chebyshev polynomials. Appl Math Comp 217(2):5658–5666
Davis HT (1962) Introduction to nonlinear differential and integral equations. Dover, New York
Dehghan M, Shakeri F (2008) Approximate solution of a differential equation arising in astrophysics using the variational iteration method. New Astronomy 13:53–59
Gulsu M, Sezer M (2005) A method for the approximate solution of the high-order linear difference equations in terms of Taylor polynomials. Int J Comput Math 82(5):629–642
Gülsu M, Öztürk Y, Sezer M (2010) A new collocation method for solution of mixed linear integro-differential-difference equations. Appl Math Comp 216:2183–2198
Gülsu M, Öztürk Y, Sezer M (2011a) On the solution of the Abel equation of the second kind by the shifted Chebyshev polynomials. Appl Math Comp 217:4827–4833
Gülsu M, Gürbüz B, Öztürk Y, Sezer M (2011b) Laguerre polynomial approach for solving linear delay difference equations. Appl Math Comp 217:6765–6776
Gülsu M, Yalman H, Öztürk Y, Sezer M (2011c) A new collocation method for solving differential differece equations. Appl Appl Math 6:1856–1869
Hasan YQ, Zhu LM (2009) Solving singular boundary value problems of higher-order ordinary differential equations by modified Adomian decomposition method. Commun Nonlinear Sci Numer Simulat 14: 2592–2596
Kumar M, Singh N (2010) Modified adomian decomposition method and computer implementation for solving singular boundary value problems arising in various physical problems. Comp Chem Eng 34(11): 1750–1760
Öztürk Y, Gülsu M, Sezer M (2011) Chebyshev polynomial bases for solving linear Fredholm-Volterra integro-delay-differential-difference equations. Int J Math Comp 10:M11
Öztürk Y, Gülsu M (2012) Approximate solution of linear generalized pantograph equations with variable coefficients on Chebyshev-Gauss grid. J Adv R Sci Comp 4:36–51
Pandey RK, Kumar N, Bhardwaj A, Dutta G (2012) Solution of Lane-Emden type equations using Legendre operational matrix of differentiation. Appl Math Comp (in press)
Pandey RK, Kumar N (2012) Solution of Lane–Emden type equations using Berstein operational matrix of differentiation. New Astronomy 17:303–308
Parand K, Pirkhedri A (2010) Sinc-collocation method for solving astrophysics equations. New Astronomy 15:533–537
Parand K, Dehghan M, Rezaei AR, Ghaderi S (2010) An approximation algorithm for the solution of the nonlinear Lane-Emden type equations arising in astrophysics using Hermite functions collocation method. Comp Phys Commun 181:1096–1108
Sezer M (1996) A method for approximate solution of the second order linear differential equations in terms of Taylor polynomials. Int J Math Educ Sci Technol 27(6):821–834
Shawagfeh NT (1993) Nonperturbative approximate solution for Lane–Emden equation. J Math Phys 34: 4364–4369
Singh OP, Pandey RK, Singh VK (2009) An analytic algorithm of Lane-Emden type equations arising in astrophysics using modified Homotopy analysis method. Comp Phys Commun 180:1116–1124
Varani SK, Aminataei A (2010) On the numerical solution of differential equations of Lane-Emden type. Comp Math Appl 59:2815–2820
Wazwaz A (2001) A new algorithm for solving differential equations of Lane–Emden type. Appl Math Comp 118:287–310
Yıldırım A, Öziş T (2007) Solutions of singular IVPs of Lane-Emden type by homotopy perturbation method. Phys Lett A 369:70–76
Yıldırım A, Öziş T (2009) Solutions of singular IVPs of Lane–Emden type by the variational iteration method. Nonlinear Anal 70:2480–2484
Author information
Authors and Affiliations
Corresponding author
Additional information
Communicated by Cristina Turner.
Rights and permissions
About this article
Cite this article
Öztürk, Y., Gülsu, M. An approximation algorithm for the solution of the Lane–Emden type equations arising in astrophysics and engineering using Hermite polynomials. Comp. Appl. Math. 33, 131–145 (2014). https://doi.org/10.1007/s40314-013-0051-5
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s40314-013-0051-5
Keywords
- Lane–Emden equation
- Astrophysics equation
- Mathematical model
- Hermite polynomials
- Collocation method
- Approximation method