1 Introduction

Fractional calculus has been used to develop accurate models of many phenomena of science, engineering, economics, and applied mathematics. These models are found to be best described by FDEs [16]. More recently, Butkovskii et al. [7, 8] used fractional calculus for description of the dynamics of various systems and control processes.

Several numerical and analytical methods have been proposed in the literature for approximating FDEs (see [918]). In this direction, Atabakzadeh et al. [19] used the operational matrix of Caputo fractional-order derivatives for Chebyshev polynomials, which was derived in [20] to solve a system of FDEs. In [21] Tripathi et al. presented an approximate solution of multi-term FDEs using the operational matrix of fractional integration of the generalized hat basis functions. The authors of [22] presented a direct solution technique for approximating the linear multi-order FDEs on semi-infinite interval based on the tau method and proposed the modified generalized Laguerre collocation methods for solving the nonlinear FDEs. Recently, Kazem et al. [23] investigated the operational matrices of the fractional-order Legendre functions and used them together with the spectral tau approximation to solve linear initial value problems of fractional orders. The Taylor matrix method, in which the power is fractional number, was developed for approximating the relaxation-oscillation equation in [24]. A Jacobi operational matrix was proved and applied for approximating the multi-term FDEs in [25] and a linear fuzzy fractional differential equation in [26]. Ahmadian et al. [27] derived the operational matrix of Legendre polynomials and applied it for solving a fuzzy fractional differential equation.

The authors of [28] presented a numerical method for the solution of fractional differential equations. In this method, the properties of the Caputo derivative are used to reduce the given fractional differential equation into a Volterra integral equation. More recently, the authors of [2931] proposed the operational matrices of Riemann-Liouville fractional integration of Chebyshev, Laguerre, modified generalized Laguerre polynomials which are employed in combination with tau approximation for the numerical solution of linear FDEs on finite and semi-infinite intervals. We refer also to the recent papers [3235] in which the authors studied the existence and uniqueness of several classes of FDEs; for application of such equations, see [3640] and the references therein.

In [31], the authors derived the operational matrix of Riemann-Liouville fractional integration of MGLP and applied it for approximating the linear FDEs on the half-line. In this article, we aim to derive the operational matrix of Caputo fractional derivatives of MGLP. Furthermore, the MGLOM will be used in combination with the spectral tau scheme for approximating linear FDEs, and with the pseudo-spectral scheme for approximating nonlinear FDEs on the half-line. It is worth mentioning here that the Laguerre operational matrix and the generalized Laguerre operational matrix [41] can be obtained as special cases of MGLP. Finally, the accuracy of the proposed algorithms are demonstrated by test problems.

This paper is organized as follows. In Section 2, we present some properties of MGLP. The MGLOM of fractional derivative is constructed and proved in detail in Section 3. Section 4 is devoted to implementing the tau and collocation spectral schemes in combination with the MGLOM of fractional derivative for approximating two classes of multi-term FDEs. Some numerical experiments are presented in Section 5. The results are summarized in the final section.

2 Some basic preliminaries

We give some definitions and properties of fractional derivatives and modified generalized Laguerre polynomials (see [2, 42]).

Definition 2.1 The Riemann-Liouville fractional integral operator of order ν (ν>0) is defined as

J ν f ( x ) = 1 Γ ( ν ) 0 x ( x t ) ν 1 f ( t ) d t , ν > 0 , x > 0 , J 0 f ( x ) = f ( x ) .
(1)

Definition 2.2 The Caputo fractional derivatives of order ν are defined as

D ν f ( x ) = J m ν D m f ( x ) = 1 Γ ( m ν ) 0 x ( x t ) m ν 1 d m d t m f ( t ) d t , m 1 < ν < m , x > 0 ,
(2)

where D m is the classical differential operator of order m.

For the Caputo derivative, we have

D ν C=0(C is a constant),
(3)
D ν x β ={ 0 for  β N 0  and  β < ν , Γ ( β + 1 ) Γ ( β + 1 ν ) x β ν for  β N 0  and  β ν  or  β N  and  β > ν ,
(4)

where ν and ν are the ceiling and floor functions respectively, while N={1,2,} and N 0 ={0,1,2,}.

The Caputo fractional differentiation is a linear operation similar to the integer-order differentiation

D ν ( λ f ( x ) + μ g ( x ) ) =λ D ν f(x)+μ D ν g(x),
(5)

where λ and μ are constants.

We recall below some relevant properties of the modified generalized Laguerre polynomials (see [4345]). Now, let Λ=(0,) and w ( α , β ) (x)= x α e β x be a weight function on Λ in the usual sense. Define

L w ( α , β ) 2 (Λ)= { v | v  is measurable on  Λ  and  v w ( α , β ) < } ,

equipped with the following inner product and norm

( u , v ) w ( α , β ) = Λ u(x)v(x) w ( α , β ) (x)dx, v w ( α , β ) = ( v , v ) w ( α , β ) 1 2 .

Next, let L i ( α , β ) (x) be the MGLP of degree i for α>1, and β>0 is defined by

L i ( α , β ) (x)= 1 i ! x α e β x x i ( x i + α e β x ) ,i=1,2,.

For α>1 and β>0, we have

x L i ( α , β ) ( x ) = β L i 1 ( α + 1 , β ) ( x ) , L i + 1 ( α , β ) ( x ) = 1 i + 1 [ ( 2 i + α + 1 β x ) L i ( α , β ) ( x ) ( i + α ) L i 1 ( α , β ) ( x ) ] , i = 1 , 2 , ,

where L 0 ( α , β ) (x)=1 and L 1 ( α , β ) (x)=βx+ Γ ( α + 2 ) Γ ( α + 1 ) .

The set of MGLP is the L w ( α , β ) 2 (Λ)-orthogonal system, namely

0 L j ( α , β ) (x) L k ( α , β ) (x) w ( α , β ) (x)dx= h k δ j k ,
(6)

where δ j k is the Kronecker function and h k = Γ ( k + α + 1 ) β α + 1 k ! .

The modified generalized Laguerre polynomial of degree i on the interval Λ is given by

L i ( α , β ) (x)= k = 0 i ( 1 ) k Γ ( i + α + 1 ) β k Γ ( k + α + 1 ) ( i k ) ! k ! x k ,i=0,1,,
(7)

where L i ( α , β ) (0)= Γ ( i + α + 1 ) Γ ( α + 1 ) Γ ( i + 1 ) .

The special value

D q L i ( α , β ) (0)= ( 1 ) q β q Γ ( i + α + 1 ) ( i q ) ! Γ ( q + α + 1 ) ,iq,
(8)

will be of important use later.

3 MGLOM of Caputo fractional derivatives

Let u(x) L w ( α , β ) 2 (Λ), then u(x) may be expressed in terms of MGLP as

u(x)= j = 0 a j L j ( α , β ) (x), a j = 1 h k 0 u(x) L j ( α , β ) (x) w ( α , β ) (x)dx,j=0,1,2,.
(9)

In particular applications, the MGLP up to degree N+1 are considered. Then we have

u N (x)= j = 0 N a j L j ( α , β ) (x)= C T ϕ(x),
(10)

where the modified generalized Laguerre coefficient vector C and the modified generalized Laguerre vector ϕ(x) are given by

C T =[ c 0 , c 1 ,, c N ],ϕ(x)= [ L 0 ( α , β ) ( x ) , L 1 ( α , β ) ( x ) , , L N ( α , β ) ( x ) ] T ,
(11)

then the derivative of the vector ϕ(x) can be expressed by

d ϕ ( x ) d x = D ( 1 ) ϕ(x),
(12)

where D ( 1 ) is the (N+1)×(N+1) operational matrix of derivative given by

D ( 1 ) =β( 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 1 0 0 0 0 0 1 1 1 0 0 0 0 1 1 1 1 0 0 0 1 1 1 1 1 1 0 ).

By using Eq. (12), it is clear that

d n ϕ ( x ) d x n = ( D ( 1 ) ) n ϕ(x),
(13)

where nN and the superscript in D ( 1 ) denotes matrix powers. Thus

D ( n ) = ( D ( 1 ) ) n ,n=1,2,.
(14)

Lemma 3.1 Let L i ( α , β ) (x) be a modified generalized Laguerre polynomial, then

D ν L i ( α , β ) (x)=0,i=0,1,,ν1,ν>0.
(15)

Proof Immediately, if we use Eqs. (4) and (5) in Eq. (7), the lemma can be proved. □

In what follows, we derive the operational matrix of Caputo fractional derivatives for MGLP.

Theorem 3.2 Let ϕ(x) be a modified generalized Laguerre vector defined in Eq. (11) and consider ν>0, then

D ν ϕ(x) D ( ν ) ϕ(x),
(16)

where D ( ν ) is the (N+1)×(N+1) operational matrix of Caputo fractional derivatives of order ν and is given by

D ( ν ) =( 0 0 0 0 0 0 0 0 Ω ν ( ν , 0 ) Ω ν ( ν , 1 ) Ω ν ( ν , 2 ) Ω ν ( ν , N ) Ω ν ( i , 0 ) Ω ν ( i , 1 ) Ω ν ( i , 2 ) Ω ν ( i , N ) Ω ν ( N , 0 ) Ω ν ( N , 1 ) Ω ν ( N , 2 ) Ω ν ( N , N ) ),
(17)

where

Ω ν (i,j)= k = ν i = 0 j ( 1 ) k + β ν j ! Γ ( i + α + 1 ) Γ ( k ν + α + + 1 ) ( i k ) ! ( j ) ! ! Γ ( k ν + 1 ) Γ ( k + α + 1 ) Γ ( α + + 1 ) .

Note that in D ( ν ) , the first ν rows are all zero.

Proof The analytic form of the MGLP L i ( α , β ) (x) of degree i is obtained by (7). Making use of (4), (5) and (7), we get

D ν L i ( α , β ) ( x ) = k = 0 i ( 1 ) k β k Γ ( i + α + 1 ) ( i k ) ! k ! Γ ( k + α + 1 ) D ν x k = k = ν i ( 1 ) k β k Γ ( i + α + 1 ) ( i k ) ! Γ ( k ν + 1 ) Γ ( k + α + 1 ) x k ν , i = ν , , N .
(18)

Now, approximating x k ν by N+1 terms of modified generalized Laguerre series, we have

x k ν = j = 0 N b j L j ( α , β ) (x),
(19)

where b j is given from (9) with u(x)= x k ν , and

b j = = 0 j ( 1 ) β k + ν j ! Γ ( k ν + α + + 1 ) ( j ) ! ( ) ! Γ ( + α + 1 ) .
(20)

Employing Eqs. (18)-(20), we get

D ν L i ( α , β ) (x)= j = 0 N Ω ν (i,j) L j ( α , β ) (x),i=ν,,N,
(21)

where

Ω i j k = k = ν i = 0 j ( 1 ) k + β ν j ! Γ ( i + α + 1 ) Γ ( k ν + α + + 1 ) ( i k ) ! ( j ) ! ! Γ ( k ν + 1 ) Γ ( k + α + 1 ) Γ ( α + + 1 ) .
(22)

Accordingly, Eq. (21) can be written in a vector form as follows:

D ν L i ( α , β ) (x) [ Ω ν ( i , 0 ) , Ω ν ( i , 1 ) , Ω ν ( i , 2 ) , , Ω ν ( i , N ) ] ϕ(x),i=ν,,N.
(23)

Also, according to Lemma 3.1, we can write

D ν L i ( α , β ) (x)[0,0,0,,0]ϕ(x),i=0,1,,ν1.
(24)

A combination of Eqs. (23) and (24) leads to the desired result. □

Remark In the case of ν=nN, Theorem 3.2 gives the same result as Eq. (13).

4 Applications of the MGLOM for FDEs

The main aim of this section is to approximate linear and nonlinear multi-term FDEs using the MGLOM based on modified generalized Laguerre tau and pseudo-spectral approximations respectively.

4.1 Linear multi-term FDEs

Consider the linear FDE

D ν u(x)= j = 1 k γ j D ζ j u(x)+ γ k + 1 u(x)+g(x),in Λ,
(25)

with initial conditions

u ( i ) (0)= d i ,i=0,,m1,
(26)

where γ j (j=1,,k+1) are real constant coefficients, m1<νm, 0< ζ 1 < ζ 2 << ζ k <ν and d i (i=0,,m1) are the initial values of u(x).

To solve the fractional initial value problem, (25)-(26), we approximate u(x) and g(x) by modified generalized Laguerre polynomials as

u(x) i = 0 N c i L i ( α , β ) (x)= C T ϕ(x),
(27)
g(x) i = 0 N g i L i ( α , β ) (x)= G T ϕ(x),
(28)

where a vector G= [ g 0 , , g N ] T is known and C= [ c 0 , , c N ] T is an unknown vector.

By using Theorem 3.2 (Eqs. (16) and (27)), we have

D ν u(x) C T D ν ϕ(x)= C T D ( ν ) ϕ(x),
(29)
D ζ j u(x) C T D ζ j ϕ(x)= C T D ( ζ j ) ϕ(x),j=1,,k.
(30)

If we use (27)-(30), then the residual R N (x) for Eq. (25) can be given by

R N (x)= ( C T D ( ν ) C T j = 1 k γ j D ( ζ j ) γ k + 1 C T G T ) ϕ(x).
(31)

As in a typical tau method, see [20, 30, 46], we generate (Nm+1) linear equations by applying

R N ( x ) , L j ( α , β ) ( x ) =0,j=0,1,,Nm.
(32)

Also, by substituting Eqs. (13) and (27) into Eq (26), we get

u ( i ) (0)= C T D ( i ) ϕ(0)= d i ,i=0,1,,m1.
(33)

Eqs. (32) and (33) generate (Nm+1) and m sets of linear equations, respectively. These linear equations can be solved for unknown coefficients of the vector C. Consequently, u(x) given in Eq. (27) can be calculated, which gives the solution of the initial value problem in Eqs. (25) and (26).

4.2 Nonlinear multi-term FDEs

In this section, in order to show the high importance of the MGLOM of Caputo fractional derivatives, we apply it to approximate nonlinear multi-term FDEs. Regarding such problems on the interval Λ, we investigate the modified generalized Laguerre pseudo-spectral scheme based on the MGLOM to obtain the numerical solution u N (x). The nonlinear FDE is collocated at (Nm+1) nodes of the modified generalized Laguerre-Gauss interpolation on the interval Λ, and then the problem reduces to the (N+1) system of algebraic equations.

Consider the nonlinear FDE

D ν u(x)=F ( x , u ( x ) , D β 1 u ( x ) , , D β k u ( x ) ) ,in Λ,
(34)

with initial conditions (26), where F can be nonlinear in general.

In order to use the MGLOM for approximating (34), we expand u(x), D ν u(x) and D β j u(x) for j=1,,k as (27), (29) and (30) respectively, and then (34) becomes

C T D ( ν ) ϕ(x)=F ( x , C T ϕ ( x ) , C T D ( β 1 ) ϕ ( x ) , , C T D ( β k ) ϕ ( x ) ) .
(35)

Substituting (27) and (13) in (34) gives

u ( i ) (0)= C T D ( i ) ϕ(0)= d i ,i=0,1,,m1.
(36)

Collocating (35) at (Nm+1) nodes of modified generalized Laguerre-Gauss interpolation yields

C T D ( ν ) ϕ ( x i ( α , β ) ) = F ( x i ( α , β ) , C T ϕ ( x i ( α , β ) ) , C T D ( β 1 ) ϕ ( x i ( α , β ) ) , , C T D ( β k ) ϕ ( x i ( α , β ) ) ) , i = 0 , 1 , , N m + 1 .
(37)

For every two special choices of the modified generalized Laguerre parameters α and β, the above-mentioned system of algebraic equations together with (36) gives the (N+1) nonlinear system of equations which may be solved by Newton’s iterative method.

5 Illustrative examples

To illustrate the effectiveness of the proposed algorithms, six illustrative examples are implemented by the two methods proposed in the previous section. The results obtained by the proposed algorithms reveal that these algorithms are very effective and convenient for approximating the linear and nonlinear FDEs on a semi-infinite interval.

Example 1 Consider the FDE

D 2 u ( x ) + D 3 2 u ( x ) + u ( x ) = x 2 + 2 + 2.6666666667 Γ ( 0.5 ) x 1.5 , u ( 0 ) = 0 , u ( 0 ) = 0 , x Λ .
(38)

The exact solution is u(x)= x 2 .

Now, we implement the tau technique based on the MGLOM of fractional derivative with N=2, then the approximate solution may be written as

u(x)= c 0 L 0 ( α , β ) (x)+ c 1 L 1 ( α , β ) (x)+ c 2 L 2 ( α , β ) (x)= C T ϕ(x).

Here, we get the following operational matrices:

D ( 1 ) = β ( 0 0 0 1 0 0 1 1 0 ) , D ( 2 ) = β 2 ( 0 0 0 0 0 0 1 0 0 ) , D ( 3 2 ) = ( 0 0 0 0 0 0 Ω 3 2 ( 2 , 0 ) Ω 3 2 ( 2 , 1 ) Ω 3 2 ( 2 , 2 ) ) , G = ( g 0 g 1 g 2 ) ,

where g j and Ω ν (i,j) are evaluated from (9) and (17), respectively.

Firstly, applying the tau method to (38) (see relation (32)) yields

c 0 + [ Ω 3 2 ( 2 , 0 ) + β 2 ] c 2 g o =0.
(39)

Secondly, applying (33) to the initial conditions yields

c 0 +(α+1) c 1 + ( α + 1 ) ( α + 2 ) 2 c 2 =0,
(40)
β c 1 β(α+2) c 2 =0.
(41)

Finally, solving (39)-(41), we have the three unknown coefficients with various choices of α and β which are given in Table 1. Then, we have

c 0 = α 2 + 3 α + 2 β 2 , c 1 = 2 α 4 β 2 , c 2 = 2 β 2 .

Consequentially, we can write

u(x)= ( c 0 c 1 c 2 ) ( L 0 ( α , β ) ( x ) L 1 ( α , β ) ( x ) L 2 ( α , β ) ( x ) )= x 2 ,

which is the exact solution.

Table 1 c 0 , c 1 and c 2 for different values of α and β for Example 1

Example 2 Consider the equation

D 2 u ( x ) 2 D 5 3 u ( x ) + D 2 3 u ( x ) + u ( x ) = x 3 + 6 x 12 Γ ( 7 3 ) x 4 3 + 6 Γ ( 10 3 ) x 7 3 , u ( 0 ) = 0 , u ( 0 ) = 0 , x Λ ,
(42)

whose exact solution is given by u(x)= x 3 .

By applying the technique described in Section 4.1 with N=3 and xΛ, we approximate the solution as

u(x)= i = 0 3 c i L i ( α , β ) (x)= C T ϕ(x).

Here, we have

D ( 2 ) = β 2 ( 0 0 0 0 0 0 0 0 1 0 0 0 2 1 0 0 ) , D ( 5 3 ) = ( 0 0 0 0 0 0 0 0 Ω 5 3 ( 2 , 0 ) Ω 5 3 ( 2 , 1 ) Ω 5 3 ( 2 , 2 ) Ω 5 3 ( 2 , 3 ) Ω 5 3 ( 3 , 0 ) Ω 5 3 ( 3 , 1 ) Ω 5 3 ( 3 , 2 ) Ω 5 3 ( 3 , 3 ) ) , D ( 2 3 ) = ( 0 0 0 0 Ω 2 3 ( 1 , 0 ) Ω 2 3 ( 1 , 1 ) Ω 2 3 ( 1 , 2 ) Ω 2 3 ( 1 , 3 ) Ω 2 3 ( 2 , 0 ) Ω 2 3 ( 2 , 1 ) Ω 2 3 ( 2 , 2 ) Ω 2 3 ( 2 , 3 ) Ω 2 3 ( 3 , 0 ) Ω 2 3 ( 3 , 1 ) Ω 2 3 ( 3 , 2 ) Ω 2 3 ( 3 , 3 ) ) , G = ( g 0 g 1 g 2 g 3 ) ,

where g j and Ω ν (i,j) are computed from (9) and (17), respectively.

Therefore using (32), we obtain

c 0 + [ 1 + Ω 2 3 ( 1 , 0 ) ] c 1 + [ 1 2 Ω 5 3 ( 2 , 0 ) + Ω 2 3 ( 2 , 0 ) ] c 2 + [ 2 2 Ω 5 3 ( 3 , 0 ) ] c 3 g 0 = 0 ,
(43)
[ 1 + Ω 2 3 ( 1 , 1 ) ] c 1 + [ Ω 2 3 ( 2 , 1 ) 2 Ω 5 3 ( 2 , 1 ) ] c 2 + [ 1 2 Ω 5 3 ( 3 , 1 ) + Ω 2 3 ( 3 , 1 ) ] c 3 g 1 = 0 .
(44)

Now, by applying (33), we have

C T ϕ ( 0 ) = c 0 + ( α + 1 ) c 1 + ( α + 1 ) ( α + 2 ) 2 c 2 + ( α + 1 ) ( α + 2 ) ( α + 3 ) 6 c 3 = 0 , C T D ( 1 ) ϕ ( 0 ) = β c 1 β ( α + 2 ) c 2 β ( α + 3 ) ( α + 2 ) 2 c 3 = 0 .
(45)

Finally, by solving (43)-(45), we have the four unknown coefficients with various choices of α and β which are displayed in Table 2. Then we get

c 0 = α 3 + 6 α 2 + 11 α + 6 β 3 , c 1 = 3 α 2 15 α 18 β 3 , c 2 = 6 α + 18 β 3 , c 3 = 6 β 3 ,

and

u(x)= ( c 0 c 1 c 2 c 3 ) ( L 0 ( α , β ) ( x ) L 1 ( α , β ) ( x ) L 2 ( α , β ) ( x ) L 3 ( α , β ) ( x ) )= x 3 .
Table 2 c 0 , c 1 , c 2 and c 3 for different values of α and β for Example 2

Example 3 Consider the FDE

D 2 u(x)+ D 3 2 u(x)+3u(x)=g(x),u(0)=1, u (0)=0,x[0,20],
(46)

where

g(x)= ( 3 γ 2 ) cos(γx)+ 1 Γ ( 3 2 ) 0 x ( x t ) 3 2 1 u(t)dt

and the exact solution is given by u(x)=cos(γx).

The maximum absolute errors using the MGLOM together with the tau approximation, for γ=0.1 and various choices of N, α and β are shown in Table 3. Moreover, the approximate solution obtained by this method for α=2, β=4 and two choices of N and γ is shown in Figures 1 and 2. Also, maximum absolute error for N=10 and different values of γ, α, and β are displayed in Table 4.

Figure 1
figure 1

Comparing the exact solution and the approximate solutions at N=5,10 , where α=2 , β=4 and γ=0.1 .

Figure 2
figure 2

Comparing the exact solution and the approximate solutions at N=5,10 , where α=2 , β=4 and γ=0.01 .

Table 3 Maximum absolute error for γ=0.1 and different values of α , β and N for Example 3
Table 4 Maximum absolute error for N=10 and different values of γ , α , and β for Example 3

Example 4 Consider the nonlinear FDE

D 2 u ( x ) + [ D 4 3 u ( x ) D 4 3 u ( x ) ] + u ( x ) = γ 2 e γ x + γ 8 3 e γ 2 x + e γ x , u ( 0 ) = 1 , u ( 0 ) = γ , x [ 0 , 10 ] ,
(47)

where u(x)= e γ x is the exact solution.

The solution of this problem is obtained by applying the modified generalized Laguerre collocation method. The approximate solution obtained by the proposed method for γ={0.1,0.01}, α=2, β=3 and two choices of N are shown in Figures 3 and 4 to make it easier to compare with the analytic solution. Moreover, the absolute errors for γ={0.1,0.01}, α=2, β=3 and N=5 are given in Figures 5 and 6.

Figure 3
figure 3

Comparing the exact solution and the approximate solutions at N=5,10 , where α=2 , β=3 and γ=0.1 .

Figure 4
figure 4

Comparing the exact solution and the approximate solutions at N=5,10 , where α=2 , β=3 and γ=0.01 .

Figure 5
figure 5

The absolute error for γ= 1 10 , ν= 3 4 , α=2 and β=3 at N=5 .

Figure 6
figure 6

Maximum absolute error by using MGLOM with the various choices of N and γ=0.1 .

Example 5 Consider the nonlinear FDE

D 2 u ( x ) + D 5 3 u ( x ) + u 2 ( x ) = g ( x ) , u ( 0 ) = 0 , u ( 0 ) = γ , x [ 0 , 10 ] ,
(48)

where

g(x)= γ 2 sin(γx)+ sin 2 (γx)+ 1 Γ ( 5 3 ) 0 x ( x t ) 5 3 1 u(t)dt,

and the exact solution is given by u(x)=sin(γx).

The solution of this problem is implemented by the modified generalized Laguerre collocation method. The maximum absolute error obtained by the proposed method for various choices of N, α and β, where γ=0.1, is given in Figure 7. Moreover, the approximate solution obtained by the proposed method for α=5, β=3 and two choices of N is shown in Figure 8.

Figure 7
figure 7

Comparing the exact solution and the approximate solutions at N=5,10 , where α=5 , β=3 and γ=0.1 .

Figure 8
figure 8

The absolute error for γ= 1 100 , ν= 3 4 , α=2 and β=3 at N=5 .

Example 6 Consider the following nonlinear initial value problem:

D ν u(x)+ u 2 (x)=Γ(ν+2)x+ 6 x 3 ν Γ ( 4 ν ) + ( x ν + 1 + x 3 ) 2 ,0<ν2,

whose exact solution is given by u(x)= x ν + 1 + x 3 .

Comparison between the curves of exact solutions and the approximate solutions at α=3 and β=5 of the proposed problem subject to u(0)= u (0)=0 in case of N=12 and four different fractional orders ν=1.2,1.4,1.6,1.8 are shown in Figures 9 and 10. The maximum absolute errors at ν=1.5 for various choices of α, β and N in the interval [0,1] are shown in Table 5. Moreover, Figures 11 and 12 display a comparison between the curves of exact solutions and the approximate solutions at α=3 and β=5 of the proposed problem subject to u(0)=0 in case of N=12 and four different fractional orders ν=0.2,0.4,0.6,0.8. From Figures 9-12, it can be seen that the numerical solutions are in complete agreement with the exact solutions for all values of ν. Also, from the numerical results implemented in this example and the previous ones, the classical Laguerre polynomial (α=0, β=1), which is used most frequently in practice, is not the best one, especially when we are approximating the solution of FDEs.

Figure 9
figure 9

Comparing the exact solution and the approximate solutions at N=12 , α=3 , β=5 and ν=1.2,1.4,1.6,1.8 .

Figure 10
figure 10

Comparing the exact solution and the approximate solutions at N=12 , α=3 , β=5 and ν=1.2,1.4,1.6,1.8 .

Figure 11
figure 11

Comparing the exact solution and the approximate solutions at N=12 , α=3 , β=5 and ν=0.2,0.4,0.6,0.8 .

Figure 12
figure 12

Comparing the exact solution and the approximate solutions at N=12 , α=3 , β=5 and ν=0.2,0.4,0.6,0.8 .

Table 5 Maximum absolute error for ν= 3 2 , with various choices of N , for Example 6

6 Conclusions

In this paper, we have proposed two efficient spectral methods based on modified generalized Laguerre polynomials for tackling linear and nonlinear FDEs on the half-line. In these methods, the problem is reduced to the solution of a system of algebraic equations in the expansion coefficient of the solution. Illustrative examples were implemented to demonstrate the applicability of the proposed algorithms. The computational results show that the proposed methods can be effectively used in numerical solution of a time-dependent fractional partial differential equation and other problems on the half-line.