<<

J. Astrophys. Astr. (2019) 40:27 © Indian Academy of Sciences https://doi.org/10.1007/s12036-019-9587-0

Numerical study of singular fractional Lane–Emden type equations arising in

ABBAS SAADATMANDI∗ , AZAM GHASEMI-NASRABADY and ALI EFTEKHARI

Department of Applied Mathematics, University Kashan, Kashan 87317-53153, Iran. ∗Corresponding author. E-mail: [email protected]

MS received 20 December 2018; accepted 13 April 2019; published online 17 June 2019

Abstract. The well-known Lane–Emden equation plays an important role in describing some phenomena in mathematical physics and astrophysics. Recently, a new type of this equation with fractional order derivative in the Caputo sense has been introduced. In this paper, two computational schemes based on collocation method with operational matrices of orthonormal Bernstein polynomials are presented to obtain numerical approximate solutions of singular Lane–Emden equations of fractional order. Four illustrative examples are implemented in order to verify the efficiency and demonstrate solution accuracy.

Keywords. Fractional Lane–Emden type equations—orthonormal Bernstein polynomials—operational matrices—collocation method—Caputo derivative.

1. Introduction hydraulic at a certain radius r. Due to the contribution of photons emitted from a cloud in radi- The Lane–Emden equation has been used to model ation, the total pressure due to the usual gas pressure many phenomena in mathematical physics, astrophysics and photon radiation is formulated as follows: and celestial mechanics such as the thermal behavior of 1 RT a spherical cloud of gas under mutual attraction of its P = ξ T 4 + , 3 V molecules, the theory of stellar structure, and the theory ξ, , of thermionic currents (Chandrasekhar 1967). This is a where the parameters T R and V stand for the radia- singular nonlinear ordinary differential equation (ODE) tion constant, the absolute , the gas constant ( ) which was first introduced by U.S. astrophysicist, and the specific volume respectively. Let M r be the , ,φ Jonathan Homer Lane (Lane 1870) who was interested mass of a sphere of radius r and G g respectively in computing both the temperature and the density of denote the constant of gravitation, acceleration of grav- mass on the surface, and 37 years later was studied ity and gravitational potential of gas. By having the in more detail by Emden (1907). In astrophysics, this relation GM(r) dφ ODE is a dimensionless version of Poisson’s equation g = =− , for the gravitational potential of a simple stellar model r 2 dr (Momoniat & Harley 2006). We now briefly explain one can determine P and φ by meeting the following mathematical modeling of the thermal behavior of a three conditions: spherical cloud which leads to the classic Lane–Emden dP =−gρdr = ρdφ, (1) equation. See Chandrasekhar (1967) and Parand et al. 2 (2010) for a comprehensive coverage of the subject. ∇ φ =−4πGρ, (2) γ P = Kρ . (3) 1.1 Modeling of the thermal behavior of a spherical Here, ρ is the density of gas at a distance r from the cen- cloud of gas tre of the spherical cloud and the constants γ = 1+1/m and K are experimentally determined. The constant m For the sake of simplicity, we consider a spherical gas is called the polytropic index and is related to the ratio cloud as shown in Figure 1. Let P(r) denote the total of specific heats of gas comprising the star. Using the 27 Page 2 of 12 J. Astrophys. Astr. (2019) 40:27

1 ( + ) 2 K m 1 1 −1 a = λ m , 4πG the differential equation (4) reduces to

 2  y + y + ym = 0, x > 0. (5) x In physics, this singular differential equation with the initial conditions  y(0) = 1, y (0) = 0(6) Figure 1. A spherical gas cloud. is known as the classic Lane–Emden problem. In quan- tum mechanics and astrophysics, the values of m are conditions (1)–(3), with a straightforward calculation, physically meaningful and interesting and lie in the the following relations are revealed: interval [0, 5]. In the literature, the exact solutions of dP GM(r) problems (5)–(6) are known only for m = 0, 1, 5 =−gρ =−ρ , dr r 2 (Parand et al. 2010) and for other values of m, with the dφ M(r) approach of handling singularity in the presence of the =−g =−G , 2 origin, several methods have been efficiently employed dr r d2φ 1 dM(r) M(r) to approximate the solution of this problem. A fairly =−G − 2 . dr 2 r 2 dr r 3 complete discussion of these methods are presented in Parand et al. (2010, 2017); Dehghan & Shakeri By substituting the above expressions into Equation (2), (2008); Abd-Elhameed et al. (2014) and references we obtain therein. 1 dM(r) M(r) 2 M(r) In recent years, considerable attention has been −G − 2 + −G r 2 dr r 3 r r 2 devoted to develop the applications of fractional calcu- =−4πGρ, lus in the fields of science and engineering. By the use of differential equations of non-integer order, dynamic and consequently, behavior of different phenomena in engineering sci- dM(r) ences, physics and other branches of science can be = 4πρr 2. dr studied more precisely (Saadatmandi & Dehghan 2010, Therefore, the hydrostatic equilibrium conditions 2011; Saadatmandi 2014; Doha et al. 2012). Hence, this (HEC) are as follows: motivates us to study the efficient low-cost numerical ⎧ ( ) algorithms for solving the singular Lane–Emden equa- ⎨⎪ dP =−ρ GM r , dr r2 tions of fractional order as follows (Nasab et al. 2018): ⎪ α L β ⎩ dM(r) = πρ 2, D y(x) + D y(x) + g(x, y(x)) = h(x), (7) dr 4 r xα−β Eliminating M from the recent equations yields with the initial conditions:  1 d r 2 dP y(0) = A, y (0) = B, (8) =−4πGρ, 2 ρ r dr dr where 0 < x ≤ 1, 1 <α≤ 2and0<β≤ 1. Also, α where the pressure P and the density ρ = V −1 vary A and B are constants and D denotes the fractional with r. If we insert the above expression into the first derivative of order α in the Caputo sense and defined equation for HEC, we obtain the following differential later in the text. Moreover, g(x, y(x)) is a continuous equation: real-valued function and h(x) ∈ C[0, 1].Theexis- ( + ) tence and uniqueness of the solution of problems (7)–(8) K m 1 1 −1 1 d 2 dy m λ m r =−y , (4) are discussed in Ibrahim (2013) and Taleb & Dahmani π 2 4 G r dr dr (2016). To the best of our knowledge, there are only a where λ represents the central density of the gas cloud few numerical algorithms available in the literature for and y is a dimensionless quantity that are both related to the numerical solution of fractional Lane–Emden equa- ρ via ρ = λym. By imposing additional dimensionless tions compared to the classical one. For instance, we variable r = ax via the relation can refer to the reproducing kernel method (Akgül et al. J. Astrophys. Astr. (2019) 40:27 Page 3 of 12 27

2015), collocation method (Mechee & Senu 2012a), the The layout of this paper is as follows. In Section 2, least square method (Mechee & Senu 2012b), and mod- some basic definitions and introductory concepts of ified differential transform method (Marasi et al. 2015). fractional calculus and some properties of OBPs are More recently, Nasab et al. (2018) applied a hybrid presented. Section 3 is devoted to obtaining opera- numerical method combining Chebyshev wavelets and tional matrices of fractional derivatives and integrals a finite difference approach to obtain solutions of sin- for OBPs. In Section 4, with the aid of operational gular fractional Lane–Emden equations of the form (7). matrices of fractional integral and differential and col- Unfortunately, most of the differential equations of location approach, two numerical techniques are driven fractional order do not have an analytical expression to solve the singular fractional Lane–Emden equation of solution and the analytical solution, if any, is not (7) subject to the initial conditions (8). In Section 5, the suitable for numerical purposes. Therefore, in recent proposed methods are applied to several examples and years, researchers have focused on the development of the numerical results are compared with those existing suitable and efficient numerical methods for solving in the literature. Finally, concluding remarks are given linear/nonlinear fractional ordinary/partial differential in Section 6. Note that we have implemented our algo- equations. One of the most powerful and adaptive tools rithms in Maple software. for obtaining numerical solutions of these equations is the use of operational matrices that have been widely extended in the field of fractional calculus over the last 2. Basic definitions and concepts few years (Bhrawy et al. 2015). In fact, by the use of an operational matrix technique, the problem of solving 2.1 A brief review of fractional calculus a fractional differential equation can readily lead to the determination of solution of a system of algebraic equa- In this section, we present some essential basic defi- tions. This approach reduces the computational error nitions and properties of fractional calculus for subse- and the complexity of operations, speeds up comput- quent discussion. The fractional calculus was born more ing, makes programming more easy and suitable, and than 300 years ago and its history goes back to the begin- does not have difficulties arising from problem-solving ning of the differential and integral calculus. Various directly. popular definitions for integral and derivative of frac- In the past few years, the abilities of the operational tional order are given. Among all these definitions, the matrix of fractional derivative/integral, based on some definition of the Riemann–Liouville fractional integral families of the famous basic functions, in solving frac- and the fractional derivative of the Caputo sense are of tional differential/integral equations are well-reflected particular importance in the field of fractional calculus. in the literature. For instance, we can refer to the opera- First, we give some concepts related to the definition of tional matrices of fractional derivative or integral which Riemann–Liouville fractional integral (Miller & Ross were composed of Legendre polynomials (Saadatmandi 1993; Oldham & Spanier 1974). & Dehghan 2010, 2011), Bernstein polynomials (Saa- μ ∈ R datmandi 2014; Rostamy et al. 2014, 2013), Jacobi Definition 1. Let us denote by Cμ,where ,the ( , ∞) polynomials (Doha et al. 2012), block pulse functions space of all real-valued functions on 0 which can ( ) = p ( ) (Li & 2011), Chebyshev polynomials (Doha et al. be represented in the form f x x f1 x ,where ( ) ∈ [ , ∞) >μ 2011), and B-spline functions (Lakestani et al. 2012). f1 x C 0 and p . The interested reader is referred to Bhrawy et al. (2015) Clearly, if β ≤ μ,thenCβ ⊂ Cμ. for a broad review of spectral techniques based on oper-  ational matrices of fractional derivatives and integrals Definition 2. Let n ∈ N {0}. We say that f (x) n n for some orthogonal polynomials. defined on (0, ∞) belongs to the space Cμ,if( f (x)) ∈ In this paper, we discuss the use of operational Cμ. matrices of fractional derivatives and integrals for α> ( ) ∈ μ ≥ orthonormal Bernstein polynomials (OBPs) in solving Definition 3. Let 0and f x Cμ,where − the singular Lane–Emden equation of fraction order (7). 1. The Riemann–Liouville integral of fractional order In this work, we approximate the solution of (7) as a lin- is defined as follows: 1 x f (t) ear combination, with unknown coefficients, of a finite I α f (x) = t 1−α d number of OBPs. Then, finding the solution of problems (α) 0 (x − t) (7)–(8), leads to the solution of a system of algebraic 1 = xα−1 ∗ f (x), x > . equations. (α) 0 27 Page 4 of 12 J. Astrophys. Astr. (2019) 40:27

Here, (α) is the Gamma function and the notation methods. Currently, there are three approaches to solve xα−1 ∗ f (x) denotes the convolution of xα−1 and f (x). this problem. The first one is to construct a dual basis (Saadatmandi 2014). The second approach is to use α> Definition 4. Let 0. The Caputo fractional deriva- transformation matrices to transfer these polynomials α ( ) ∈ n tive of order of a function f x C−1 is defined to the corresponding orthogonal polynomials such as of by Legendre or Chebyshev ones. As a third suggestion, one Dα f (x) can use the Gram–Schmidt orthogonalization process ( ) 1 x f n (t) to construct OBPs (Heydari et al. 2017; Shihab & Naif α+ − dt, n − 1 <α0, j > −1, i (j+α+1) 2n + 1 − k i − (9) x > 0. × (−1)k xi k. k i − k k • α α ( ) = ( ) − n−1 k( +) x , − k=0 I D f x f x k=0 f 0 k! n 1 <α≤ n, n ∈ N. Using binomial expansion of (1 − x)n−i , Equation (9) • Dα I α f (x) = f (x). can be rewritten as (Javadi et al. 2016; Bencheikh et al. • Dα f (x) = I m−α Dm f (x), m ∈ N. 2016) • DαC = 0,(C is a constant).  n B , (x) = 2(n − i) + 1 • Caputo’s fractional differentiation is a linear opera- i n j=0 tor, i.e., ⎛ ⎞ ⎛ ⎞ min{i, j} k k ⎝ ⎠ j × αi, j−k βi,k x , (10) Dα ⎝ c f (x)⎠ = c Dα f (x), j j j j k=max{0, j−n+i} j=1 j=1 where where {c }k are constants. − j j=1 α = (− )r n i , = , ,..., − , • The Caputo’s derivative of f (x) = xm, m ∈ N is i,r 1 r 0 1 n i r given as   i− j 2n + 1 − i + j i β , = − 1 , 0, m < α , i j j i − j Dα xm = (m+1) m−α, ≥ α , = , ,..., . (m+1−α) x m j 0 1 i where α denotes the smallest integer greater than The Bernstein polynomials Bi,n(x), i = 0, 1,...,n or equal to α. satisfy the following orthogonal relationship over the interval [0, 1]:

2.2 Orthonormal Bernstein polynomials 1 Bi,n(x)B j,n(x) dx = δij, i, j = 0, 1,...,n, The well-known Bernstein polynomials of degree n over 0 where δ denotes the Kronecker delta function. These the unit interval [0, 1] are defined by ij polynomials form a complete orthonormal basis over n i n−i [0, 1]. Hence, a square integrable function in [0, 1], bi,n(x) = x (1 − x) , i = 0, 1,...,n. i say y(x), can be represented as a linear combination ∈ N Although these polynomials have very applicable prop- of OBPs. In practice, for a suitable value of n ,we ( ) erties in the approximation theory, they do not admit can obtain an approximation for y x as (Javadi et al. the orthogonality. The fact that they are not orthogo- 2016; Bencheikh et al. 2016) nal turns out to be less suited for many applications, n ( ) ( ) = T ( ), such as least-squares approximation and finite element y x ci Bi,n x C Q x (11) i=0 J. Astrophys. Astr. (2019) 40:27 Page 5 of 12 27 where the orthonormal Bernstein vector Q(x) and the Riemann–Liouville sense and can be obtained as orthonormal Bernstein coefficient vector C are given F(α) = ZGE.Here, Z is defined in (14), G is a diago- by nal matrix of the form T Q(x) =[B0,n(x), B1,n(x),...,Bn,n(x)] ,   T (12) 0! 1! n! C =[c0, c1,...,cn] . G = diag , ,..., , (α + 1) (α + 2) (α + n + 1) The elements of C are also given by

1 and E = (Ei, j ) is an (n + 1) × (n + 1) matrix whose ci = y(x)Bi,n(x) dx, i = 0, 1,...,n. 0 elements are Each of the basis functions Bi,n(x) is a polynomial of n degree n. Thus, using the Taylor expansion of Bi,n(x),   we get Ei, j = 2(n − j) + 1 s=0 Q(x) = Z T (x), (13) ⎛ ⎞ min{ j,s} 2 n T ⎝ ⎠ 1 where T (x) =[1, x, x ,...,x ] and the entries of × α j,s−kβ j,k , = ( )n i + α + s + 1 matrix Z zij i, j=0 are obtained by (Bhrawy et al. k=max{0,s−n+ j} 2015; Miller & Ross 1993)  min{i, j} where i, j = 0, 1,...,n. zij = 2(n − i) + 1 αi, j−k βi,k. (14) k=max{0, j−n+i} Proof. By applying the operator I α on Q(x), we obtain 3. The construction of orthonormal Bernstein operational matrices for fractional calculus 1 I α Q(x) = xα−1 ∗ Q(x), ≤ x ≤ . (α) 0 1 (17) In this section, we derive the orthonormal Bernstein operational matrices of the fractional integration and Inserting Equation (13) into Equation (17), we get differentiation. We define the first integral and the first derivative of the column vector Q(x) of OBPs as fol- 1 1 lows: xα−1 ∗ (ZT (x)) = Z(xα−1 ∗ T (x)). x (α) (α) Q(t) dt PQ(x), 0 ≤ x ≤ 1. (15) 0 dQ(x) Also, we have = DQ(x), 0 ≤ x ≤ 1, (16) dx α−1 α−1 α−1 α−1 n T where P(n+1)×(n+1) and D(n+1)×(n+1) are called the x ∗ T (x) =[x ∗ 1, x ∗ x,...,x ∗ x ] operational matrices of integration and differentiation α α α = (α)[I 1, I x,..., I xn]T corresponding to the vector of OBPs. These matrices are  0! 1! fully generated by Javadi et al. (2016) and Bencheikh = (α) xα, xα+1, ..., et al. (2016). Now we intend to extend these matrices (α + 1) (α + 2)  of classical integer-order version to the fractional order. n! T xα+n (α + n + 1) 3.1 Operational matrix of integration of fractional ¯ order = (α)GT (x),

( ) Theorem 5. Let Q x be the orthonormal Bernstein ¯ ( ) =[α, α+1,..., α+n]T . α> where T x x x x Now, with vector defined in (12) and also suppose 0.Then the aid of Equation (11), we can approximate xα+i by I α Q(x) F(α) Q(x), OBPs as where F(α) denotes the (n + 1) × (n + 1) opera- α α+i T ( ), tional matrix of fractional integration of order in x Ei Q x 27 Page 6 of 12 J. Astrophys. Astr. (2019) 40:27 where Ei is a column vector whose components are Here ¯ denoted by Ei, j and is given by min{i, j} w = α β 1  i, j,l i, j−k i,k ¯ α+i = { , − + } Ei, j = x B j,n(x) dx = 2(n − j) + 1 k max 0 j n i 0 ⎛ ⎞ (j + 1) { , } × u , , n minj s ( + − α) l j ⎝ ⎠ j 1 × α j,s−kβ j,k s=0 k=max{0,s−n+ j} where  1  ul, j = 2(n − l) + 1 × α+i+s = ( − ) + ⎛ ⎞ x dx 2 n j 1 { , } 0 ⎛ ⎞ n minl s × ⎝ α β ⎠ n min{ j,s} l,s−k l,k ⎝ ⎠ s=0 k= { ,s−n+l} × α j,s−kβ j,k max 0 s=0 k=max{0,s−n+ j} × 1 . 1 j − α + s + 1 × , i, j = , ,...,n. + α + + 0 1 i s 1 Proof Using the linear property of operator Dα and Finally, by defining E asamatrixofsizen + 1 whose with the aid of Equation (10) for i = 0, 1, 2,...,n, T = , ,..., we obtain i-th row is Ei , i 0 1 n, we observe that  α D B , (x) = 2(n − i) + 1 I α Q(x) ZGEQ(x) = F(α) Q(x). i n ⎛ ⎞ n min{i, j} ⎝ ⎠ α j  × αi, j−kβi,k D x = = { , − + } j 0 k max 0 j n i Remark 6. It is worth indicating that, if α = 1, then = 2(n − i) + 1 ⎛ ⎞ (18) Theorem 5 gives the same result as Equation (15), i.e., n min{i, j} F(1) = P. ⎝ ⎠ × αi, j−kβi,k j= α k=max{0, j−n+i} 3.2 Operational matrix of differentiation of fractional (j + 1)x j−α order × . (j + 1 − α) Theorem 7. Under the assumptions made in Theo- Now, by taking a linear combination of OBPs, we can −α rem 5, we have approximate x j as follows: α (α) n D Q(x) D Q(x). j−α x ul, j Bl,n(x), (19) = Here, D(α) denotes the (n + 1) × (n + 1) operational l 0 matrix of the Caputo fractional derivative of order α where and is defined as follows: 1  j−α  ul, j = x Bl,n(x)dx = 2(n − l) + 1 (α) D = 2(n − i) + 1 0 ⎛ ⎞ ⎛ ⎞ n min{l,s} n n n ⎝ ⎠ ⎜ w w ... w ⎟ × αl,s−kβl,k ⎜ 0, j,0 0, j,1 0, j,n⎟ ⎜ = α = α = α ⎟ s=0 k=max{0,s−n+l} ⎜j j j ⎟  ⎜ . . . ⎟ 1   ⎜ . . ··· . ⎟ × j−α+s = − + ⎜ ⎟ x dx 2 n l 1 ⎜ n n n ⎟ 0 ⎛ ⎞ ⎜ w w ... w ⎟ ×⎜ i, j,0 i, j,1 i, j,n ⎟. n min{l,s} ⎜ = α = α = α ⎟ ⎝ ⎠ ⎜ j j j ⎟ × α , − β , ⎜ . . . ⎟ l s k l k ⎜ . . ··· . ⎟ s=0 k= { ,s−n+l} ⎜ ⎟ max 0 ⎜ n n n ⎟ 1 ⎝ w w ··· w ⎠ × . n, j,0 n, j,1 n, j,n j − α + s + 1 j= α j= α j= α J. Astrophys. Astr. (2019) 40:27 Page 7 of 12 27

By applying Equations (18) and (19), we get satisfies trivially the condition z(0) = z(0) = 0. After  α inserting (22) into (7) and (8), we arrive at the following: D Bi,n(x) 2(n − i) + 1 ⎛ ⎞ L { , } α ( ) + β ( ) + ( , ( )) = ( ), n n mini j D z x α−β D z x g x z x h x (23) ⎝ ⎠ x × α , − β ,  i j k i k z(0) = 0, z (0) = 0. (24) j= α l=0 k=max{0, j−n+i} (j + 1) In order to approximate the solution of problems × ul, j Bl,n(x). (j + 1 − α) (23)–(24), by the aid of Equation (11), we apply an orthonormal Bernstein expansion of Dαz(x) as follows: In other words, we have α D z(x) C T Q(x). (25)  n α D Bi,n(x) 2(n − i) + 1 Thanks to Theorem 5 and Equation (25) and in the ⎛ l⎞=0 presence of some properties of fractional integra- n tion/differentiation, we have ⎝ ⎠ × w , , B , (x). (20) β α−β α α−β i j l l n D z(x) = I (D z(x)) I (C T Q(x)) j= α (26) = C T I α−β Q(x) C T F(α−β)Q(x) Rewriting Equation (20) as a vector form, we obtain  and α D Bi,n(x) 2(n − i) + 1 ⎡ ⎤ z(x) = I α Dαz(x) C T I α Q(x) C T F(α) Q(x). n n n ⎣ ⎦ (27) × wi, j,0, wi, j,1,..., wi, j,n Q(x). j= α j= α j= α Substituting Equations (25)–(27) into Equation (23) (21) gives

Now, by using Equation (21), the final step is taken to T ( ) + L ( T (α−β) ( )) C Q x α−β C F Q x reach the end of the proof.  x (α) +g(x, C T F Q(x)) = h(x). (28) Remark 8. For α = 1, Theorem 7 gives the same result + as Equation (16), i.e. D(1) = D. Now, Equation (28) can be collocated at n 1 points as follows:

T L T (α−β) C Q(xi ) + (C F Q(xi )) 4. Solution of singular fractional Lane–Emden α−β xi equation T (α) (29) + g(xi , C F Q(xi )) = ( ), = ,..., + . In this section, using the operational matrices of frac- h xi i 1 n 1 tional derivative or integral that were made in the Here, we use uniform collocation points x = i , previous section, and using the collocation spectral i n+1 i = 1,...,n + 1. By solving this system of algebraic strategies, we present two numerical techniques for equations for C, and by the use of Equations (27) and solving problems (7)–(8). (22), we obtain an approximate solution for the original problem. 4.1 The first method 4.2 The second method In this subsection, the performance of operational matrix of fractional integration for OBPs will be Consider again Equation (7). In the second method, we reflected well in the process of solution of the prob- approximate the unknown function y(x) in the form lems (7)–(8). First, for simplicity, using the following analogous to Equation (11). Thanks to the approxima- change of variable, tion formulae for fractional derivatives in Theorem 7, ∗ y(x) = y (x) + z(x), (22) we have α T T (α) the initial conditions (8) turns into the homogenous D y(x) C DQ(x) C D Q(x), (30) β (β) ones. Here, z(x) is an unknown function of x,which D y(x) C T DQ(x) C T D Q(x). (31) 27 Page 8 of 12 J. Astrophys. Astr. (2019) 40:27

Table 1. Comparison of y(x) for Example 1. x Method 1 Method 2 Method 3 Method 4 Method 5 Our first and second methods

0.1 0.9981138095 0.9980428414 0.9980428414 0.9980428414 0.9980430038 0.9980428414 0.2 0.9922758837 0.9921894348 0.9921894348 0.9921894347 0.9921896287 0.9921894348 0.5 0.9520376245 0.9519611092 0.9519611019 0.9519610925 0.9519612468 0.9519610927 1.0 0.8183047481 0.8182429285 0.8182516669 0.8182429282 0.8182430031 0.8182429284

Substituting Equations (11), (30) and (31) in Equation subject to the initial conditions (7), we obtain  L y(0) = 1, y (0) = 0. (37) C T D(α) Q(x) + (C T D(β) Q(x)) xα−β +g(x, C T Q(x)) = h(x). (32) Wazwaz (2001) used the Adomian decomposition method and provided the following solution corre- Collocating Equation (32) at n − 1 collocation points sponding to (36)–(37): leads to (α) L (β) C T D Q(x ) + (C T D Q(x )) (e2 − 1) 1 (e4 − 1) i α−β i y(x) − x2 + x4 x 1 2 i (33) 12e 480 e T 6 2 4 + g(xi , C Q(xi )) 1 (2e + 3e − 3e − 2) − x6 = h(xi ), i = 1,...,n − 1. 30240 e3 1 (61e8 − 104e6 + 104e2 − 61) A set of suitable collocation points is defined as follows: + x8. 26127360 e4 1 iπ xi = cos + 1 , i = 1,...,n − 1. 2 n (34) Table 1 compares the approximation of y(x) obtained by the present methods with n = 18 and those pro- In addition, the initial conditions (8) provide two alge- vided in Parand et al. (2010) (denoted by Method 1), braic equations as Nasab et al. (2018) (denoted by Method 2), Wazwaz ( ) C T Q(0) = A, C T D 1 Q(0) = B. (35) (2001) (denoted by Method 3), Parand & Delkhosh (2017) (denoted by Method 4) and Parand & Hemami Finally, we can compute the values for the components (2017) (denoted by Method 5). Also, in Table 2, we of C by solving the system of equations (33) and (35). summarize the absolute error of our proposed methods Hence, the approximate solution for y(x) can be com- for n = 10 corresponding to four sample points and pro- puted by using Equation (11). vide a comparison between them and those obtained by Chebyshev wavelet method (Nasab et al. 2018) and col- 5. Illustrative examples location method based on Hermite polynomials (Parand et al. 2010). It is worth mentioning that the proposed In this section, the ability of the proposed methods to method in Nasab et al. (2018) needs to solve a non- − make desirable outcome solutions of singular Lane– linear system with 2k 1(M + 1) algebraic equations, Emden equations of fractional order will be examined. while our methods need to solve a nonlinear system in For numerical evaluation of the two methods, we will only n + 1 equations. Indeed, in comparison with the use either graphical or tabular displays of exact solu- methods presented in Parand et al. (2010), Nasab et al. tions versus numerical solutions. (2018); Wazwaz (2001); Parand & Delkhosh (2017) and Parand & Hemami (2017), Tables 1 and 2 indicate that Example 1. We consider the classic nonlinear Lane– our numerical schemes significantly lead to more accu- Emden equation rate approximations. Moreover, Figure 2 illustrates the  2  absolute error functions corresponding to our methods y (x) + y (x) + sinh (y(x)) = 0, x ≥ 0, (36) x with n = 4. J. Astrophys. Astr. (2019) 40:27 Page 9 of 12 27

Table 2. Comparison of absolute error for Example 1.

x Chebyshev wavelet method Hermite collocation method Present methods (n = 10) (Nasab et al. 2018) (Parand et al. 2010) The first The second (M = 10, k = 5)(n = 10) method method

0.14.48 × 10−11 7.10 × 10−05 8.34 × 10−13 1.94 × 10−12 0.21.22 × 10−11 8.64 × 10−05 3.89 × 10−12 5.07 × 10−13 0.57.37 × 10−08 7.65 × 10−05 9.15 × 10−09 9.15 × 10−09 1.08.74 × 10−06 5.31 × 10−05 8.73 × 10−06 8.73 × 10−06

Figure 2. Plot of the absolute error with n = 4, using the first method (left) and the second method (right) for Example 1.

6 Example 2. We consider the nonlinear spherical Lane– Dα y(x) + Dβ y(x) Emden equation of fractional order xα−β + 14y(x) + 4y(x) ln(y(x)) = 0, α 2 β − ( ) D y(x) + D y(x) = e y x , 0 < x ≤ 1. xα−β subject to nonhomogeneous initial conditions  with the initial conditions y(0) = 1, y (0) = 0.  α = β = y(0) = 0, y (0) = 0. The exact solution for the problem for 2and 1 is y(x) = exp(−x2) (Aminikhah & Moradian 2013). The exact/numerical solution of this problem with α = In Table 4, the absolute errors of the presented methods 3/2andβ = 3/4 has been computed by the technique with n = 7, 14 and α = 2,β = 1 are compared with of Abdel-Salam and Nouh (2016) as follows: those obtained by Laguerre wavelet (Zhou & Xu 2016) and Legendre wavelet (Aminikhah & Moradian 2013) 3 3 y(x) 0.2368456765x 2 − 0.02568610429x methods. As mentioned in Example 1, the above meth- 9 6 ods can be reduced to a nonlinear system of algebraic + 0.005004915254x 2 − 0.001292847099x equations while the nonlinear systems corresponding 15 + 0.0004026307151x 2 −··· . to the present methods are significantly smaller in size. The graphs of absolute error functions of our proposed We apply the proposed methods in Section 4, for solving methods for α = 2andβ = 1areshowninFigure this problem with n = 10, 15. In Table 3, we present 3. Also the graphs of computed solution arising from a comparison of the absolute error of our methods on the use of operational matrix of fractional integration uniform grid points. or differentiation, for different values of α and β and for n = 25 are illustrated in Figures 4 and 5. These fig- Example 3. In this example, we consider the fractional ures tell us that when α and β are approaching 2 and 1, nonlinear Lane–Emden equation respectively, the corresponding approximate solutions 27 Page 10 of 12 J. Astrophys. Astr. (2019) 40:27

Table 3. Comparison of absolute error for n = 10, 15 for Example 2.

x The first method The second method n = 10 n = 15 n = 10 n = 15

0.17.9 × 10−05 5.8 × 10−05 1.1 × 10−04 5.4 × 10−05 0.26.3 × 10−05 5.4 × 10−05 1.6 × 10−04 1.6 × 10−05 0.36.9 × 10−05 5.6 × 10−05 1.7 × 10−05 3.4 × 10−05 0.47.6 × 10−05 6.7 × 10−05 7.3 × 10−05 6.9 × 10−05 0.51.0 × 10−04 9.8 × 10−05 1.7 × 10−04 8.7 × 10−06 0.61.6 × 10−04 1.5 × 10−04 1.8 × 10−04 9.6 × 10−05 0.72.7 × 10−04 2.6 × 10−04 1.4 × 10−04 2.5 × 10−04 0.84.3 × 10−04 4.2 × 10−04 4.6 × 10−04 3.8 × 10−04 0.96.8 × 10−04 6.8 × 10−04 6.4 × 10−04 6.5 × 10−04

Table 4. Comparison of absolute error for n = 7, 14 for Example 3. x The first method The second method Legendre wavelet method Laguerre wavelet method n = 7 n = 14 n = 7 n = 14 M = 7, k = 3 M = 7, k = 1

0.15.4 × 10−07 1.2 × 10−13 1.6 × 10−8 4.4 × 10−14 2.7 × 10−9 4.8 × 10−6 0.26.2 × 10−07 7.0 × 10−14 2.5 × 10−7 1.0 × 10−13 2.5 × 10−9 6.8 × 10−6 0.39.1 × 10−08 7.8 × 10−14 6.8 × 10−8 1.1 × 10−13 9.8 × 10−10 8.0 × 10−7 0.43.4 × 10−07 7.9 × 10−14 7.8 × 10−7 1.0 × 10−13 1.0 × 10−10 8.3 × 10−6 0.57.4 × 10−07 5.7 × 10−14 4.6 × 10−7 4.8 × 10−14 8.9 × 10−11 1.2 × 10−5 0.62.8 × 10−07 6.3 × 10−14 1.0 × 10−6 3.2 × 10−15 4.0 × 10−11 5.3 × 10−5 0.71.7 × 10−07 3.6 × 10−14 1.4 × 10−6 3.6 × 10−14 1.5 × 10−11 2.0 × 10−4 0.84.5 × 10−07 5.8 × 10−14 6.8 × 10−7 2.4 × 10−14 3.8 × 10−11 5.9 × 10−4 0.92.2 × 10−07 2.5 × 10−15 1.5 × 10−6 2.0 × 10−14 6.6 × 10−11 1.4 × 10−3

Figure 3. Plot of the absolute error with n = 16, using the first method (left) and the second method (right) for Example 3. J. Astrophys. Astr. (2019) 40:27 Page 11 of 12 27

Figure 4. The graph of y(x) using the first method for different values of α and β with n = 25 for Example 3.

Figure 5. The graph of y(x) using the second method for different values of α and β with n = 25 for Example 3.

Figure 6. Plot of the absolute error with n = 15, using the first method (left) and the second method (right) for Example 4. tend to the solution of the classic Lane–Emden prob- subject to homogeneous initial conditions: lem with α = 2andβ = 1.  y(0) = 0, y (0) = 0,

where Example 4. Consider the following fractional Lane– 72 x3 28 x Emden equation: h(x) = sin(x3 − x2) + − . 5 π 3 π α = / α 2 β The exact solution of this problem for 3 2and D y(x) + D y(x) + sin(y(x)) = h(x), β = / ( ) = 3 − 2 xα−β 1 2isy x x x . The graph of absolute error 27 Page 12 of 12 J. Astrophys. Astr. (2019) 40:27 functions of our numerical approaches with n = 15 are Chandrasekhar S. 1967, Introduction to Study of Stellar plotted in Figure 6. Structure, Dover, New York Dehghan M., Shakeri F. 2008, New Astron. 13, 53 Doha E. H., Bhrawy A. H., Ezz-Eldien S. S. 2011, Comput. 6. Conclusion Math. Appl., 62, 2364 Doha E. H., Bhrawy A. H., Ezz-Eldien S. S. 2012, Appl. In this research, we derive the operational matrices of Math. Modelling, 36, 4931 Emden R. 1907, Gaskugeln: Anwendungen der mechanis- fractional integration and differentiation for orthonor- chen Warmentheorie auf Kosmologie und meteorologische mal Bernstein polynomials. The operational matrices Probleme, Teubner, Leipzig and Berlin are used for numerical solution of the singular fractional Heydari M., Loghmani G. B., Hosseini S. M. 2017, Comput. Lane–Emden equations. Our methods are based on the Appl. Math., 36, 647 approximation of functions and collocation approach. Ibrahim R. W. 2013, Int. J. Math. Comput. Phys. Quantum The implementation of the present methods is very easy. Eng. 7, 300 Moreover, in comparison with existing methods, the Javadi S., Babolian E., Taheri Z. 2016, J. Comput. Appl. high accuracy is clearly documented for both the present Math., 303, 1 methods. Lakestani M., Dehghan M., Irandoust-pakchin S. 2012, Com- It is worthy to mention here that, the nature of polyno- mun. Nonlinear Sci. Numer. Simul., 17, 1149 mials and the easy and low cost utilization of operational Lane J. H. 1870, Am. J. Sci. Arts., 50, 57 matrices of differentiation and integration over OBP’s Li Y., Sun N. 2011, Comput. Math. Appl., 62, 1046 Marasi H. R., Sharifi N., Piri H. 2015, TWMS J. App. Eng. puts the present methods as computer-oriented numer- Math., 5, 124 ical methods. In our methods, by the aid of operational Mechee M. S., Senu N. 2012a, Appl. Math., 3, 851 matrices, the complicated fractional derivatives and Mechee M. S., Senu N. 2012b, Int. J. Diff. Equ. Appl., 11, their calculations reduce to a small system of linear or 157 nonlinear algebraic equations. We also notice that in Miller K. S., Ross B. 1993, An Introduction to the Fractional α the first method, we expand D z(x) as Equation (11) Calculus and Fraction Differentia Equations, John Wiley β α and find D z(x) and z(x) by integrating from D z(x). and Sons Inc., New York Thus, in this method, z(x) will be found from the expan- Momoniat E., Harley C. 2006, New Astron., 11, 520 sion of Dαz(x). However, in the second method, we Nasab A. K., Atabakan Z. P., Ismail A. I., Ibrahim R. W. 2018, expand the function y(x) by OBP’s, and we find Dαz(x) J. King Saud Univ., 30, 120 and Dβ z(x) by differentiation of the expansion of y(x). Oldham K. B., Spanier J. 1974, The Fractional Calculus, Aca- demic Press, New York Parand K., Dehghan M., Rezaei A. R., Ghaderi S. M. 2010, Comput. Phys. Commun., 181, 1096 Acknowledgements Parand K., Delkhosh M. 2017, J. Teknologi, 79, 25 Parand K., Hemami M. 2017, Int. J. Appl. Computat. Math., The authors wish to express their sincere thanks to 3, 1053 the anonymous referee for valuable suggestions that Parand K., Yousefi H., Delkhosh M. 2017, Rom. J. Phys. 62, improved the final manuscript. 57 Rostamy D., Alipour M., Jafari H., Baleanu D. 2013, Rom. J. Phys., 65, 334 References Rostamy D., Jafari H., Alipour M., Khalique C. M. 2014, Filomat, 28, 591 Abd-Elhameed W. M., Youssri Y.H., Doha E. H. 2014, Com- Saadatmandi A. 2014, Appl. Math. Modelling, 38, 1365 put. Methods Differ. Equ., 2, 171 Saadatmandi A., Dehghan M. 2010, Comput. Math. Appl., Abdel-Salam E. A. B., Nouh M. I. 2016, Astrophys., 59, 398 59, 1326 Akgül A., Karatas E., Baleanu D. 2015, Adv. Differ. Equ., Saadatmandi A., Dehghan M. 2011, Comput. Math. Appl., 2015, 220 62, 1135 Aminikhah H., Moradian S. 2013, ISRN Math. Phys., 2013, Shihab S. N., Naif T. N. 2014, Open Sci. J. Math. Appl., 2, 507145. 15 Bellucci M. A. 2014, arXiv:1404.2293v2 [math.CA] Taleb A., Dahmani Z. 2016, Kragujevac J. Math., 40, Bencheikh A., Chiter L., Hocine A. 2016, Glob. J. Pure Appl. 238 Math., 12, 4219 Wazwaz A. M. 2001, Appl. Math. Comput., 118, Bhrawy A. H., Taha T. M., Machado J. A. T. 2015, Nonlinear 287 Dynam., 81, 1023 Zhou F., Xu X. 2016, Adv. Differ. Equ., 2016, 17