1 Introduction

Fractional equations have enabled the investigation of the nonlocal response of multiple phenomena such as diffusion processes, electrodynamics, fluid flow, elasticity and many more [15]; fractional derivatives are memory operators which usually represent dissipative effects or damage. Some fundamental definitions of fractional derivatives were given by Coimbra, Davison and Essex, Riesz, Riemann-Liouville, Hadamard, Weyl, Jumarie, Grünwald-Letnikov, and Liouville-Caputo [68], and the properties of these derivatives are reviewed in [9]. The use of Caputo and Caputo-Fabrizio fractional derivatives is gaining importance in physics because of their specific properties, in both definitions, for a constant the derivative is zero and the initial conditions used in the fractional differential equations having a direct physical interpretation [10, 11]; however, the Liouville-Caputo fractional operator presents a singularity in its kernel. With the purpose to describe in a better way the memory effect, Caputo and Fabrizio presented a novel definition with an exponential kernel named the Caputo-Fabrizio fractional operator [10], this novel fractional operator is considered as a fractional filter. Applications of this fractional operator are given in [1215].

The constructions of the exact and explicit solutions of the partial differential equations are very important to understand better the mechanisms of complex physical phenomena. Several methods have been proposed for studying the analytical solutions of fractional partial differential equations. Among these are the variational iteration method [1618], the Adomian descomposition method [19, 20], the fractional sub-equation method [2123], the homotopy perturbation technique [2427]. The searching of new analytical solutions for fractional partial differential equations is an important topic, which can also provide valuable reference for other related research. The homotopy analysis method (HAM), [2831] transforms a problem into an infinite number of linear problems without using the perturbation techniques, this method employs the concept of the homotopy from topology to generate a convergent series solution. The HAM was applied to solving the fractional heat-like partial differential equations subject to the Neumann boundary conditions [32] and fractional diffusion-wave equations [33]. The authors in [34] solved different linear and nonlinear systems of fractional partial differential equations, using the HAM. The Laplace homotopy perturbation method (LHPM) is a combination of the homotopy analysis method proposed by Liao in 1992 and the Laplace transform [35, 36].

Various authors have proposed several schemes to solve fractional partial differential equations with Liouville-Caputo and Caputo-Fabrizio fractional operators. Dehghan in [37] applied the HAM to solve linear partial differential equations, in this work, fractional derivatives are described in the Liouville-Caputo sense. Xu in [38] studied analytically the time fractional wave-like differential equation with a variable coefficient, the author reduced the governing equation to two fractional ordinary differential equations. Jafari in [39] used the HAM to obtain the solution of multi-order fractional differential equation studied by Diethelm and Ford [40]. Goufo et al. [41] developed a mathematical analysis of a model of rock fracture in the ecosystem and applied the CF fractional derivative, where analytical and computational approaches are obtained. Other analytical approaches that could be of interest are presented in [4247].

In this paper, we use the Laplace homotopy analysis method (LHAM) to solved linear fractional partial differential equations using fractional operators of Liouville-Caputo and Caputo-Fabrizio type. The basic definitions of fractional calculus are given in Section 2, several test problems to show the effectiveness proposed method are given in Section 3, and finally the conclusion is given in Section 4.

2 Definitions

Let \(f\in{L}_{1}(a,b)\), and \(n<\alpha\leq n+1\), then the expression

$$ \bigl({}_{0}^{C}D_{t}^{\alpha} \bigr) (t)= \frac{1}{\Gamma(n-\alpha)} \int_{0}^{t} (t-s)^{n-\alpha-1}f^{(n)}(s)\,ds, \quad n< \alpha\leq n+1, t>0, $$
(1)

is the Liouville-Caputo fractional derivative of order α. The validity of this definition is limited to functions f such that \(f^{(n)}\in{L}_{1}(a,b)\).

If \(f^{(n)}\in{L}(\mathbb{R^{+}})\) and if \(f^{(n)}(t)\) is of exponential order \(\nu_{n}\), with \(\nu_{n}>0\), \(\forall n=0,1,2,\ldots,m-1\), then the Laplace transform for this definition has the form proposed by the authors in [11],

$$\begin{aligned} \mathcal{L} \bigl[{}_{0}^{C}D_{t}^{\alpha} f \bigr](s)\,dt= \frac {1}{s^{n-\alpha}} \bigl[s^{n} \mathcal{L} \bigl[f (x,t ) \bigr](s)-s^{n-1} f (x,0 )-\cdots- f^{(n-1)}(x,0) \bigr], \end{aligned}$$
(2)

for \(Re(s)> k\), \(k=\max\{ \nu_{n} | n=0,1,2,\ldots,m-1\}\).

From the above results it follows that

$$\begin{aligned} &\mathcal{L} \bigl[{}_{0}^{C}D_{t}^{\alpha}f (x,t ) \bigr](s) = s^{\alpha} \mathcal{L} \bigl[f (x,t ) \bigr](s)-s^{\alpha-1} f (x,0 ),\quad 0< \alpha\leq1, \\ &\mathcal{L} \bigl[{}_{0}^{C}D_{t}^{\alpha}f (x,t ) \bigr](s) = s^{\alpha}\mathcal{L} \bigl[f (x,t ) \bigr](s)-s^{\alpha -1}f (x,0 ) -f' (x,0 ), \quad 1< \alpha \leq2. \end{aligned}$$
(3)

Now, if the kernel \((t-s)^{n-\alpha-1}\) is changed for the function \(\exp(-\alpha(t-s)/(1-\alpha))\), and \(\frac{1}{\Gamma(n-\alpha)}\) for \(\frac{(2-\alpha)M(\alpha)}{2(1-\alpha)}\) in equation (1), we have the new definition of fractional operator proposed by Caputo and Fabrizio (CF) [10, 11], which is expressed as follows:

$$ {}_{0}^{CF}D_{t}^{\alpha} f(t)= \frac{(2-\alpha)M(\alpha)}{2(1-\alpha)} \int_{0}^{t} \exp \biggl(\frac{-\alpha}{1-\alpha} (t-s) \biggr)f^{(n)}(s)\,ds, $$
(4)

where \(M(\alpha)\) is a normalization function such that \(M(0)=M(1)=1\). This new definition does not have singularities at \(t=s\).

If \(0<\alpha\leq1\) and \(n\in\mathbb{N}\), then we define the Laplace transform in the CF sense as follows [10, 11]:

$$\begin{aligned} \mathcal{L} \bigl[{}_{0}^{CF}D_{t}^{ (\alpha+1 )}f (t ) \bigr](s) & =\frac{1}{1-\alpha}\mathcal{L} \bigl[f^{ (\alpha +n )} (t ) \bigr] L \biggl[\exp \biggl(-\frac{\alpha}{\alpha-1} t \biggr) \biggr] \\ & =\frac{s^{n+1}\mathcal{L} [f (t ) ]-s^{n}f (0 )-s^{n-1} f ' (0 )-\cdots-f^{ (n )} (0 )}{s+\alpha (1-s )}. \end{aligned}$$
(5)

From this expression we have the special cases

$$\begin{aligned} &\mathcal{L} \bigl[{_{0}^{CF}D_{t}^{\alpha}}f (t ) \bigr](s) =\frac{s \mathcal{L} [f (t ) ]-f (0 )}{s+\alpha (1-s )},\quad n=0, \\ &\mathcal{L} \bigl[{}_{0}^{CF}D_{t}^{ (\alpha+1 )} f (t ) \bigr](s) =\frac{s^{2}\mathcal{L} [f (t ) ]-sf (0 )-{f}' (0 )}{s+\alpha (1-s )},\quad n=1. \end{aligned}$$
(6)

The Liouville-Caputo fractional derivative is more affected by the past compared with the Caputo-Fabrizio fractional derivative.

2.1 General description of the method using the operator of Liouville-Caputo (\(n-1<\alpha\leq n\))

Consider the following equation in the Liouville-Caputo sense:

$$\begin{aligned} & {}_{0}^{C}D_{t}^{\alpha}f (x,t )+\omega (x ) \frac {\partial f (x,t )}{\partial x}+\chi (x,t )\frac {\partial^{2} f (x,t )}{\partial x^{2}}+\lambda (x )f (x,t )=\kappa (x,t ), \end{aligned}$$
(7)

where \((x,t )\in [0,1 ]\times [0,T ]\), the initial conditions are

$$ \frac{\partial^{m}f (x,0 )}{\partial t^{m}}=f_{m} (x ) , \quad m=0,1,\ldots,n-1 , $$
(8)

and boundary conditions

$$ u (0,t )=\epsilon_{0} (t ),\qquad u (1,t )=\epsilon_{1} (t ),\quad t \geq0, $$
(9)

and, considering the case where the Laplace transform satisfies

$$\begin{aligned} &\mathcal{L} \bigl[{}_{0}^{C}D_{t}^{\alpha}f(x,t) \bigr](s) \\ &\quad= \frac{1}{s^{n-\alpha}} \bigl[s^{n} \mathcal{L} \bigl[f (x,t ) \bigr](s)-s^{n-1} f (x,0 )-\cdots- f^{(n-1)}(x,0) \bigr],\quad s>0, \end{aligned}$$
(10)

where \(\mathcal{L} [f(x,t) ] (s )=\Theta (x,s )\), equation (7), can be written

$$\begin{aligned} \Theta (x,s ) ={}&{-}\frac{1}{s^{\alpha}} \biggl[\omega (x )\frac{\partial }{\partial x}+\chi (x ) \frac{\partial^{2}}{\partial x^{2}}+\lambda (x ) \biggr]\Theta (x,s ) \\ &{} + \frac{1}{s^{n}} \bigl[s^{n-1} f_{0}(x)+ s^{n-2}f_{1}(x)+\cdots+ f_{n-1}(x) \bigr]+ \frac {\widetilde{\kappa}(x,s)}{s^{\alpha}}. \end{aligned}$$
(11)

The homotopy for equation (11) is constructed as follows:

$$\begin{aligned} \Theta (x,s )={}& {-}\frac{z}{s^{\alpha}} \biggl[\omega (x ) \frac{\partial}{\partial x}+\chi (x )\frac{\partial ^{2}}{\partial x^{2}}+\lambda (x ) \biggr]\Theta (x,s ) \\ &{} + \frac{1}{s^{n}} \bigl[s^{n-1} f_{0}(x)+ s^{n-2}f_{1}(x)+\cdots+ f_{n-1}(x) \bigr]+ \frac {\widetilde{\kappa}(x,s)}{s^{\alpha}}, \end{aligned}$$
(12)

where \(\Theta (x,s )=\mathcal{L} [u(x,t) ]\), \(\widetilde{\kappa} (x,s )=\mathcal{L} [\kappa(x,t) ]\), and

$$ \Theta (0,s )=\mathcal{L} \bigl[\epsilon_{0} (t ) \bigr] , \qquad\Theta (1,s )= \mathcal{L} \bigl[\epsilon_{1} (t ) \bigr] ,\quad s\geq0 . $$
(13)

The solution of equation (12) is obtained by applying the hypothesis that the solution \(\Theta (x,s )\) is expressed as

$$ \Theta (x,s )=\sum_{m=0}^{\infty}z^{m} \Theta_{m} (x,s ) ,\quad m=0,1,2,\ldots, $$
(14)

substituting (14) into (12), we get

$$\begin{aligned} \sum_{m=0}^{\infty}z^{m} \Theta_{m} (x,s ) ={}& {-}\frac{z}{s^{\alpha}} \biggl[\omega (x )\frac{\partial }{\partial x}+\chi (x ) \frac{\partial^{2}}{\partial x^{2}}+\lambda (x ) \biggr]\sum_{m=0}^{\infty }z^{m} \Theta_{m} (x,s ) \\ &{}+ \frac{1}{s^{n}} \bigl[s^{n-1} f_{0}(x)+ s^{n-2}f_{1}(x)+\cdots+ f_{n-1}(x) \bigr]+ \frac {\widetilde{\kappa}(x,s)}{s^{\alpha}}, \end{aligned}$$
(15)

which, on comparing the coefficients of powers of z, yields

$$\begin{aligned} &z^{0}: \Theta_{0} (x,s ) = \frac{1}{s^{n}} \bigl[s^{n-1} f_{0}(x)+ s^{n-2}f_{1}(x)+ \cdots+ f_{n-1}(x) \bigr]+ \frac {\widetilde{\kappa}(x,s)}{s^{\alpha}}, \\ &z^{1}: \Theta_{1} (x,s ) =-\frac{1}{s^{\alpha}} \biggl[ \omega (x )\frac{\partial}{\partial x} +\chi (x )\frac{\partial^{2}}{\partial x^{2}} +\lambda (x ) \biggr] \Theta_{0} (x,s ), \\ &z^{2}: \Theta_{2}(x,t) =-\frac{1}{s^{\alpha}} \biggl[ \omega (x )\frac{\partial}{\partial x} +\chi (x )\frac{\partial^{2}}{\partial x^{2}} +\lambda (x ) \biggr] \Theta_{1} (x,s ), \\ & \vdots \\ &z^{n+1}: \Theta_{n+1} (x,s ) =-\frac{1}{s^{\alpha}} \biggl[ \omega (x )\frac{\partial}{\partial x} +\chi (x )\frac{\partial^{2}}{\partial x^{2}} +\lambda (x ) \biggr] \Theta_{n} (x,s ), \end{aligned}$$
(16)

and when \(z\rightarrow1\), equation (16) becomes the approximate solution of (11) and (12), and this solution implies that

$$\begin{aligned} H_{n} (x,s )= \sum_{i=0}^{n} \Theta_{i} (x,s ), \end{aligned}$$
(17)

applying the inverse of the Laplace transform of (17), we have the approximate solution of equation (18),

$$\begin{aligned} f_{\mathrm{approx}} (x,t )\thickapprox \mathcal{L}^{-1} \bigl[H_{n} (x,s ) \bigr] . \end{aligned}$$
(18)

2.2 Description of the method using the operator of Caputo-Fabrizio (\(m-1<\alpha+n\leq m\))

Consider the following equation in the Caputo-Fabrizio sense:

$$\begin{aligned} {}_{0}^{CF}D_{t}^{\alpha}f (x,t )+\omega (x )\frac {\partial f (x,t )}{\partial x}+\chi (x,t )\frac {\partial^{2} f (x,t )}{\partial x^{2}}+\lambda (x ) f (x,t )=\kappa (x,t ), \end{aligned}$$
(19)

where \((x,t )\in [0,1 ]\times [0,T ]\), and the initial conditions are

$$ \frac{\partial^{\ell}f (x,0 )}{\partial t^{\ell}}=f_{\ell } (x ) ,\quad \ell=0,1,\ldots,m-1 , $$
(20)

and the boundary conditions

$$ f (0,t )=\epsilon_{0} (t ),\qquad f (1,t )=\epsilon_{1} (t ),\quad t \geq0. $$
(21)

For the Caputo-Fabrizio fractional derivative, the Laplace transform satisfies

$$\begin{aligned} &\mathcal{L} \bigl[{}_{0}^{CF}D_{t}^{ (\alpha+ n )}f (x,t ) \bigr] \\ &\quad=\frac{s^{n+1}\mathcal{L} [f (x,t ) ]-s^{n} f (x,0 )-s^{n-1}f' (x,0 )- \cdots- f^{(n)}(x,0) }{s+\alpha (1-s )},\quad s>0, \end{aligned}$$
(22)

defining \(\mathcal{L} [f(x,t) ] (s )=\Theta (x,s )\), for equation (19), we can write

$$\begin{aligned} \Theta (x,s ) ={}&{-} \biggl(\frac{ (s+\alpha (1-s ) )}{s^{n+1}} \biggr) \biggl[\omega (x ) \frac{\partial}{\partial x}+\chi (x )\frac{\partial ^{2}}{\partial x^{2}}+\lambda (x ) \biggr]\Theta (x,s ) \\ &{} + \frac{1}{s^{n+1}} \bigl[s^{n} f_{0} (x )+s^{n-1} f_{1} (x )+ \cdots+ f_{n}(x) \bigr] + \frac{s+\alpha (1-s )}{s^{n+1}} \widetilde{\kappa}(x,s). \end{aligned}$$
(23)

The homotopy for equation (23) can be constructed as follows:

$$\begin{aligned} \Theta (x,s )={}&{-}z \biggl(\frac{ (s+\alpha (1-s ) )}{s^{n+1}} \biggr) \biggl[\omega (x ) \frac{\partial }{\partial x}+\chi (x )\frac{\partial^{2}}{\partial x^{2}}+\lambda (x ) \biggr]\Theta (x,s ) \\ &{} + \frac{1}{s^{n+1}} \bigl[s^{n} f_{0} (x )+s^{n-1} f_{1} (x )+ \cdots+ f_{n}(x) \bigr] + \frac{s+\alpha (1-s )}{s^{n+1}} \widetilde{\kappa}(x,s) , \end{aligned}$$
(24)

where \(\Theta (x,s )=\mathcal{L} [u(x,t) ]\), \(\widetilde{\kappa} (x,s )=\mathcal{L} [\kappa(x,t) ]\), and

$$ \Theta (0,s )=\mathcal{L} \bigl[\epsilon_{0} (t ) \bigr] , \qquad\Theta (1,s )= \mathcal{L} \bigl[\epsilon_{1} (t ) \bigr],\quad s\geq0, $$
(25)

the solution of equation (24) is obtained by applying the hypothesis that the solution \(\Theta (x,s )\) is expressed as

$$ \Theta (x,s )=\sum_{m=0}^{\infty}z^{m} \Theta_{m} (x,s ) ,\quad m=0,1,2,\ldots, $$
(26)

and substituting (26) into (24), we get

$$\begin{aligned} & \sum_{m=0}^{\infty}z^{m} \Theta_{m} (x,s ) \\ &\quad =-z \biggl(\frac{ (s+\alpha (1-s ) )}{s^{n+1}} \biggr) \biggl[\omega (x )\frac{\partial}{\partial x}+ \chi (x )\frac{\partial^{2}}{\partial x^{2}}+\lambda (x ) \biggr]\sum_{m=0}^{\infty}z^{m} \Theta_{m} (x,s ) \\ &\qquad{} + \frac{1}{s^{n+1}} \bigl[s^{n} f_{0} (x )+s^{n-1} f_{1} (x )+ \cdots+ f_{n}(x) \bigr] + \biggl( \frac{s+\alpha (1-s )}{s^{n+1}} \biggr) \widetilde{\kappa}(x,s), \end{aligned}$$
(27)

and comparing the coefficients of powers of z yields

$$\begin{aligned} &z^{0}: \Theta_{0} (x,s ) = \frac{1}{s^{n+1}} \bigl[s^{n} f_{0} (x )+s^{n-1} f_{1} (x )+ \cdots+ f_{n}(x) \bigr] + \biggl( \frac{s+\alpha (1-s )}{s^{n+1}} \biggr) \widetilde{\kappa}(x,s), \\ &z^{1}: \Theta_{1} (x,s ) =- \biggl(\frac{ (s+\alpha (1-s ) )}{s^{n+1}} \biggr)\biggl[ \omega (x )\frac{\partial}{\partial x} +\chi (x )\frac{\partial^{2}}{\partial x^{2}} +\lambda (x )\biggr]\Theta_{0} (x,s ), \\ &z^{2}: \Theta_{2} (x,s ) =- \biggl(\frac{ (s+\alpha (1-s ) )}{s^{n+1}} \biggr)\biggl[ \omega (x )\frac{\partial}{\partial x} +\chi (x )\frac{\partial^{2}}{\partial x^{2}} +\lambda (x ) \biggr]\Theta_{1} (x,s ), \\ & \vdots \\ &z^{n+1}: \Theta_{n+1} (x,s ) =- \biggl(\frac{ (s+\alpha (1-s ) )}{s^{n+1}} \biggr)\biggl[ \omega (x )\frac{\partial}{\partial x} +\chi (x )\frac{\partial^{2}}{\partial x^{2}} +\lambda (x ) \biggr]\Theta_{n} (x,s ), \end{aligned}$$
(28)

in the limit \(z\rightarrow1\), equation (28) becomes the approximate solution of (23) and (24), and this solution implies that

$$\begin{aligned} H_{n} (x,s )= \sum_{i=0}^{n} \Theta_{i} (x,s ), \end{aligned}$$
(29)

applying the inverse of the Laplace transform of (29), we obtain the approximate solution of equation (19),

$$ f_{\mathrm{approx}} (x,t )\thickapprox\mathcal{L}^{-1} \bigl[H_{n} (x,s ) \bigr]. $$
(30)

In the next section, we will demonstrate the effectiveness of the LHAM described in Sections 2.1 and 2.2, by considering several illustrative examples. Let us define \(S_{n}(x,t)=\mathcal{L}^{{-1}} [\sum_{i=0}^{n}\varPhi_{i} (x,s ) ]\), which is the nth partial sum of the infinite series of approximate solution [28], so the relative error \(RE (\% )\) is calculated as

$$\begin{aligned} RE (\% ) =\biggl\vert \frac {S_{n}(x,t)-f_{\mathrm{exact}}(x,t)}{f_{\mathrm{exact}}(x,t)}\biggr\vert \times100. \end{aligned}$$
(31)

3 Examples

In this section, some test problems are presented using the Liouville-Caputo and Caputo-Fabrizio fractional operators, also the convergence and stability of the method are discussed.

Example 1

Consider the following equation in the Liouville-Caputo sense:

$$\begin{aligned} {}_{0}^{C}D_{t}^{\alpha}f (x,t )- \frac{1}{2}x^{2}\frac {\partial^{2}f (x,t )}{ \partial x^{2}}=0,\quad (x,t )\in [0,1 ]\times [0,1 ], 1< \alpha\leq2, \end{aligned}$$
(32)

with the initial conditions

$$\begin{aligned} f (x,0 )=x,\qquad f ' (x,0 )=x^{2}, \end{aligned}$$
(33)

and boundary conditions

$$ f (0,t )=0,\qquad f (1,t )= 1 + \sum_{m=0}^{\infty} \frac{t^{m\alpha+1}}{\Gamma(m\alpha+ 2)},\quad t\geq0. $$
(34)

The exact solution is given by

$$ f (x,t )=x+x^{2}\sum_{m=0}^{\infty} \frac{t^{m\alpha +1}}{\Gamma(m \alpha+2)}. $$
(35)

Now, using the LHAM, we have

$$\begin{aligned} &z^{0}: \Theta_{0} (x,s ) = \frac{1}{s^{2}} \bigl[s x + x^{2} \bigr] =\frac{s x + x^{2}}{s^{2}}, \\ &z^{1}: \Theta_{1} (x,s ) =\frac{1}{s^{\alpha}} \biggl[ \frac {x^{2}}{2} \frac{\partial^{2}}{\partial x^{2}}\Theta_{0} (x,s ) \biggr]= \frac{x^{2}}{s^{\alpha+2}}, \\ &z^{2}: \Theta_{2} (x,s ) =\frac{1}{s^{\alpha}} \biggl[ \frac {x^{2}}{2} \frac{\partial^{2}}{\partial x^{2}}\Theta_{1} (x,s ) \biggr]= \frac{x^{2}}{s^{2\alpha+2}}, \\ &z^{3}: \Theta_{3} (x,s ) =\frac{1}{s^{\alpha}} \biggl[ \frac {x^{2}}{2} \frac{\partial^{2}}{\partial x^{2}}\Theta_{2} (x,s ) \biggr]= \frac{x^{2}}{s^{3\alpha+2}}, \\ & \vdots \\ &z^{n+1}: \Theta_{n+1} (x,s ) =\frac{1}{s^{\alpha}} \biggl[ \frac{x^{2}}{2} \frac{\partial^{2}}{\partial x^{2}}\Theta_{0} (x,s ) \biggr]= \frac{x^{2}}{s^{(n+1)\alpha+2}}, \end{aligned}$$
(36)

the approximate solution is

$$\begin{aligned} H_{n}(x,s)& = \sum_{m=0}^{n} \Theta_{m}(x,s), \\ & = \frac{s x + x^{2}}{s^{2}} + \frac{x^{2}}{s^{\alpha+2}} + \frac {x^{2}}{s^{2\alpha+2}}+ \frac{x^{2}}{s^{3\alpha+2}}+\cdots+ \frac {x^{2}}{s^{n \alpha+2}}, \\ & = \frac{x}{s} + \frac{x^{2}}{s^{2}} + \frac{x^{2}}{s^{\alpha+2}} + \frac {x^{2}}{s^{2\alpha+ 2}}+ \frac{x^{2}}{s^{3\alpha+2}}+\cdots+\frac {x^{2}}{s^{n\alpha+2}}, \\ & = \frac{x}{s} + x^{2} \biggl[\frac{1}{s^{2}} + \frac {1}{s^{\alpha+2}} + \frac{1}{s^{2\alpha+2}}+ \cdots+ \frac {1}{s^{n\alpha+ 2}} \biggr]. \end{aligned}$$
(37)

Considering \(t=x/s\) and \(dt=dx/s\), we have

$$ \mathcal{L}^{-1} \biggl[\frac{1}{s^{j\alpha+2}} \biggr](t) = \frac {t^{m\alpha+1}}{\Gamma(\alpha m +2)}, $$
(38)

applying the inverse of the Laplace transform of (37) and using equation (38), we have

$$ f_{n} (x,t )=H_{n} (x,t )=x+x^{2}\sum _{m=0}^{n} \frac {t^{m\alpha+1}}{\Gamma(m \alpha+2)}, $$
(39)

and, when \(n \longrightarrow\infty\), this becomes the following solution:

$$ f (x,t )=\lim_{n\rightarrow\infty}H_{n} (x,t )=x+x^{2} \sum_{m=0}^{\infty} \frac{t^{m\alpha+1}}{\Gamma(m \alpha +2)}. $$
(40)

Figure 1 shows the numerical evaluation of equation (40).

Figure 1
figure 1

\(\pmb{x, t\in(0,1)}\) , \(\pmb{\alpha=1.22211}\) and \(\pmb{n=3{,}000}\) .

Example 2

Consider the following equation in the Caputo sense:

$$\begin{aligned} &{}_{0}^{C}D_{t}^{\alpha}f (x,t )+x \frac{\partial f (x,t )}{ \partial x}+\frac{\partial^{2}f (x,t )}{ \partial x^{2}}=2 \bigl(t^{\alpha} + x^{2} +1 \bigr), \\ &\quad (x,t )\in [0,1 ]\times [0,1 ], 0< \alpha\leq1, \end{aligned}$$
(41)

with the initial condition

$$ f (x,0 )=x^{2}, $$
(42)

and boundary conditions

$$ f (0,t )=2t^{2\alpha} \frac{\Gamma(\alpha+1)}{\Gamma(2\alpha +1)} , \qquad f(1,t) = 1 + 2 t^{2\alpha} \frac{\Gamma(\alpha +1)}{\Gamma(2 \alpha+1)}. $$
(43)

The exact solution is given by

$$\begin{aligned} f (x,t )=x^{2}+2t^{2\alpha} \frac{\Gamma(\alpha+ 1)}{\Gamma (2\alpha+1)}. \end{aligned}$$
(44)

By applying the LHAM, we have

$$\begin{aligned} &z^{0}: \Theta_{0} (x,s ) = \frac{x^{2}}{s} + \frac{2}{s^{\alpha}} \biggl[\frac{\Gamma(\alpha+1)}{s^{\alpha+1}} + \frac {x^{2} +1}{s} \biggr], \\ &z^{1}: \Theta_{1} (x,s ) =\frac{1}{s^{\alpha}} \biggl[-x \frac {\partial}{\partial x} - \frac{\partial^{2}}{\partial x^{2}} \biggr]\Theta_{0} (x,s )= - \bigl(x^{2} +1\bigr) \biggl[\frac{4}{s^{2\alpha+1}} + \frac{2}{s^{\alpha+1}} \biggr], \\ &z^{2}: \Theta_{2} (x,s ) = \frac{1}{s^{\alpha}} \biggl[-x \frac {\partial}{\partial x} - \frac{\partial^{2}}{\partial x^{2}} \biggr]\Theta_{0} (x,s )= \bigl(x^{2} +1\bigr) \biggl[\frac{8}{s^{3\alpha+1}} + \frac{4}{s^{2\alpha+1}} \biggr], \\ &z^{3}: \Theta_{3} (x,s ) = \frac{1}{s^{\alpha}} \biggl[-x \frac {\partial}{\partial x} - \frac{\partial^{2}}{\partial x^{2}} \biggr]\Theta_{0} (x,s )= - \bigl(x^{2} +1\bigr) \biggl[\frac{16}{s^{4\alpha+1}} + \frac{8}{s^{3\alpha+1}} \biggr], \\ & \vdots \\ &z^{n+1}: \Theta_{n+1} (x,s )=\frac{1}{s^{\alpha}} \biggl[-x\frac{\partial}{\partial x} - \frac {\partial^{2}}{\partial x^{2}} \biggr] \Theta_{0} (x,s ) \\ &\hphantom{z^{n+1}: \Theta_{n+1} (x,s )}=(-1)^{n+1}\bigl(x^{2} +1\bigr) \biggl[\frac{2^{n+2}}{s^{(n+2)\alpha+1}} + \frac {2^{n+1}}{s^{(n+1)\alpha+1}} \biggr], \end{aligned}$$
(45)

the approximate solution is

$$\begin{aligned} H_{n}(x,s) = \sum_{m=0}^{n} \Theta_{m}(x,s)= \frac{2 \Gamma(\alpha+1)}{s^{2\alpha+1}} + \frac{x^{2}}{s} +(-1)^{n} \bigl(1+x^{2}\bigr)\frac{2^{n+1}}{s^{(n+1)\alpha+1}}, \end{aligned}$$
(46)

considering \(t=x/s\) and \(dt=dx/s\), we have

$$\begin{aligned} \mathcal{L}^{-1} \biggl[\frac{1}{s^{2\alpha+1}} \biggr](t) = \frac{t^{2\alpha }}{\Gamma (2\alpha+ 1 )}, \end{aligned}$$
(47)

applying the inverse of the Laplace transform of (46) and using equation (47) yield

$$\begin{aligned} f_{n} (x,t )&=H_{n} (x,t ) \\ &=x^{2}+ 2 t^{2\alpha} \frac{\Gamma(\alpha+1)}{\Gamma (2\alpha+1)}+(-1)^{n}2^{n+1} \bigl(1+x^{2} \bigr)\frac{t^{(n+1)\alpha}}{\Gamma ((n+1)\alpha+1)}, \end{aligned}$$
(48)

and, when \(n \longrightarrow\infty\), this becomes the following solution:

$$ f (x,t )=\lim_{n\rightarrow\infty}H_{n} (x,t )=x^{2}+2t^{2\alpha} \frac{\Gamma(\alpha+ 1)}{\Gamma(2\alpha+1)}. $$
(49)

Figure 2 shows the numerical evaluation of equation (49).

Figure 2
figure 2

\(\pmb{x, t\in(0,1)}\) , \(\pmb{\alpha=0.22211}\) .

Example 3

Consider the following equation in the Caputo-Fabrizio sense:

$$\begin{aligned} {}_{0}^{CF}D_{t}^{\alpha+ 1}f (x,t )- \frac{1}{2}x^{2}\frac {\partial^{2}f (x,t )}{\partial x^{2}}=0, \quad (x,t )\in [0,1 ]\times [0,1 ], 0< \alpha\leq1, \end{aligned}$$
(50)

with the initial conditions

$$ f (x,0 )=x,\qquad f ' (x,0 )=x^{2}. $$
(51)

The exact solution is given by

$$\begin{aligned} f (x,t )=x+ x^{2} \biggl(\frac{\exp (t )-\exp (-\alpha t )}{1+\alpha} \biggr). \end{aligned}$$
(52)

Therefore, applying the LHAM yields

$$\begin{aligned} &z^{0}: \Theta_{0} (x,s ) = \frac{1}{s}f_{0} (x )+\frac{1}{s^{2}}f_{1} (x ) =\frac{1}{s}x+\frac{1}{s^{2}}x^{2 } =\frac{x (x+s )}{s^{2}}, \\ &z^{1}: \Theta_{1} (x,s ) = \biggl(\frac{ (s+\alpha (1-s ) )}{s^{2}} \biggr) \biggl[\frac{1}{2}x^{2}\frac{\partial ^{2}\Theta_{0} (x,s )}{\partial x^{2}} \biggr] =\frac{x^{2} (s+\alpha (1-s ) )}{s^{4}}, \\ &z^{2}: \Theta_{2} (x,s ) = \biggl(\frac{ (s+\alpha (1-s ) )}{s^{2}} \biggr) \biggl[\frac{1}{2}x^{2}\frac{\partial ^{2}\Theta_{1} (x,s )}{\partial x^{2}} \biggr] =\frac{x^{2} (s+\alpha (1-s ) )^{2}}{s^{6}}, \\ & \vdots \\ &z^{n+1}: \Theta_{n+1} (x,s ) = \biggl(\frac{ (s+\alpha (1-s ) )}{s^{2}} \biggr) \biggl[\frac{1}{2}x^{2}\frac {\partial^{2}\Theta_{1} (x,s )}{\partial x^{2}} \biggr] =\frac{x^{2} (s+\alpha (1-s ) )^{n+1}}{s^{2 n + 4}}, \end{aligned}$$
(53)

the approximate solution is

$$\begin{aligned} H_{n} (x,s )&=\sum_{m=0}^{n} \Theta_{m} (x,s ) \\ &=\frac{x (x+s )}{s^{2}}+\frac{x^{2} (s+\alpha (1-s ) )}{s^{4}} +\frac{x^{2} (s+\alpha (1-s ) )^{2}}{s^{6}}+ \cdots+\frac{x^{2} (s+\alpha (1-s ) )^{n}}{s^{2(n-1)+4}} \\ &=\frac{x (x+s )}{s^{2}}+ x^{2} \sum_{m=1}^{n} \frac{ (s+\alpha (1-s ) )^{m}}{s^{2(m-1)+4}}. \end{aligned}$$
(54)

Applying the inverse of the Laplace transform of (54), the approximate solution of equation (50), with the initial conditions (51), is given by

$$\begin{aligned} f (x,t )\thickapprox{}& f_{n} (x,t )=L^{-1} \bigl[H_{n} (x,s ) \bigr] \\ ={}&x+x^{2} \biggl(t+\frac{t^{3}}{6}+\frac{t^{5}}{120}+ \frac {t^{7}}{5{,}040}+\frac{t^{9}}{362{,}880}+\cdots \biggr) \\ &{}+x^{2} \biggl(-\frac{t^{2}}{2}+\frac{t^{3}}{6}- \frac{t^{4}}{12}+\frac {t^{5}}{60}-\frac{t^{6}}{240}+\cdots \biggr) ( \alpha-1 ) \\ &{}+x^{2} \biggl(\frac{t^{3}}{6}-\frac{t^{4}}{12}+ \frac{t^{5}}{30}-\frac {t^{6}}{120}+\frac{t^{7}}{560}+\cdots \biggr) ( \alpha-1 )^{2} \\ &{}+x^{2} \biggl(-\frac{t^{4}}{24}+\frac{t^{5}}{40}- \frac{7t^{6}}{720}+\frac {13t^{7}}{5{,}040}+\cdots \biggr) (\alpha-1 )^{3} \\ &{}+\cdots \end{aligned}$$
(55)

and, when \(n\rightarrow\infty\) and \(\alpha=1\), this yields

$$\begin{aligned} f_{\alpha=1} (x,t )=\lim_{n\rightarrow\infty , \alpha \rightarrow1}H_{n} (x,t )=x+ & x^{2}\sinh ( t ), \end{aligned}$$

but in general, if only the limit \(n\rightarrow\infty\) is taken, this yields

$$ f (x,t )=\lim_{n\rightarrow\infty}H_{n} (x,t )=x+x^{2} \biggl(\frac{\exp (t )-\exp (-\alpha t )}{1+\alpha} \biggr). $$
(56)

Figure 3 shows the numerical evaluation of equation (56).

Figure 3
figure 3

\(\pmb{x, t\in(0,1)}\) , \(\pmb{\alpha=0.22211}\) and \(\pmb{n=3{,}000}\) .

Example 4

Consider the following non-homogeneous equation in the Caputo-Fabrizio sense:

$$\begin{aligned} & {}_{0}^{CF}D_{t}^{\alpha}f (x,t )+x \frac{\partial f (x,t )}{\partial x}+\frac{\partial^{2}f (x,t )}{\partial x^{2}}=2 \bigl(t^{\alpha}+x^{2}+1 \bigr), \\ &\quad (x,t )\in [0,1 ]\times [0,1 ], 0< \alpha\leq1, \end{aligned}$$
(57)

with the initial condition

$$ f (x,0 )=x^{2}, $$
(58)

the exact solution is given by

$$\begin{aligned} f (x,t )= x^{2}+ \biggl(\frac{2t^{\alpha} (1+ (t-\alpha )\alpha )}{1+\alpha} \biggr). \end{aligned}$$
(59)

According to the solution obtained by the inversion of the Laplace transform of the exact problem, this yields

$$\begin{aligned} h (x,s )=L \bigl[h (x,t ) \bigr]=2 \biggl(\frac{\Gamma (1+\alpha )}{s^{\alpha+1}} \biggr)+2 \biggl(\frac {1+x^{2}}{s} \biggr) , \end{aligned}$$
(60)

therefore we can applied the LHAM, which yields

$$\begin{aligned} &z^{0}: \Theta_{0} (x,s ) =\frac{1}{s}u (x,0 )+ \biggl(\frac{ (s+\alpha (1-s ) )}{s} \biggr)h (x,s ) \\ &\hphantom{z^{0}: \Theta_{0} (x,s )} =\frac{1}{s} \bigl(x^{2} \bigr)+ \biggl(\frac{ (s+\alpha (1-s ) )}{s} \biggr) \biggl[2 \biggl(\frac{\Gamma (1+\alpha )}{s^{\alpha+1}} \biggr)+2\frac{1+x^{2}}{s} \biggr] \\ &z^{1}: \Theta_{1} (x,s ) =- \biggl(\frac{ (s+\alpha (1-s ) )}{s} \biggr) \biggl[x\frac{\partial\Theta_{0} (x,s )}{\partial x}+\frac{\partial^{2}\Theta_{0} (x,s )}{\partial x^{2}} \biggr] \\ &\hphantom{z^{1}: \Theta_{1} (x,s )} =\frac{2 (1+x^{2} ) (s+\alpha (1-s ) ) (-3s+2 (-1+s )\alpha )}{s^{3}} \\ &z^{2}: \Phi_{2} (x,s ) =- \biggl(\frac{ (s+\alpha (1-s ) )}{s} \biggr) \biggl[x\frac{\partial\Theta_{1} (x,s )}{\partial x}+\frac{\partial^{2}\Theta_{1} (x,s )}{\partial x^{2}} \biggr] \\ &\hphantom{z^{2}: \Phi_{2} (x,s )} =\frac{-4 (1+x^{2} ) (-3s+2 (-1+s )\alpha ) (s+\alpha (1-s ) )^{2}}{s^{4}} \\ &\vdots \end{aligned}$$
(61)

and so on. By constructing the nth order approximated solution, we get

$$\begin{aligned} H_{n} (x,s )={}&\sum_{m=0}^{n} \Theta_{m} (x,s ) \\ ={}&\frac{1}{s} \bigl(x^{2} \bigr)+ \biggl(\frac{ (s+\alpha (1-s ) )}{s} \biggr) \biggl[2 \biggl(\frac{\Gamma (1+\alpha )}{s^{\alpha+1}} \biggr)+2\frac{1+x^{2}}{s} \biggr] \\ &{}+\frac{2 (1+x^{2} ) (s+\alpha (1-s ) ) (-3s+2 (-1+s )\alpha )}{s^{3}} \\ &{}+\frac{-4 (1+x^{2} ) (-3s+2 (-1+s )\alpha ) (s+\alpha (1-s ) )^{2}}{s^{4}} \\ &{}+\cdots \end{aligned}$$
(62)

and, applying the inverse of the Laplace transform of (62), the approximate solution of (57)-(58) is given by

$$\begin{aligned} &f (x,t )\thickapprox f_{n} (x,t )=L^{-1} \bigl[H_{n} (x,s ) \bigr], \\ &f (x,t )=x^{2}+ \biggl(\frac{2t^{\alpha} (1+ (t-\alpha )\alpha )}{1+\alpha} \biggr) \\ &\hphantom{f (x,t )=}{}+ \bigl(1+x^{2} \bigr) \biggl(\frac{8 (-13+t )t^{12}}{467{,}775}+\cdots \biggr) ( \alpha-1 ) \\ &\hphantom{f (x,t )=}{}+ \bigl(1+x^{2} \bigr) \biggl(\frac{16 (156+ (-26+t )t )t^{11}}{155{,}925}+\cdots \biggr) ( \alpha-1 )^{2} \\ &\hphantom{f (x,t )=}{}+ \bigl(1+x^{2} \bigr) \biggl(\frac{16 (-1{,}716+t (468+ (-39+t )t ) )t^{10}}{42{,}525}+\cdots \biggr) ( \alpha -1 )^{3} \\ &\hphantom{f (x,t )=}{}+\cdots \end{aligned}$$
(63)

and, when \(n\rightarrow\infty\) and \(\alpha=1\), yields

$$\begin{aligned} f_{\alpha=1} (x,t )=\lim_{n\rightarrow\infty , \alpha \rightarrow1}H_{n} (x,t )= x^{2}+t^{2}, \end{aligned}$$
(64)

but in general, if only the limit \(n\rightarrow\infty\) is taken, this yields

$$\begin{aligned} f (x,t )=\lim_{n\rightarrow\infty}H_{n} (x,t )= & x^{2}+ \biggl(\frac{2t^{\alpha} (1+ (t-\alpha )\alpha )}{1+\alpha} \biggr), \end{aligned}$$
(65)

where the function \(f (x,t,\alpha ) \), is the analytical solution (59). Figure 4 shows the numerical evaluation for equation (65).

Figure 4
figure 4

\(\pmb{x, t\in(0,1)}\) , \(\pmb{\alpha=0.3321}\) .

3.1 Convergence and stability analysis

If the series (17) and (29) converges (\(i=0,1,2,\ldots, n\)) where \(\Theta (x,s )\) is governed by equation (14) and (26), it must be the solution of equation (7) and (19), respectively. Overall, the results show that the proposed approach is stable and convergent. The method provides an excellent convergence region of the solution by introducing the auxiliary functions (15) and (27) and the perturbative approximate results obtained are in good agreement with the exact solutions and the numerical ones.

In order to investigate the convergence and validity of the LHAM described in Sections 2.1 and 2.2, the relative errors \(RE (\% )\), \(n \approx10\), for some value of the position x, \(0\le x\le 1\), obtained in a wide range of t (\(0\le t\le1\)), when the LHAM solution (54) is compared with the exact solution. The \(RE(\%)\) in the LHAM when we are taking only few terms in the approximated solution (54) \(n\approx10\) for the example 3 considered in the previous section is depicted in Figure 5. The convergence and accuracy of the numerical solution (54) can be seen in Figure 5, this figure shows the error \(RE(\%)\) between the exact solution (55) and the series solutions (54). We notice that the series solutions converge rapidly; the absolute error was obtained with only a few perturbative terms, so we say that a good approximation has been achieved, the validity range applies to the entire domain of equation (49) and there is no restriction to a smaller domain.

Figure 5
figure 5

Relative error \(\pmb{RE(\%)}\) .

Madani in [48] has compared the approximate solutions obtained by means of LHAM in a wide range of the problem’s domain with those results obtained from the exact analytical solutions and the HAM. This comparison shows a precise agreement between the LHAM and exact results. The LHAM solution is valid for a large wide range of time and this suggests that the LHAM can solve non-homogeneous equations with a high degree of accuracy by considering only a few terms in the perturbed solution. On the other hand the relative error for the HAM is dramatically increased as the time value t increases, so the HAM solution validity range is restricted to a short region.

Therefore the LHAM is a powerful new method which needs less computation time and is much easier and more convenient than the HPM, because the Laplace transform allows one in many situations to overcome the deficiency mainly caused by unsatisfied boundary or initial conditions that appear in other semi-analytical methods such as the HAM [48].

4 Conclusions

In this work, the LHAM is proposed to solve linear fractional partial differential equations considering the Liouville-Caputo and Caputo-Fabrizio fractional operators. Based on this method, a general scheme for the estimation of approximate analytical solutions of fractional equations was developed, considering fractional derivatives with and without singular kernel. The methodology presented has become an important mathematical tool, motivated by the potential usefulness for physics and engineers working in various areas of the natural sciences. The Liouville-Caputo representation has the disadvantage that its kernel has singularities, meaning this kernel includes memory effects and therefore this definition cannot accurately describe the full effect of the memory. Due to this inconvenience, Caputo and Fabrizio in [10] have presented a new definition of the fractional operator without a singular kernel. The two definitions of fractional operators must apply conveniently depending on the nature of the system. The choice of the fractional derivative depends upon the problem studied and in the phenomenological behavior of the system. This work shows that the LHAM is a very efficient tool for solving linear fractional partial differential equations considering fractional operators of Liouville-Caputo and Caputo-Fabrizio type. The LHAM yields a rapidly convergent series solution by using a few iterations [48, 49]. In this paper a Mathematica program has been used for computations and programming.