1 Introduction

Fractional calculus has a very long history. However, this field lagged behind classic analysis. In fact, the basis of fractional calculus depended on classic analysis. Especially, in recent years fractional differential equations were used in fluid mechanics, viscoelasticity, biology, pharmacy, physics, chemistry and biochemistry, hydrology, medicine, finance, and engineering. The fractional-order models are more useful than integer-order models in many cases. Structures having fractional order are more useful in the studies that have been done by developing technology.

However, the analytic solutions of most fractional differential equations generally cannot be obtained. Thus, fractional differential equations have been solved by many approximate methods. Examples are the homotopy perturbation method [1, 2], the method of separating variables [3], the iteration method [4], the decomposition method [5], and the homotopy analysis method [6].

In this study, we will consider the cable equation that has been used in modeling the ion electro diffusion at the neurons. The cable equation occurred due to anomalous diffusion and this equation is one of the most fundamental equations for modeling neuronal dynamics [7]. The cable equation can be derived from the Nernst-Planck equation for electrodiffusion in smooth homogeneous cylinders [8]. In recent years, studies were conducted on various biological and physical systems. In this equation, the diffusion rate of species cannot be characterized by the single parameter of the diffusion constant [7]. The anomalous diffusion is characterized by a scaling parameter γ as well as the diffusion constant D and the mean square displacement of diffusing species r 2 (t) scales as a nonlinear power law in time, i.e., r 2 (t) t γ [79]. Henry et al. derived a fractional cable equation from the fractional Nernst-Planck equations to model anomalous electrodiffusion of ions in spiny dentrites [9]. They subsequently found a fractional cable equation by treating the neuron and its membrane as two separate materials governed by separate fractional Nernst-Planck equations. As a result, the fractional cable equation includes two Riemann-Liouville fractional derivatives.

Consider the following fractional cable equation:

u ( x , t ) t = 0 D t 1 γ 1 ( K 2 u ( x , t ) x 2 ) μ 0 2 0 D t 1 γ 2 u(x,t)+f(x,t),
(1.1)
u(x,0)=g(x),0xL,
(1.2)
u(0,t)=φ(t),u(L,t)=ψ(t),0tT,
(1.3)

where 0< γ 1 , γ 2 <1, K>0 and μ 0 2 are constants, and D t 1 γ 1 0 u(x,t) is the Riemann-Liouville fractional partial derivative of order 1γ [9].

In the literature, there are few treatments of approximate solutions of the fractional cable equation in terms of (1.1). Equation (1.1) has been solved by implicit numerical methods (INM) [9], the implicit compact difference scheme (ICFDS) [10], and explicit numerical methods [11].

Here, we will use the HAM, which is an approximate solution to solve this equation. The HAM method was developed in 1992 by Liao in [12]. This method has been successfully applied by many authors [1317]. The HAM contains the auxiliary parameter h which provides us with a simple way to adjust and control the convergence region of solution series for large or small values of x and t.

2 Preliminaries and notations

We give some basic definitions and properties of the fractional calculus theory, which are used further in this paper.

Definition 2.1 The Euler Gamma function Γ(z) is defined by the so-called Euler integral of the second kind,

Γ(z)= 0 t z 1 e t dt ( R ( z ) > 0 ) ,
(2.1)

where t z 1 = e ( z 1 ) log t . This integral is convergent for all complex zC [18].

Definition 2.2 The Riemann-Liouville fractional integral operator of order α0 of a function f C μ , μ1, is defined as

D t α u(x,t)= 1 Γ ( α ) 0 t ( t τ ) α 1 u(x,τ)dτ,α>0,t>0,
(2.2)

and properties of the operator D α can be found in [19, 20]. Also, some of properties of operator D α are as follows:

( i ) D t α f ( t ) = f ( t ) , ( ii ) D x α ( x γ ) = Γ ( γ + 1 ) Γ ( α + γ + 1 ) x α + γ , ( ii ) D t α ( t γ ) = Γ ( γ + 1 ) Γ ( α + γ + 1 ) t α + γ , ( iii ) D t α D t β f ( t ) = D t ( α + β ) f ( t ) , ( iv ) D t α D t β f ( t ) = D t β D t α f ( t ) .

3 Homotopy analysis method

We consider the following differential equation:

N [ u ( x , t ) ] =0,
(3.1)

where N is a nonlinear differential operator, x and t denote independent variable; u(x,t) is an unknown function. By means of the HAM, one first constructs a zeroth-order deformation equation

(1q)L [ ϕ ( x , t ; q ) u 0 ( x , t ) ] =qhH(t)N [ ϕ ( x , t ; q ) ] ,
(3.2)

where q[0,1] is the embedding parameter, h0 is a non-zero auxiliary parameter, H(t)0 is an auxiliary function, L is an auxiliary linear operator, u 0 (x,t) is an initial guess of u(x,t), and ϕ(x,t;q) is an unknown function. It is important that one has great freedom to choose auxiliary things in the HAM. Obviously, when q=0 and q=1, we have

ϕ(x,t;0)= u 0 (x,t),ϕ(x,t;1)=u(x,t),
(3.3)

respectively. The solution ϕ(x,t;q) varies from the initial guess u 0 (x,t) to the solution u(x,t). Expanding ϕ(x,t;q) in a Taylor series about the embedding parameter, we have

ϕ(x,t;q)= u 0 (x,t)+ m = 1 u m (x,t) q m ,
(3.4)

where

u m (x,t)= 1 m ! m ϕ ( x , t ; q ) q m | q = 0 ,m=1,2,3,.
(3.5)

The convergence of the series (3.4) depends upon the auxiliary parameter h. If it is convergent at q=1, one has

u(x,t)= u 0 (x,t)+ m = 1 u m (x,t).
(3.6)

According to (3.6), the governing equation can be deduced from the zeroth-order deformation equation (3.2). Define the vector

u n = { u 0 ( x , t ) , u 1 ( x , t ) , u 2 ( x , t ) , , u n ( x , t ) } .

Differentiating (3.2) m times with respect to the embedding parameter q and then setting q=0 and finally dividing by m!, we have the so-called m th-order deformation equation

L [ u m ( x , t ) χ m u m 1 ( x , t ) ] =hH(t) R m ( u m 1 ,x;t),
(3.7)

where

R m ( u m 1 ,x;t)= 1 ( m 1 ) ! m 1 N [ ϕ ( x , t ; q ) ] q m 1 | q = 0 ,
(3.8)

and

χ m = { 0 , m 1 , 1 , m > 1 .
(3.9)

It should be emphasized that u m (x,t) for m1 is governed by the nonlinear equation (3.7) with the linear boundary conditions that come from the original problem, which can easily be solved by symbolic computation software such as Maple and Mathematica.

4 Numerical applications and comparison

Consider the following initial and boundary problem of the fractional cable equation:

u ( x , t ) t = 0 D t 1 γ 1 2 u ( x , t ) x 2 0 D t 1 γ 2 u(x,t)+f(x,t),
(4.1)
u(x,0)=0,0x1,
(4.2)
u(0,t)=0,u(1,t)=0,0tT,
(4.3)

where f(x,t)=2(t+ π 2 t 1 + γ 1 Γ ( 2 + γ 1 ) + t 1 + γ 2 Γ ( 2 + γ 2 ) )sinπx. The exact solution of (4.1)-(4.3) is u(x,t)= t 2 sinπx [9].

We choose the linear operator

L [ ϕ ( x , t ; q ) ] = t ϕ(x,t;q),
(4.4)

with the property L[C]=0 where C is a constant. We define a nonlinear operator by

N [ ϕ ( x , t , q ) ] = D t ϕ(x,t,q) 0 D t 1 γ 1 2 ϕ ( x , t , q ) x 2 + 0 D t 1 γ 2 ϕ(x,t,q)f(x,t).
(4.5)

Therefore we establish the zeroth-order deformation equation

(1q)L [ ϕ ( x , t , q ) u 0 ( x , t ) ] =qhH(t)N [ ϕ ( x , t , q ) ] .
(4.6)

In (4.6), q=0 and q=1, we can write

ϕ(x,t,0)= u 0 (x,t),ϕ(x,t,1)=u(x,t).
(4.7)

So we obtain the m th-order deformation equation

L [ u m ( x , t ) χ m u m 1 ( x , t ) ] =hH(t) R m ( u m 1 ( x , t ) ) ,
(4.8)

where

R m ( u m 1 ( x , t ) ) = u m 1 ( x , t ) t 0 D t 1 γ 1 2 u m 1 ( x , t ) x 2 + 0 D t 1 γ 2 u m 1 (x,t)f(x,t)
(4.9)

and

χ m = { 0 , m 1 , 1 , m > 1 .
(4.10)

Now the solution of the m th-order deformation equation (4.8) for m1 becomes

u m (x,t)= χ m u m 1 (x,t)+hH(t) L 1 [ R m ( u m 1 ( x , t ) ) ] .
(4.11)

Instead of R m ( u m 1 ),

u m ( x , t ) = χ m u m 1 ( x , t ) + h H ( t ) 0 t ( u m 1 ( x , t ) t 0 D t 1 γ 1 2 u m 1 ( x , t ) x 2 + 0 D t 1 γ 2 u m 1 ( x , t ) f ( x , t ) ) d t
(4.12)

can be written. The auxiliary function H(t) can be chosen in the form H(t)=1.

Rearrangement of (4.12) gives the m th-order deformation equation

u m (x,t)= χ m u m 1 (x,t)+h 0 t ( R m ( u m 1 ( x , t ) ) ) dt.
(4.13)

Therefore, some of the symbolically computed components are found as

u 0 ( x , t ) = 0 , u 1 ( x , t ) = h t 2 sin π x ( 1 2 π 2 t γ 1 Γ ( 3 + γ 1 ) 2 t γ 2 Γ ( 3 + γ 2 ) ) , u 2 ( x , t ) = u 1 ( x , t ) + h ( ( t 2 sin π x ( 2 ( 2 ( 1 + 2 h ) π 2 t γ 1 Γ ( 3 + 2 γ 1 ) Γ ( 3 + γ 2 ) × Γ ( 2 + γ 1 + γ 2 ) Γ ( 3 + 2 γ 2 ) + Γ ( 3 + γ 1 ) ( 2 h π 4 t 2 γ 1 Γ ( 3 + γ 2 ) × Γ ( 2 + γ 1 + γ 2 ) Γ ( 3 + 2 γ 2 ) + , u 3 ( x , t ) = u 2 ( x , t ) + h ( t 2 sin π x 1 3 h t 3 sin π x 2 t 2 + γ 2 sin π x Γ ( 3 + γ 2 ) 2 h t 3 + γ 2 sin π x Γ ( 4 + γ 2 ) 4 h 2 π 2 t 3 + γ 1 + γ 2 sin π x Γ ( 4 + γ 1 + γ 2 ) h π 4 t 2 + 2 γ 1 γ 1 Γ ( 3 + 2 γ 1 ) ( 1 + γ 1 ) + ( 2 + γ 1 ) ( 1 + γ 1 ) π 2 t 2 + 2 γ 1 Γ ( γ 1 ) Γ ( 3 + 2 γ 1 ) sin π x + ( 3 + 2 h t + 2 h 2 t + γ 1 ) 2 π 2 t 2 + γ 1 sin π x Γ ( 4 + γ 1 ) + 2 t 2 + γ 1 sin π x γ 1 ( 2 + 3 γ 1 + γ 1 2 ) ,

and so on.

As a result, the m th-order approximation of u(x,t) is given by

m = 0 u m (x,t).
(4.14)

Theorem 4.1 (Convergence Theorem)

As long as the series u(x,t)= u 0 (x,t)+ m = 1 u m (x,t) converges, where u m (x,t) is governed by (4.13) under the definitions (4.9) and (4.10), it must be a solution of the fractional cable equation (4.1).

Proof If the series

m = 0 + u m (x,t)

converges, then we can write

S(x,t)= m = 0 + u m (x,t)

and we have

lim n u n (x,t)=0.
(4.15)

Using definition (4.13), we get

h m = 1 R m ( u m ( x , t ) ) = m = 1 L [ u m ( x , t ) χ m u m 1 ( x , t ) ] = lim n m = 1 L [ u m ( x , t ) χ m u m 1 ( x , t ) ] = L [ lim n m = 1 ( u m ( x , t ) χ m u m 1 ( x , t ) ) ] = L [ lim n u n ( x , t ) ] = 0 .

Since h0, m = 1 R m ( u m (x,t))=0.

From (4.9), we have

m = 1 R m ( u m ( x , t ) ) = m = 1 [ D t u m 1 ( x , t ) 0 D t 1 γ 1 u m 1 ( x , t ) x x + 0 D t 1 γ 2 u m 1 ( x , t ) F ( x , t ) ] = m = 0 D t u m ( x , t ) m = 0 0 D t 1 γ 1 u m ( x , t ) x x + m = 0 0 D t 1 γ 2 u m ( x , t ) F ( x , t ) = D t m = 0 u m ( x , t ) 0 D t 1 γ 1 m = 0 u m ( x , t ) x x + 0 D t 1 γ 2 m = 0 u m ( x , t ) F ( x , t ) = D t S ( x , t ) 0 D t 1 γ 1 S ( x , t ) x x + 0 D t 1 γ 2 S ( x , t ) F ( x , t ) = 0 .

From the initial u(x,0)=0 and u m (x,0)=0, we have

S(x,0)= m = 0 u m (x,0)= u 0 (x,t)+ m = 1 u m 1 (x,0)=0.
(4.16)

Therefore, according to the above expressions, S(x,t) must be the exact solution of (4.1) and (4.2). □

We get the following tables and figures by using a series solution obtained with HAM of (4.1).

5 Conclusion

In this paper, we have achieved approximate solutions of the fractional cable equation that involve two Riemann-Liouville fractional derivatives by means of the homotopy analysis method. We tried to find an approximate solution of this equation by HAM, which is a semi-analytical method. It is not possible to find the analytical solutions of fractional partial differential equations in most cases. In addition, there is an approximate solution of the fractional cable equation that we have considered just with the finite difference method. The HAM results were given by Tables 1-4 and Figures 1-5.

Table 1 Absolute errors obtained when γ 1 = γ 2 =0.5 , x= 10 4 , and h=1/ 10 8
Table 2 Comparison of the HPM, HAM, exact solution (ES) and absolute errors results of u(x,t) when γ 1 = γ 2 =0.5 , t=0.1 , and h=0.0395 for 5th-order approximation
Table 3 Comparison of the HPM, HAM, exact solution (ES) and absolute errors results of u(x,t) when γ 1 = γ 2 =0.25 , t=0.1 , and h=0.004 for 10th-order approximation
Table 4 Comparison of the HPM, HAM, exact solution (ES) and absolute errors results of u(x,t) when γ 1 =0.25 , γ 2 =0.75 , t=0.1 , and h=0.0043 for 10th-order approximation
Figure 1
figure 1

The h curves of 5th-order and 10th-order approximate solutions obtained by the HAM for γ 1 = γ 2 =0.5 , respectively.

Figure 2
figure 2

The 10th-order approximate solution of u(x,t) with different values of h for γ 1 = γ 2 =0.5 and t=0.1 .

Figure 3
figure 3

The 10th-order approximate solution of u(x,t) with different values of h for γ 1 =0.8 , γ 2 =0.3 and t=0.5 .

Figure 4
figure 4

Comparison of the HPM, HAM and Exact solution for 5th-order approximate when t=0.1 , h=0.0395 and γ 1 = γ 2 =0.5 .

Figure 5
figure 5

Comparison of the HPM, HAM and Exact solution for 10th-order approximate when t=0.1 , h=0.004 and γ 1 = γ 2 =0.25 .

The range of convergence control parameter h was determined by taking a different number of terms of the series solution in Figure 1. We showed that convergent results can be obtained by selecting the appropriate values of x and t of the convergence parameter h0.

An approximate solution that was obtained for different values of the parameter h, the fractional-order derivatives γ 1 , γ 2 of the analytical solution and some comparisons for some values of t were presented in Figures 2-3.

A comparison between HPM, HAM, and the analytical solution, when t=0.1 for some values of the auxiliary parameter h0 and partial-order derivatives 0< γ 1 , γ 2 1, was made in Figures 4-5. As can be seen from the figures, HAM and the analytical solution coincided and the HPM solution diverged from the analytical solution.

The absolute errors that were obtained by the implicit numerical method [9], implicit compact finite difference method [10], and HAM can be seen in Table 1. In this table γ 1 = γ 2 =0.5 and 0.1t1.0. As can be seen from this table when the convergent control parameter h takes a value close to zero, this method gave better results than the other two methods.

A comparison between HPM, HAM, and the analytical solution for γ 1 , γ 2 and some values of the auxiliary parameter h0 were presented in Tables 2-4. As can be seen from the tables, the HPM solution diverged from the analytical solution but the HAM solution approached the analytical solution.

Although convergent results for almost every value of the independent variables and convergent control parameter h have been obtained in HAM; the approximate solution diverged at some small and large values of independent variables in HPM. Namely, it is possible to find results that converge rapidly to the analytical solution by HAM.

Consequently HAM is a recommended method for obtaining an approximate solution of the fractional cable equation with γ 1 and γ 2 Riemann-Liouville derivatives.