# An accurate method for solving a singular second-order fractional Emden-Fowler problem

## Abstract

In this paper, we study a singular second-order fractional Emden-Fowler problem. The reproducing kernel Hilbert space method (RKHSM) is employed to compute an approximation to the proposed problem. The construction of the reproducing kernel based on orthonormal shifted Legendre polynomials is presented. The validity of the RKHSM is ascertained by presenting several examples. We prove the existence of solution of the singular second-order fractional Emden-Fowler problem. The convergence of the approximate solution using the proposed method is investigated. The uniform convergence of the approximate solution to the exact solution is presented. Error estimation to the proposed method is proven. The results reveal that the proposed analytical method can achieve excellent results in predicting the solutions of such problems.

## Introduction

Recently, fractional initial and boundary value problems have been studied extensively. Several forms of them have been proposed in standard models, and there has been a significant interest in developing numerical schemes for their solutions. Several numerical techniques, such as Laplace and Fourier transforms [1, 2], Adomian decomposition and variational iteration methods [3, 4], eigenvector expansion , differential transform and finite differences methods [6, 7], power series method , residual power series method , collocation method , operational matrix of fractional integration method [14, 15], and wavelet method [16, 17], are used to solve such problems. Many applications of fractional calculus to various branches of science such as engineering, physics and economics can be found in [18, 19]. Considerable attention has been given to the theory of fractional ordinary differential equations and integral equations [20, 21]. Additionally, the existence of solutions of ordinary and fractional boundary value problems using monotone iterative sequences has been investigated by several authors . Some applications are discussed by Singh et al. . They analyze a new fractional model of chemical kinetics system related to a newly discovered Atangana-Baleanu derivative with fractional order having nonsingular and nonlocal kernel. Also, Singh et al.  presented a reliable algorithm based on the local fractional homotopy perturbation. Moreover, Singh et al.  proposed a new numerical algorithm, namely q-homotopy analysis Sumudu transform method (q-HASTM), to obtain the approximate solution for the nonlinear fractional dynamical model of interpersonal and romantic relationships.

A reproducing kernel Hilbert space method (RKHSM) is a useful framework for constructing approximate solutions of linear and nonlinear boundary value problems. In recent years, a lot of attention has been devoted to the study of RKHSM to investigate various scientific models. The RKHSM, which accurately computes the series solution, is of great interest to applied sciences. This technique gives the solution in a rapidly convergent series with components that can be easily computed. We use the RKHSM to solve this problem since it is easy to implement and it gives very accurate results. This method is used for the investigation of several scientific applications, see  and . Kumar et al.  presented a new numerical scheme based on a combination of q-homotopy analysis approach and Laplace transform approach to examine the Fitzhugh-Nagumo (F-N) equation of fractional order. Kumar et al.  constituted a numerical algorithm based on the fractional homotopy analysis transform method to study the fractional model of Lienard’s equations. Baleanu et al.  considered the exact solutions of wave equations by the help of the local fractional Laplace variation iteration method (LFLVIM). They developed an iterative scheme for the exact solutions of local fractional wave equations (LFWEs).

In this paper, we discuss how to solve the following class of second-order fractional Emden-Fowler problems:

$$D^{2\alpha }u(x)+\frac{\lambda }{x^{\alpha }}D^{\alpha }u(x)+h(x)g \bigl(u(x)\bigr)=f(x),\quad x\in (0,1), \frac{1}{2}< \alpha \leq 1,$$
(1.1)

subject to

$$u(0)=a,\qquad D^{\alpha }u(0)=b,$$
(1.2)

where a and b are constants. When $$\alpha =1$$, $$\lambda =2$$, and $$h(x)=1$$, Eq. (1.1) becomes the Lane-Emden type equation. With some special forms of $$g(u(x))$$, they describe many phenomena in mathematical physics and astrophysics such as the thermal behavior of a spherical cloud of gas, theory of stellar structure, theory of thermionic currents, and isothermal gas spheres. We use the RKHSM to solve it. We derive the reproducing kernel and the RKHSM. In addition, we prove the existence and uniform convergence of the approximate solution using this approach. Error estimation for our approximation is proved. Moreover, some numerical examples are presented in Section 6 to show the efficiency of the proposed method.

We organize this paper as follows. In Section 2, we present some preliminaries which we use in this paper. In Section 3, we construct the reproducing kernel with fractional shifted Legendre polynomial form. In Section 4, we present the RKHSM for solving a second-order fractional Emden-Fowler problem. Convergence and error estimate of the proposed method are presented in this section. In Section 5, we present an iterative method to solve the second-order fractional nonlinear Emden-Fowler problem. This iterative method is a combination of the homotopy perturbation method and the RKHSM. Some numerical results are presented in Section 6 to illustrate the efficiency of the presented method. Finally, we conclude with some comments and conclusions in Section 7.

## Preliminaries

In this section, we review the definition and some preliminary results of Caputo fractional derivatives as well as the definition of fractional shifted Legendre functions and their properties.

### Definition 2.1

The Riemann-Liouville fractional integral operator $$I^{\alpha }$$ of order $$\alpha >0$$ on the usual Lebesgue space $$L_{1}[0,1]$$ is given by

\begin{aligned} I^{\alpha }f(x) =&\frac{1}{\Gamma (\alpha )} \int _{0}^{x}\frac{f(t)}{(x-t)^{1-\alpha }}\,dt, \\ I^{0}f(x) =&f(x), \end{aligned}

where $$\Gamma (\zeta )=\int_{0}^{\infty }t^{\zeta -1}e^{-t}\,dt$$ is the Euler gamma function, see [18, 45, 46].

For any $$f\in L_{1}[0,1]$$, $$\alpha ,\beta \geqslant 0$$, and $$\gamma >-1$$, $$I^{\alpha }$$ exists for any $$x\in [ 0,1]$$ and

$$I^{\alpha }x^{\gamma }=\frac{\Gamma (\gamma +1)}{\Gamma (\alpha +\gamma +1)}x^{\alpha +\gamma }.$$
(2.1)

### Definition 2.2

The Caputo fractional derivative of order α is defined by

$$D^{\alpha }f(x)=I^{n-\alpha }D^{n}f(x)=\frac{1}{\Gamma (n-\alpha )}\int _{0}^{x}\frac{f^{(n)}(t)}{(x-t)^{\alpha -n+1}}\,dt$$

provided that the integral exists, where $$n= [ \alpha ] +1$$, $$[ \alpha ]$$ is the integer part of the positive real number $$\alpha ,x>0$$.

The Caputo fractional derivative satisfies the following properties for $$f\in L_{1}[0,1]$$ and $$\alpha ,\beta \geqslant 0$$:

$$I^{\alpha }D^{\alpha }f(x)=f(x)-\sum _{k=0}^{n-1}f^{(k)}\bigl(0^{+} \bigr)\frac{x^{k}}{k!}$$
(2.2)

and

$$D^{\alpha }x^{\beta }=\frac{\Gamma (\beta +1)}{\Gamma (\beta -\alpha +1)}x^{\beta -\alpha }.$$
(2.3)

The basic concept of this paper is Legendre polynomials. For this reason, we study some of their properties.

### Definition 2.3

The Legendre polynomials $$\{\ell_{k}(x):k=0,1,2,\ldots \}$$ are the eigenfunctions of the Sturm-Liouville problem

$$\bigl(\bigl(1-x^{2}\bigr)\ell_{k}^{\prime }(x) \bigr)^{\prime }+k(k+1)\ell_{k}(x)=0,\quad x\in [ -1,1].$$

In order to use these polynomials on the interval $$[0,1]$$, we define the shifted Legendre polynomials by $$\ell S_{i}(x)=\ell_{i}(2x-1)$$. It is easy to see that

$$\int_{0}^{1}\ell S_{i}(z) \ell S_{j}(z)\,dz=\frac{1}{2i+1}\delta _{ij},$$

where $$\delta _{ij}= \bigl\{ \scriptsize{ \begin{array}{l@{\quad}l} 1 , & i=j \\ 0 , & i\neq j\end{array}}$$. In this paper, we use orthonormal fractional shifted Legendre functions which are defined by $$S_{i}(x)=\sqrt{(2i+1)\alpha } S\ell_{i}(x^{\alpha })$$, $$i=0,1,2,\ldots$$ . Then

$$\int_{0}^{1}S_{i}(x) S_{j}(x) x^{\alpha -1}\,dx=\delta _{ij}.$$

The reproducing kernel Hilbert space method is a useful numerical technique to solve nonlinear problems. The reproducing kernel is given by the following definition.

### Definition 2.4

Let A be a nonempty abstract set. A function $$K:A\times A\rightarrow C$$ is a reproducing kernel of the Hilbert space H if and only if

• $$K(\cdot,x)\in H$$ for all $$x\in A$$,

• $$(\phi (\cdot),K(\cdot,x))=\phi (x)$$ for all $$x\in A$$ and $$\phi \in H$$.

The second condition is called the reproducing property, and a Hilbert space which possesses a reproducing kernel is called a reproducing kernel Hilbert space (RKHS).

## Construction of a reproducing kernel with fractional shifted Legendre functions form

Let

$$\Omega =\operatorname{Span}\bigl\{ S_{0}(x),S_{1}(x),\ldots,S_{n}(x) \bigr\}$$

be the set of all orthonormal fractional shifted Legendre functions of degree $$\leq n\alpha$$ with the following inner product:

$$\bigl(u(y),v(y)\bigr)= \int_{0}^{1}u(y)v(y)y^{\alpha -1}\,dy$$

and the norm

$$\Vert u \Vert \sqrt{\bigl(u(y),u(y)\bigr)}.$$

It is easy to see that Ω is a Hilbert space. In the next theorem, we show that Ω is a reproducing kernel space, and we present its reproducing kernel.

### Theorem 3.1

Ω is a reproducing kernel space, and its reproducing kernel is

$$K_{n}(x,y)=\sum_{i=0}^{n}S_{i}(x)S_{i}(y).$$
(3.1)

### Proof

If $$u(x)\in \Omega$$, then

$$u(x)=\sum_{i=0}^{n}\alpha _{i}S_{i}(x).$$

Thus, for any $$y\in [ 0,1]$$,

$$K_{n}(\cdot,y)=\sum_{i=0}^{n}S_{i}(y)S_{i}( \cdot)\in \Omega$$

and

\begin{aligned} \bigl(u(x),K_{n}(x,y)\bigr) =&\Biggl(\sum _{i=0}^{n}\alpha _{i}S_{i}(x), \sum_{j=0}^{n}S_{j}(x)S_{j}(y) \Biggr) \\ =&\sum_{i=0}^{n}\sum _{j=0}^{n}\alpha _{i}S_{j}(y) \bigl(S_{i}(x),S_{j}(y)\bigr) \\ =&\sum_{i=0}^{n}\sum _{j=0}^{n}\alpha _{i}S_{j}(y) \\ =&u(y), \end{aligned}

which completes the proof. □

## Analysis of RKHSM for a second-order fractional linear initial Emden-Fowler problem

In this section, we discuss how to solve the following class of second-order fractional linear initial Emden-Fowler problems:

$$D^{2\alpha }u(x)+\frac{\lambda }{x^{\alpha }}D^{\alpha }u(x)=f(x), \quad x\in (0,1), \frac{1}{2}< \alpha \leq 1,$$
(4.1)

subject to

$$u(0)=0,\qquad D^{\alpha }u(0)=0.$$
(4.2)

Let

$$Lu(x)=D^{2\alpha }u(x)+\frac{\lambda }{x^{\alpha }}D^{\alpha }u(x).$$

Then L is a linear operator. Let $$\{ x_{1},x_{2},\ldots,x_{n} \}$$ be n nodes of nodes in the interval $$[0,1]$$. In this paper, we choose

$$x_{j}=\frac{1+\cos (\frac{\pi j}{n})}{2},\quad j=1,2,\ldots n.$$

Let

$$\psi _{i}(x)=L_{\eta }K_{n}(x,\eta )_{\shortmid _{\eta =x_{i}}}$$

for $$i=1,2,\ldots,n$$, $$\psi _{n+1}(x)=S_{n+1}(x)$$, and $$\psi _{n+2}(x)=S_{n+2}(x)$$. Using the Gram-Schmidt orthonormalization to generate orthonormal basis $$\{ \overset{\_}{\psi }_{i}(x) \} _{i=1}^{n+2}$$ of Ω, we have

$$\overset{\_}{\psi }_{i}(x)=\sum _{j=1}^{i}\alpha _{ij}\psi _{j}(x),$$
(4.3)

where $$\alpha _{ij}$$ are the coefficients of Gram-Schmidt orthonormalization, $$\alpha _{ii}>0$$, $$i=1,2,\ldots,n+2$$. In the next theorem, we show the existence of solution of Problem (4.1)-(4.2).

### Theorem 4.1

The approximate solution of Problem (4.1)-(4.2) is given by

$$u_{n}(x)=\sum_{i=1}^{n} \sum_{j=1}^{i}\alpha _{ij}f(x_{j})\overset{\_}{\psi }_{i}(x)+\gamma _{1}\overset{\_}{\psi }_{n+1}(x)+\gamma _{2}\overset{\_}{\psi }_{n+2}(x).$$
(4.4)

### Proof

From Eq. (4.3) and from the fact that $$K_{n}(x,\eta )$$ is a reproducing kernel and $$Lu(\eta )=f(\eta )$$, we get

\begin{aligned} u_{n}(x) =&\sum_{i=1}^{n+2} \bigl(u(x),\overset{\_}{\psi }_{i}(x)\bigr)\overset {\_}{ \psi }_{i}(x) \\ =&\sum_{i=1}^{n}\bigl(u(x),\overset{\_}{ \psi }_{i}(x)\bigr)\overset{\_}{\psi }_{i}(x)+ \bigl(u(x),\overset{\_}{\psi }_{n+1}(x)\bigr)\overset{\_}{\psi }_{n+1}(x)+\bigl(u(x),\overset{\_}{\psi }_{n+2}(x) \bigr)\overset{\_}{\psi }_{n+2}(x) \\ =&\sum_{i=1}^{n}\Biggl(u(x),\sum _{j=1}^{i}\alpha _{ij}L_{\eta }K_{n}(x, \eta )_{\shortmid _{\eta =x_{j}}}\Biggr)\overset{\_}{\psi }_{i}(x)+ \bigl(u(x),\overset{\_}{\psi }_{n+1}(x)\bigr)\overset{\_}{ \psi }_{n+1}(x)\\ &{}+\bigl(u(x),\overset{\_}{\psi }_{n+2}(x)\bigr)\overset{\_}{\psi }_{n+2}(x) \\ =&\sum_{i=1}^{n}\sum _{j=1}^{i}\alpha _{ij}L_{\eta } \bigl(u(x),K_{n}(x,\eta )_{\shortmid _{\eta =x_{j}}}\bigr)\overset{\_}{\psi }_{i}(x)+\bigl(u(x),\overset{\_}{\psi }_{n+1}(x) \bigr)\overset{\_}{\psi }_{n+1}(x)\\ &{}+\bigl(u(x),\overset{\_}{ \psi }_{n+2}(x)\bigr)\overset{\_}{\psi }_{n+2}(x) \\ =&\sum_{i=1}^{n}\sum _{j=1}^{i}\alpha _{ij}L_{\eta }\bigl(u( \eta )\bigr)_{\shortmid _{\eta =x_{j}}}\overset{\_}{\psi }_{i}(x)+\bigl(u(x),\overset{ \_}{\psi }_{n+1}(x)\bigr)\overset{\_}{\psi }_{n+1}(x)+\bigl(u(x),\overset{\_}{\psi }_{n+2}(x) \bigr)\overset{\_}{\psi }_{n+2}(x) \\ =&\sum_{i=1}^{n}\sum _{j=1}^{i}\alpha _{ij}f(x_{j}) \overset{\_}{\psi }_{i}(x)+\gamma _{1}\overset{ \_}{\psi }_{n+1}(x)+\gamma _{2}\overset {\_}{\psi }_{n+2}(x), \end{aligned}

where $$\gamma _{1}=(u(x),\overset{\_}{\psi }_{n+1}(x))$$ and $$\gamma _{2}=(u(x),\overset{\_}{\psi }_{n+2}(x))$$. To find $$\gamma _{1}$$ and $$\gamma _{2}$$, we set

$$u_{n}(0)=D^{\alpha }u_{n}(0)=0.$$

Next, we want to prove that $$u_{n}(x)$$ is a solution to Eqs. (4.1)-(4.2) at $$x_{i}$$ for $$i=1,2,\ldots,n$$. For any $$k\in \{1,2,\ldots,n\}$$,

\begin{aligned} Lu_{n}(x_{k}) =&\sum_{i=1}^{n} \sum_{j=1}^{i}\alpha _{ij}f(x_{k})L_{x} \overset{\_}{\psi }_{i}(x)_{\shortmid _{\eta =xk}}+\gamma L_{x} \overset{\_}{\psi }_{n+1}(x)_{\shortmid _{\eta =x_{k}}} \\ =&\sum_{i=1}^{n}\sum _{j=1}^{i}\alpha _{ij}f(x_{k})L_{x} \bigl(\overset{\_}{\psi }_{i}(\eta ),K_{n}(x, \eta )_{\shortmid _{\eta =x_{k}}}\bigr)+\gamma L_{x}\bigl(\overset{\_}{\psi }_{n+1}(\eta ),K_{n}(x,\eta )_{\shortmid _{\eta =x_{k}}}\bigr) \\ =&\sum_{i=1}^{n}\sum _{j=1}^{i}\alpha _{ij}f(x_{k}) \bigl(\overset{\_}{\psi }_{i}(\eta ),L_{x}K_{n}(x, \eta )_{\shortmid _{\eta =x_{k}}}\bigr)+\gamma \bigl(\overset{\_}{\psi }_{n+1}(\eta ),L_{x}K_{n}(x,\eta )_{\shortmid _{\eta =k}}\bigr) \\ =&\sum_{i=1}^{n}\sum _{j=1}^{i}\alpha _{ij}f(x_{k}) \bigl(\overset{\_}{\psi }_{i}(\eta ),\psi _{k}( \eta )\bigr)_{\shortmid _{\eta =x_{k}}}+\gamma \bigl(\overset{\_}{\psi }_{n+1}(\eta ),\psi _{k}(\eta )\bigr)_{\shortmid _{\eta =x_{k}}}. \end{aligned}

Then, for any $$m\in \{1,2,\ldots,n\}$$,

\begin{aligned} \sum_{l=1}^{m}\alpha _{ml }Lu_{n}(x_{k}) =&\sum_{l=1}^{m}\alpha _{ml } \Biggl[ \sum_{i=1}^{n}\sum _{j=1}^{i}\alpha _{ij}f(x_{k}) \bigl(\overset{\_}{\psi }_{i}(\eta ),\psi _{k}( \eta )\bigr)_{\shortmid _{\eta =x_{k}}} \\ &{}+\gamma _{1}\bigl(\overset{\_}{\psi }_{n+1}(\eta ),\psi _{k}(\eta )\bigr)_{\shortmid _{\eta =x_{k}}}+\gamma _{2}\bigl(\overset{ \_}{\psi }_{n+2}(\eta ),\psi _{k}(\eta )\bigr)_{\shortmid _{\eta =x_{k}}}\Biggr] \\ =&\sum_{i=1}^{n}\sum _{j=1}^{i}\alpha _{ij}f(x_{k}) \Biggl(\overset{\_}{\psi }_{i}(\eta ),\sum _{l=1}^{m}\alpha _{ml }\psi _{k}( \eta )\Biggr)_{\shortmid _{\eta =x_{k}}} \\ &{}+\gamma _{1}\Biggl(\overset{\_}{\psi }_{n+1}(\eta ),\sum _{l=1}^{m}\alpha _{ml }\psi _{k}(\eta )\Biggr)_{\shortmid _{\eta =x_{k}}}+\gamma _{2}\Biggl( \overset{\_}{\psi }_{n+2}(\eta ),\sum _{l=1}^{m}\alpha _{ml }\psi _{k}( \eta )\Biggr)_{\shortmid _{\eta =x_{k}}} \\ =&\sum_{i=1}^{n}\sum _{j=1}^{i}\alpha _{ij}f(x_{k}) \bigl(\overset{\_}{\psi }_{i}(\eta ),\overset{\_}{\psi }_{m}(\eta )\bigr)_{\shortmid _{\eta =x_{k}}} \\ &{}+\gamma _{1}\bigl(\overset{\_}{\psi }_{n+1}(\eta ), \overset{\_}{\psi }_{m}(\eta )\bigr)_{\shortmid _{\eta =x_{k}}}+\gamma _{2}\bigl(\overset{\_}{\psi }_{n+2}(\eta ),\overset{\_}{\psi }_{m}(\eta )\bigr)_{\shortmid _{\eta =x_{k}}} \\ =&\sum_{i=1}^{m}\alpha _{mj}f(x_{k}) \delta _{im}, \end{aligned}

where $$\delta _{ij}= \bigl\{\scriptsize{ \begin{array}{l@{\quad}l} 1, & i=j \\ 0, & i\neq j\end{array}} \bigr\}$$. This implies that

$$Lu_{n}(x_{k})=f(x_{k})$$

for $$k=1,2,\ldots,n$$. □

In the next theorem, we present the error estimate of our approximation.

### Theorem 4.2

Let $$u_{n}(x)$$ be the approximate solution of Eq. (4.1) in the space Ω and $$u(x)$$ be the exact solution of Eq. (4.1). If $$\{ x_{i} \} _{i=1}^{n}$$ is n nodes in $$[0,1]$$ and $$f(x)\in C^{4}[0,1]$$, then

$$\sup_{x\in [ 0,1]} \bigl\Vert u(x)-u_{n}(x) \bigr\Vert \leq Ch^{3},$$

where C is constant and

$$h=\max_{i\in \{1,2,\ldots,n-1\}} \vert x_{i+1}-x_{i} \vert .$$

### Proof

Let

$$R_{n}(x)=Lu_{n}(x)-f(x).$$

From Theorem 4.1, we see that

$$R_{n}(x_{i})=0$$

for $$i=1,2,\ldots,n$$. Using Roll’s theorem, we get

$$R_{n}^{\prime }(y_{i})=0,\quad y_{i}\in (x_{i},x_{i+1}), i=1,2,\ldots,n-1,$$

and

$$R_{n}^{\prime \prime }(z_{i})=0,\quad z_{i}\in (y_{i},y_{i+1}), i=1,2,\ldots,n-2.$$

Let $$l_{i}(x)$$ be an interpolating polynomial of degree 1 of $$R_{n}^{\prime \prime }(x)$$ at $$z_{1}$$ and $$z_{i+1}$$, where $$i\in \{1,2,\ldots,n-2\}$$. Then $$l\equiv 0$$ on $$[z_{i},z_{i+1}]$$. Then there exists $$\zeta _{i}\in [ x_{i},z_{i+1}]$$ and a constant $$\omega _{i}$$ such that

$$R_{n}^{\prime \prime }(x)=R_{n}^{\prime \prime }(x)-l_{i}(x)= \frac{R^{(4)}(\zeta _{i})}{2}(x-z_{i}) (x-z_{i+1})\leq \omega _{i}h^{2},\quad x\in [ x_{i},z_{i+1}].$$

Thus,

$$\sup_{x\in [ 0,1]} \bigl\Vert R_{n}^{\prime \prime }(x) \bigr\Vert \leq \omega h^{2},$$

where $$\omega =\max \{\omega _{1},\omega _{2},\ldots,\omega _{n-2}\}$$. Hence,

$$R_{n}^{\prime }(x)= \int_{y_{i}}^{x}R_{n}^{\prime \prime }(t)\,dt, \quad x\in [ x_{i},x_{i+1}],i=1,2,\ldots,n-1,$$

which implies that

$$\bigl\vert R_{n}^{\prime }(x) \bigr\vert \leq \sup _{x\in [ 0,1]} \bigl\Vert R_{n}^{\prime \prime }(x) \bigr\Vert \vert x-y_{i} \vert \leq \omega h^{2}h=\omega h^{3}.$$

Moreover,

$$R_{n}(x)= \int_{x_{i}}^{x}R_{n}^{\prime }(v)\,dv, \quad x\in [ x_{i},x_{i+1}],i=1,2,\ldots,n-1,$$

which implies that

$$\bigl\vert R_{n}(x) \bigr\vert \leq \sup_{x\in [ 0,1]} \bigl\Vert R_{n}^{\prime \prime }(x) \bigr\Vert \vert x-x_{i} \vert \leq \omega h^{3}h=\omega h^{4}.$$

Thus,

$$\sup_{x\in [ 0,1]} \bigl\Vert R_{n}(x) \bigr\Vert \leq \omega h^{4}.$$

Now,

\begin{aligned} \bigl\Vert R_{n}(x) \bigr\Vert _{1}^{2}&=R_{n}^{2}(0)+ \int_{0}^{1}R_{n}^{\prime 2}(x)\,dx \\ &\leq \omega h^{8}+\omega ^{2}h^{6}\leq \kappa ^{2}h^{6} \end{aligned}

for some positive constant κ. Thus,

\begin{aligned} \bigl\Vert u(x)-u_{n}(x) \bigr\Vert _{\Omega } =& \bigl\Vert L^{-1}R_{n}(x) \bigr\Vert _{\Omega } \\ \leq & \bigl\Vert L^{-1} \bigr\Vert _{\Omega } \bigl\Vert R_{n}(x) \bigr\Vert _{1} \\ \leq & \bigl\Vert L^{-1} \bigr\Vert _{\Omega } \kappa h^{3}=\varrho h^{3}, \end{aligned}

where $$\varrho = \Vert L^{-1} \Vert _{\Omega } \kappa$$. Then

$$\sup_{x\in [ 0,1]} \bigl\Vert u(x)-u_{n}(x) \bigr\Vert \leq ch^{3}.$$

In case that the initial condition is given by

$$u(0)=a\quad \text{and}\quad D^{\alpha }u(0)=b,$$

we use the following change of variable:

$$y(x)=u(x)-a-bx^{\alpha }.$$

Thus, our problem becomes

$$D^{2\alpha }y(x)+\frac{\lambda }{x^{\alpha }}D^{\alpha }y(x)=g(x),\quad x\in (0,1), 0< \alpha (x)< 1,$$

subject to

$$y(0)=D^{\alpha }y(0)=0,$$

where $$g(x)=f(x)+\frac{b \lambda }{x^{\alpha }}$$. Then we apply the procedure which is described in this section. □

## Analysis of RKHSM for the second-order fractional nonlinear initial Emden-Fowler problem

In this section, we discuss how to solve the following class of second-order fractional nonlinear initial Emden-Fowler problems:

$$D^{2\alpha }u(x)+\frac{\lambda }{x^{\alpha }}D^{\alpha }u(x)+h(x)g \bigl(u(x)\bigr)=f(x),\quad x\in (0,1), \frac{1}{2}< \alpha \leq 1,$$
(5.1)

subject to

$$u(0)=a,\qquad D^{\alpha }u(0)=b.$$
(5.2)

Let

$$\Psi (x,u)=h(x)g\bigl(u(x)\bigr).$$

We construct a homotopy as follows:

$$H(u,\kappa )=D^{2\alpha }u(x)+\frac{\lambda }{x^{\alpha }}D^{\alpha }u(x)-f(x)+ \kappa \Psi (x,u)=0,$$
(5.3)

where $$\kappa \in [ 0,1]$$ is an embedding parameter. If $$\kappa =0$$, we get a linear equation

$$D^{2\alpha }u(x)+\frac{\lambda }{x^{\alpha }}D^{\alpha }u(x)-f(x)=0$$

which can be solved by using RKHSM as we described in the pervious section. If $$\lambda =1$$, it turns out to be Problem (4.1). Following the homotopy perturbation method , we expand the solution in terms of the homotopy parameter κ as

$$u=u_{0}+\kappa u_{1}+\kappa ^{2}u_{2}+\kappa ^{3}u_{3}+\cdots.$$
(5.4)

Substitute Eq. (5.4) into Eq. (5.3) and equate the coefficients of identical powers of λ to get the following system:

\begin{aligned} \kappa ^{0} :&D^{2\alpha }u_{0}(x)+\frac{\lambda }{x^{\alpha }}D^{\alpha }u_{0}(x)-f(x) =0,\quad u_{0}(0)=a, D^{\alpha }u_{0}(0)=b, \\ \kappa ^{1} :&D^{2\alpha }u_{1}(x)+ \frac{\lambda }{x^{\alpha }}D^{\alpha }u_{1}(x)=-\Psi \Biggl(x,\sum _{i=0}^{\infty }\kappa ^{i}u_{i} \Biggr)\biggm| _{\kappa =0} ,\quad u_{1}(0)=D^{\alpha }u_{0}(0)=0, \\ \kappa ^{2} :&D^{2\alpha }u_{2}(x)+ \frac{\lambda }{x^{\alpha }}D^{\alpha }u_{2}(x)=-\frac{d\Psi (x,\sum_{i=0}^{\infty }\kappa ^{i}u_{i})}{d\kappa }\biggm| _{\kappa =0} ,\quad u_{2}(0)=D^{\alpha }u_{2}(0)=0, \\ \kappa ^{3} :&D^{2\alpha }u_{3}(x)+ \frac{\lambda }{x^{\alpha }}D^{\alpha }u_{3}(x)=-\frac{d^{2}\Psi (x,\sum_{i=0}^{\infty }\kappa ^{i}u_{i})}{d\kappa ^{2}}\biggm| _{\kappa =0} ,\quad u_{3}(0)=D^{\alpha }u_{3}(0)=0, \\ &\vdots \\ \kappa ^{k} :&D^{2\alpha }u_{k}(x)+ \frac{\lambda }{x^{\alpha }}D^{\alpha }u_{k}(x)=-\frac{d^{k-1}\Psi (x,\sum_{i=0}^{\infty }\kappa ^{i}u_{i})}{d\kappa ^{k-1}}\biggm| _{\kappa =0} ,\quad u_{k}(0)=D^{\alpha }u_{k}(0)=0. \end{aligned}

To solve the above equations, we use the RKHSM which is described in the previous section, and we obtain

$$u_{k}(\eta )=\sum_{i=1}^{\infty } \sum_{j=1}^{i}\alpha _{ij}w_{k}(x_{j}) \overset{\_}{\psi }_{i}(x), \quad k=0,1,2,\ldots,$$
(5.5)

where

\begin{aligned} w_{0}(x) =&f(x) \\ w_{1}(x) =&-\Psi \Biggl(x,\sum_{i=0}^{\infty } \kappa ^{i}u_{i}\Biggr)\biggm| _{\kappa =0} \\ &\vdots \\ w_{k}(x) =&-\frac{d^{k-1}\Psi (x,\sum_{i=0}^{\infty }\kappa ^{i}u_{i})}{d\kappa ^{k-1}}\biggm| _{\kappa =0},\quad k=2,3,\ldots. \end{aligned}

From Eq. (5.4), it is easy to see that the solution to Problem (5.1)-(5.2) is given by

$$u(x)=\sum_{k=0}^{\infty }u_{k}(x) =\sum_{k=0}^{\infty } \Biggl( \sum _{i=1}^{\infty }\sum_{j=1}^{i} \alpha _{ij}w_{k}(x_{j})\overset{\_}{\psi }_{i}(x) \Biggr) .$$
(5.6)

We approximate the solution of Problem (5.1)-(5.2) by

$$u_{N,M}(x)=\sum_{k=0}^{m} \Biggl( \sum_{i=1}^{n}\sum _{j=1}^{i}\alpha _{ij}w_{k}(x_{j}) \overset{\_}{\psi }_{i}(x) \Biggr) .$$
(5.7)

## Results and discussion

In this section, we apply the fractional shifted Legendre functions reproducing kernel method outlined in the previous sections to solve numerically the following five examples. Note that the maximum number of terms in the series is $$M=15$$. Let the absolute error be defined by

$$e_{\alpha }= \underset{x\in [ 0,1]}{\max } \biggl\vert D^{2\alpha }u(x)+\frac{\lambda }{x^{\alpha }}D^{\alpha }u(x)+h(x)g \bigl(u(x)\bigr)-f(x) \biggr\vert .$$

### Example 6.1

Consider the following second-order fractional Emden-Fowler problem:

$$D^{2\alpha }u(x)+\frac{1}{x^{\alpha }}D^{\alpha }u(x)-u(x)=0, \quad x\in (0,1),$$
(6.1)

subject to

$$u(0)=1,\qquad D^{\alpha }u(0)=0.$$
(6.2)

The graphs of the approximate solutions for different values of α are given in Figure 1. The absolute error obtained by the presented method is shown in Table 1.

### Example 6.2

Consider the following second-order fractional Emden-Fowler problem:

$$D^{2\alpha }u(x)+\frac{1}{x^{\alpha }}D^{\alpha }u(x)+2u^{3}(x)=0, \quad x\in (0,1),$$
(6.3)

subject to

$$u(0)=0.1,\qquad D^{\alpha }u(0)=0.$$

The graphs of the approximate solutions for different values of α are given in Figure 2. The absolute error obtained by the presented method is shown in Table 2.

### Example 6.3

Consider the following second-order fractional Emden-Fowler problem:

$$D^{2\alpha }u(x)+\frac{1}{x^{\alpha }}D^{\alpha }u(x)-u^{3}(x)+3u^{3}(x)=0, \quad x\in (0,1),$$
(6.4)

subject to

$$u(0)=0.5,\qquad D^{\alpha }u(0)=0.$$
(6.5)

The graphs of the approximate solutions for different values of α are given in Figure 3. The absolute error obtained by the presented method is shown in Table 3.

### Example 6.4

Consider the following second-order fractional Emden-Fowler problem:

$$D^{2\alpha }u(x)+\frac{2}{x^{\alpha }}D^{\alpha }u(x)- \bigl(6+4x^{2\alpha }\bigr)u(x)=6-6x^{2\alpha }-4x^{4\alpha },\quad x \in (0,1),$$
(6.6)

subject to

$$u(0)=0.7,\qquad D^{\alpha }u(0)=0.$$
(6.7)

The graphs of the approximate solutions for different values of α are given in Figure 4. The absolute error obtained by the presented method is shown in Table 4.

### Example 6.5

Consider the following second-order fractional Emden-Fowler problem:

$$D^{2\alpha }u(x)+\frac{4}{x^{\alpha }}D^{\alpha }u(x)- \bigl(18+9x^{4\alpha }\bigr)u(x)=20-36x^{3\alpha }-18x^{6\alpha }, \quad x\in (0,1),$$
(6.8)

subject to

$$u(0)=1,\qquad D^{\alpha }u(0)=0.$$
(6.9)

The graphs of the approximate solutions for different values of α are given in Figure 5. The absolute error obtained by the presented method is shown in Table 5.

## Conclusions

In this paper, we study the second-order fractional Emden-Fowler problem. The reproducing kernel Hilbert space method (RKHSM) is employed to compute an approximate solution to the proposed problem. The construction of the reproducing kernel based on the orthonormal shifted Legendre polynomials is presented. The validity of the RKHSM is ascertained by presenting five of our examples. It is worth mentioning that we get the same results as those in Wazwaz  for Examples 6.3-6.5 when $$\alpha =1$$. We prove the existence of solution of the second-order fractional Emden-Fowler problem. The convergence of the approximate solution using the proposed method is investigated. The uniform convergence of the approximate solution to the exact solution is presented. Error estimation to the proposed method is proven. The results reveal that the proposed analytical method can achieve excellent results in predicting the solutions of such problems.

## References

1. 1.

Gaul, L, Klein, P, Kemple, S: Damping description involving fractional operators. Mech. Syst. Signal Process. 5, 81-88 (1991)

2. 2.

Podlubny, I: Fractional Differential Equations: An Introduction to Fractional Derivatives, Fractional Differential Equations, to Methods of Their Solution and Some of Their Applications. Academic Press, New York (1999)

3. 3.

Al-Khaled, K, Momani, S: An approximate solution for a fractional diffusion-equation using the decomposition method. Appl. Math. Comput. 165(2), 473-483 (2005)

4. 4.

Das, S: Analytical solution of a fractional diffusion equation by variational iteration method. Comput. Math. Appl. 57(3), 483-487 (2009)

5. 5.

Suarez, L, Shokooh, A: An eigenvector expansion method for the solution of motion containing fractional derivatives. J. Appl. Mech. 64, 629-635 (1997)

6. 6.

Arikoglu, A, Ozkol, I: Solution of fractional integro-differential equations by using fractional differential transform method. Chaos Solitons Fractals 40(2), 521-529 (2009)

7. 7.

Meerschaert, M, Tadjeran, C: Finite difference approximations for two-sided space-fractional partial differential equations. Appl. Numer. Math. 56(1), 80-90 (2006)

8. 8.

Odibat, Z, Shawagfeh, N: Generalized Taylor’s formula. Appl. Math. Comput. 186(1), 286-293 (2007)

9. 9.

Alquran, M, Al-Khaled, K, Chattopadhyay, J: Analytical solutions of fractional population diffusion model: residual power series. Nonlinear Stud. 22(1), 31-39 (2015)

10. 10.

Alquran, M: Analytical solution of time-fractional two-component evolutionary system of order 2 by residual power series method. J. Appl. Anal. Comput. 5(4), 589-599 (2015)

11. 11.

Alquran, M, Al-Khaled, K, Sarda, T, Chattopadhyay, J: Revisited Fisher’s equation in a new outlook: a fractional derivative approach. Physica A 438, 81-93 (2015)

12. 12.

Jaradat, HM, Al-Shara, S, Khan, QJA, Alquran, M, Al-Khaled, K: Analytical solution of time-fractional Drinfeld-Sokolov-Wilson system using residual power series method. IAENG Int. J. Appl. Math. 46(1), 64-70 (2016)

13. 13.

Al-Mdallal, Q, Syam, M, Anwar, MN: A collocation-shooting method for solving fractional boundary value problems. Commun. Nonlinear Sci. Numer. Simul. 15(12), 3814-3822 (2010)

14. 14.

Li, Y, Sun, N: Numerical solution of fractional differential equations using the generalized block pulse operational matrix. Comput. Math. Appl. 62, 1046-1054 (2011)

15. 15.

Pandey, R, Bhaedwaj, A, Syam, MI: An efficient method for solving fractional differential equations using Bernstein polynomials. J. Fract. Calc. Appl. 5(1), 129-145 (2014)

16. 16.

Li, Y: Solving a nonlinear fractional differential equation using Chebyshev wavelets. Commun. Nonlinear Sci. Numer. Simul. 15, 2284-2292 (2010)

17. 17.

Wu, J: A wavelet operational method for solving fractional partial differential equations numerically. Appl. Math. Comput. 214(1), 31-40 (2009)

18. 18.

Kilbas, A, Srivastave, H, Trujillo, J: Theory and Applications of Fractional Differential Equations. North-Holland Mathematics Studies, vol. 204. Elsevier Science BV, Amsterdam (2006)

19. 19.

Samko, SG, Kilbas, AA, Marichev, OI: Fractional Integrals and Derivative. Theory and Applications. Gordon and Breach, Yverdon (1993)

20. 20.

Lakshmikantham, V, Vatsala, A: Basic theory of fractional differential equations. Nonlinear Anal. 69, 2677-2682 (2008)

21. 21.

Zhang, S: Existence of solution for a boundary value problem of fractional order. Acta Math. Sci. 26, 220-228 (2006)

22. 22.

Agarwal, RP, Benchohra, N, Hamani, S: A survey on existing results for boundary problems of nonlinear fractional differential equations and inclusions. Acta Appl. Math. 109, 973-1033 (2010)

23. 23.

Lakshmikantham, V, Vatsala, A: General uniqueness and monotone iterative technique for fractional differential equations. Appl. Math. Lett. 21, 828-834 (2008)

24. 24.

Oldham, K, Spanier, J: The Fractional Calculus. Academic, New York (1974)

25. 25.

Pao, CV: Nonlinear Parabolic and Elliptic Equations. Plenum Press, New York (1992)

26. 26.

Singh, J, Kumar, D, Baleanu, D: On the analysis of chemical kinetics system pertaining to a fractional derivative with Mittag-Leffler type kernel. Chaos 27, 103113 (2017)

27. 27.

Singh, J, Kumar, D, Nieto, J: A reliable algorithm for local fractional Tricomi equation arising in fractal transonic flow. Entropy 18(6), 206 (2016). https://doi.org/10.3390/e18060206

28. 28.

Singh, J, Kumar, D, Al Qurashi, M, Baleanu, D: A novel numerical approach for a nonlinear fractional dynamical model of interpersonal and romantic relationships. Entropy 19(7), 375 (2017). https://doi.org/10.3390/e19070375

29. 29.

Geng, F, Cui, M: Solving a nonlinear system of second order boundary value problems. J. Math. Anal. Appl. 327, 1167-1181 (2007)

30. 30.

Du, J, Cui, M: Solving the forced Duffing equations with integral boundary conditions in the reproducing kernel space. Int. J. Comput. Math. 87, 2088-2100 (2010)

31. 31.

Siyyam, HI, Syam, MI: An accurate solution of the Poisson equation by the Chebyshev-Tau method. Am. J. Comput. Appl. Math. 85(1), 1-10 (1997)

32. 32.

Syam, MI, Al-Sharo’, SM: Collocation-continuation technique for solving nonlinear boundary value problem. Comput. Math. Appl. 37, 11-17 (1999)

33. 33.

Attili, B, Furati, K, Syam, MI: An efficient implicit Runge–Kutta method for second order systems. Appl. Math. Comput. 178(2), 229-238 (2006)

34. 34.

Syam, MI, Siyyam, HI: Numerical differentiation of implicitly defined curves. J. Comput. Appl. Math. 108(1-2), 131-144 (1999)

35. 35.

Syam, M: The modified Broyden-variational method for solving nonlinear elliptic differential equations. Chaos, Solitions & Fractals 32(2), 392-404 (2007)

36. 36.

Kumar, D, Singh, J, Baleanu, D: A new numerical algorithm for fractional Fitzhugh-Nagumo equation arising in transmission of nerve impulses. Nonlinear Dyn. (2017). https://doi.org/10.1007/s11071-017-3870-x

37. 37.

Kumar, D, Agarwal, RP, Singh, J: A modified numerical scheme and convergence analysis for fractional model of Lienard’s equation. J. Comput. Appl. Math. (2017) http://doi.org/10.1016/j.cam.2017.03.011

38. 38.

Baleanu, D, Khan, H, Jafari, H, Khan, R: On the exact solution of wave equations on Cantor sets. Entropy 17, 6229-6237 (2015). https://doi.org/10.3390/e17096229

39. 39.

Jafari, H, Baleanu, D, Khan, H, Khan, R, Khan, A: Existence criterion for the solution of fractional order p-Laplacian boundary value problems. Bound. Value Probl. 2015, 164 (2015). https://doi.org/10.1186/s13661-015-0425-2

40. 40.

Baleanu, D, Jafari, H, Khan, H, Johnston, S: Results for mild solution of fractional coupled hybrid boundary value problems. Open Math. 13, 601-608 (2015)

41. 41.

Baleanu, D, Khan, H, Jafari, H, Khan, RA, Alipour, M: On existence results for solutions of a coupled system of hybrid boundary value problems with hybrid conditions. Adv. Differ. Equ. 2015, 318 (2015)

42. 42.

Baleanu, D, Agarwal, R, Khan, H, Khan, R, Jafari, H: On the existence of solution for fractional differential equations of order $$3< \delta_{1} \leq 4$$. Adv. Differ. Equ. 2015, 362 (2015)

43. 43.

Khan, H, Alipour, M, Khan, R, Tajadodi, H, Khan, A: On approximate solution of fractional order logistic equations by operational matrices of Bernstein polynomials. J. Math. Comput. Sci. 14, 222-232 (2015)

44. 44.

Khan, H, Jafari, H, Khan, R, Tajadodi, H, Johnston, S: Numerical solutions of the nonlinear fractional-order Brusselator system by Bernstein Polynomials. Sci. World J. 2014, Article ID 257484 (2014)

45. 45.

Caputo, M: Linear models of dissipation whose Q is almost frequency independent, Part II. Geophys. J. Int. 13, 529-539 (1967)

46. 46.

Syam, MI, Siyyam, H, Al-Subaihi, I: Tau-Path following method for solving the Riccati equation with fractional order. Journal of Computational Methods in Physics 2014, Article ID 207916 (2014)

47. 47.

Ariel, PD, Syam, MI, Al-Mdallal, QM: The extended homotopy perturbation method for the boundary layer flow due to a stretching sheet with partial slip. Int. J. Comput. Math. 90(9), 1990-2002 (2013)

48. 48.

Wazwaz, A: A reliable treatment of singular Emden–Fowler initial value problems and boundary value problems. Appl. Math. Comput. 217, 10387-10395 (2011)

### Acknowledgements

The authors would like to thank the reviewers for the valuable comments.

Not Applicable

Not Applicable

## Author information

Authors

### Contributions

The contribution of the authors is equal. All authors read and approved the final manuscript.

### Corresponding author

Correspondence to Muhammed I Syam.

## Ethics declarations

### Competing interests

The authors declare that they have no competing interests. 