1 Introduction

The fractional calculus represents a powerful tool in applied mathematics to study numerous problems from different fields of science and engineering such as mathematical physics, finance, hydrology, biophysics, thermodynamics, control theory, statistical mechanics, astrophysics, cosmology, and bioengineering [1]. Since the fractional calculus has attracted much more interest among mathematicians and other scientists, the solutions of the fractional differential and integro-differential equations have been studied frequently in recent years [2,3,4,5,6,7,8,9,10]. The methods that are used to find the solutions of the fractional Volterra integro-differential equations are given as Adomian decomposition [11], Bessel collocation [12, 13], CAS wavelets [14], Chebyshev pseudo-spectral [15], cubic B-spline wavelets [16], Euler wavelet [17], fractional differential transform [18], homotopy analysis [19], homotopy perturbation [20,21,22,23], Jacobi spectral-collocation [24, 25], Legendre collocation [26], Legendre wavelet [27], linear and quadratic interpolating polynomials [28], modification of hat functions [29], multi-domain pseudospectral [30], normalized systems functions [31], novel Legendre wavelet Petrov–Galerkin method [32], operational Tau [33], piecewise polynomial collocation [34], quadrature rules [35], reproducing kernel [36], second Chebyshev wavelet [37], second kind Chebyshev polynomials [38], sinc-collocation [39, 40], spline collocation [41], Taylor expansion [27], and variational iteration [20, 23].

Laguerre polynomials are used to solve some integer order integro-differential equations. These equations are given as Altarelli–Parisi equation [42], Dokshitzer–Gribov–Lipatov–Altarelli–Parisi equation [43], pantograph-type Volterra integro-differential equation [44], linear Fredholm integro-differential equation [45, 46], linear integro-differential equation [47], parabolic-type Volterra partial integro-differential equation [48], nonlinear partial integro-differential equation [49], delay partial functional differential equation [50]. Besides, Laguerre polynomials are used to solve the fractional Fredholm integro-differential equation [51]. However, there has not been a method in the literature for fractional Volterra integro-differential equations in terms of Laguerre polynomials. That is why, in this paper, a method based on the Laguerre polynomials is presented to find the solutions of linear fractional Volterra integro-differential equation in the form

$$ D^{\alpha } y ( x ) +p ( x ) y ( x ) =g ( x ) +\lambda \int_{0}^{x} K ( x,t ) y ( t ) \,dt,\quad 0\leq x\leq b, \alpha >0 $$
(1)

with the initial conditions

$$ y^{ ( j ) } ( 0 ) = c_{j},\quad j=0,1,\dots ,n-1, \mbox{ and } n-1< \alpha < n. $$
(2)

Here, \(n\in \mathbb{Z}^{+}\), \(\lambda \mathbb{\in R}\), \(K(x,t)\), \(p ( x ) \), and \(g(x)\) are given functions, \(y ( x ) \) is the unknown function to be determined, \(D^{\alpha } y ( x ) \) indicates the Caputo fractional derivative of \(y(x)\). Now, we give the definition and the basic properties of the Caputo fractional derivative as follows.

Definition

([52])

The Caputo fractional differentiation operator \(D^{\alpha }\) of order α is defined as follows:

$$ D^{\alpha } f ( x ) = \frac{1}{\varGamma ( n-\alpha ) } \int_{0}^{x} \frac{f^{ ( n ) } ( t ) }{ ( x-t ) ^{\alpha +1-n}} \,dt,\quad \alpha >0, $$

where \(n-1<\alpha <n\), \(n\in \mathbb{Z}^{+} \).

Besides, the Caputo fractional derivative of a constant function is zero and the Caputo fractional differentiation operator is linear [53].

The aim of this study is to give an approximate solution of problem (1)–(2) in the form

$$ y ( x ) \cong y_{N} ( x ) = \sum_{i=0}^{N} a _{i} L_{i} ( x ) , $$
(3)

where \(a_{i}\) are unknown coefficients, N is chosen any positive integer such that \(N\geq n\), and \(L_{i} ( x ) \) are the Laguerre polynomials of order i defined in Ref. [54] as

$$ L_{i} ( x ) = \sum_{k=0}^{i} ( -1 ) ^{k} \frac{i!}{ ( i-k ) ! ( k! ) ^{2}} x^{k}. $$

Besides, the main purpose of the solution method presented in this paper is to obtain the Caputo fractional derivative of the Laguerre polynomials in terms of the Laguerre polynomials and to give a matrix representation for this relation. The Caputo fractional derivative of the Laguerre polynomials is mentioned in Ref. [51, 55,56,57]. While these matrix relations have been given depending on approximate matrices, the relation proposed in this paper is new, exact, and simpler than the former ones.

This paper is organized as follows: In Sect. 2, the main matrix relations of the terms in Eq. (1) are established. In Sect. 3, the collocation method which is used to find the solution is introduced. In Sect. 4, some numerical examples are solved and their comparison with the existing results in the literature are presented to verify the accuracy and efficiency of the proposed method. The conclusion is given in Sect. 5.

2 Main matrix relations

In this section, we construct the matrix forms of each term of Eq. (1). Firstly, we can write the approximate solution (3) in the matrix form

$$ y_{N} ( x ) = \mathbf{L} ( x ) \mathbf{A}, $$
(4)

where

L(x)= [ L 0 ( x ) L 1 ( x ) L N ( x ) ] andA= [ a 0 a 1 a N ] T .

Now, we will state a theorem that gives the Caputo fractional derivative of Laguerre polynomials in terms of Laguerre polynomials.

Theorem

Let \(L_{i} ( x ) \) be Laguerre polynomial of order i, then the Caputo fractional derivative of \(L_{i} ( x ) \) in terms of Laguerre polynomials is found as follows:

$$ D^{\alpha } L_{i} ( x ) =0,\quad i< \lceil \alpha \rceil , $$

and otherwise

D α L i (x)= x 1 α k = α i j = 0 k 1 ( 1 ) j + k ( k 1 ) ! Γ ( k + 1 α ) ( i k ) ( k 1 j ) L j (x),
(5)

where \(\lceil \alpha \rceil \) denotes the ceiling function which is the smallest integer greater than or equal to α.

Proof

Let us begin deriving the Laguerre polynomials with the definition of them:

$$ D^{\alpha } L_{i} ( x ) = D^{\alpha } \Biggl\{ \sum _{k=0} ^{i} ( -1 ) ^{k} \frac{i!}{ ( i-k ) ! ( k! ) ^{2}} x^{k} \Biggr\} . $$

By the linearity of Caputo fractional derivative, we get

$$ D^{\alpha } L_{i} ( x ) = \sum_{k=0}^{i} ( -1 ) ^{k} \frac{i!}{ ( i-k ) ! ( k! ) ^{2}} D^{\alpha } \bigl( x^{k} \bigr) . $$

Using the Caputo fractional derivative of \(x^{k}\), \(k=0,1,2,\dots \),

$$ D^{\alpha } x^{k} = \textstyle\begin{cases} 0,& k< \lceil \alpha \rceil, \\ \frac{\varGamma ( k+1 ) }{\varGamma ( k+1-\alpha ) } x ^{k-\alpha },& k\geq \lceil \alpha \rceil, \end{cases} $$

we obtain \(D^{\alpha } L_{i} ( x ) =0\) for \(i<\lceil \alpha \rceil \) and

D α L i (x)= k = α i ( 1 ) k Γ ( k + 1 α ) ( i k ) x k α ,i=α,α+1.

At this step, by taking \(x^{1-\alpha }\) out of the series and using the Laguerre series of the function \(x^{k} \) given by Lebedev [58]

x k =k! j = 0 k ( 1 ) j ( k j ) L j (x),0<x<,k=0,1,2,

we have relation (5) and the proof is completed. □

2.1 Matrix relation for the differential part

Now, we will write the matrix form of the differential part of Eq. (1). The fractional part is obviously seen as

D α L(x)= [ D α L 0 ( x ) D α L 1 ( x ) D α L N ( x ) ] .
(6)

The right-hand side of this equation can be expressed as

$$ D^{\alpha } \mathbf{L} ( x ) = x^{1-\alpha } \mathbf{L} ( x ) \mathbf{S}_{\alpha }, $$
(7)

where \(\mathbf{S}_{\alpha }\) is an (\(N+1\)) dimensional square matrix denoted by

S α = [ 0 S 1 , 1 ( 1 0 ) S 1 , 2 + ( 2 0 ) S 2 , 2 k = 1 N ( k 1 0 ) S k , N 0 0 ( 1 1 ) S 2 , 2 k = 2 N ( k 1 1 ) S k , N 0 0 0 k = 3 N ( k 1 2 ) S k , N 0 0 0 ( 1 ) N S N , N 0 0 0 0 ] .

Here, the \(S_{k,i}\) terms in the entries of \(\mathbf{S}_{\alpha }\) are defined as follows:

S k , i = { ( 1 ) k ( k 1 ) ! Γ ( k + 1 α ) ( i k ) , if  α k i , 0 , otherwise .

Then, by using relations (4) and (7), the fractional differential part of Eq. (1) can be expressed as

$$ D^{\alpha } y ( x ) \cong D^{\alpha } \mathbf{L} ( x ) \mathbf{A} = x^{1-\alpha } \mathbf{L} ( x ) \mathbf{S}_{\alpha } \mathbf{A}. $$
(8)

2.2 Matrix relation for conditions

The relation between \(\mathbf{L} ( x ) \) and its derivatives of integer order is given by Yüzbaşı[44] as

$$ \mathbf{L}^{( i )} ( x ) = \mathbf{L} ( x ) \mathbf{M}^{i}, \quad i=0,1,2,\dots , $$
(9)

where the matrix M is defined by

M= [ 0 1 1 1 0 0 1 1 0 0 0 1 0 0 0 1 0 0 0 0 ] .

By using relation (9), the corresponding matrix forms of the conditions defined in (2) can be written as

$$ y^{j} ( 0 ) \cong \mathbf{L} ( 0 ) \mathbf{M} ^{j} \mathbf{A} = c_{j},\quad j=0,1,\dots ,n-1. $$
(10)

Here, the matrix \(\mathbf{L} ( 0 ) \mathbf{M}^{j}\) is named \(\mathbf{U}_{\mathrm{j}}\) where it is an \(1\times ( N+1 ) \) dimensional matrix. Hence, Eq. (10) becomes

$$ \mathbf{U}_{\mathrm{j}} \mathbf{A} = c_{j},\quad j=0,1,\dots , n-1. $$

3 Method of solution

To obtain the approximate solution of Eq. (1), we compute the unknown coefficients by using the following collocation method. Firstly, let us substitute the matrix forms (4) and (8) into Eq. (1), and thus we obtain the matrix equation

$$ x^{1-\alpha } \mathbf{L} ( x ) \mathbf{S}_{\alpha } \mathbf{A}+ p ( x ) \mathbf{L} ( x ) \mathbf{A} = g ( x ) + \lambda \int_{0}^{x} K ( x,t ) \mathbf{L} ( t ) \mathbf{A} \,dt. $$
(11)

By substituting the collocation points \(x_{s} >0\) (\(s=0,1,\dots ,N\)) into Eq. (11), we have a system of matrix equations

$$ \bigl\{ x_{s}^{1-\alpha } \mathbf{L} ( x_{s} ) \mathbf{S} _{\alpha } + p ( x_{s} ) \mathbf{L} ( x_{s} ) - \lambda \mathbf{v} ( x_{s} ) \bigr\} \mathbf{A} =g ( x_{s} ) , $$
(12)

where \(\mathbf{v} ( x_{s} ) = \int_{0}^{x_{s}} K ( x _{s},t ) \mathbf{L} ( t ) \,dt\). This system can be written in the compact form:

$$ \{ \mathbf{X}_{\alpha } \mathbf{L S}_{\alpha } +\mathbf{PL}- \lambda \mathbf{V} \} \mathbf{A}=\mathbf{G}, $$
(13)

where

X α = [ x 0 1 α 0 0 0 x 1 1 α 0 0 0 x N 1 α ] , P = [ p ( x 0 ) 0 0 0 p ( x 1 ) 0 0 0 p ( x N ) ] , L = [ L ( x 0 ) L ( x 1 ) L ( x N ) ] , V = [ v ( x 0 ) v ( x 1 ) v ( x N ) ] , G = [ g ( x 0 ) g ( x 1 ) g ( x N ) ] .

Denoting the expression in parenthesis of Eq. (13) by W, the fundamental matrix equation for Eq. (1) is reduced to \(\mathbf{WA} = \mathbf{G}\), which corresponds to a system of \(( N+1 ) \) linear algebraic equations with unknown Laguerre coefficients \(a_{0}, a_{1},\dots , a_{N}\).

Finally, to obtain the solution of Eq. (1) under conditions (2), we replace or stack the n rows of the augmented matrix \([ \mathbf{W};\mathbf{G} ] \) with the rows of the augmented matrix \([ \mathbf{U}_{\mathrm{j}}; c_{j} ] \). In this way, the Laguerre coefficients are determined by solving the new linear algebraic system.

4 Numerical examples

In this section, we apply the proposed method to four examples existing in the literature and to a test example constructed for this method. We have performed all of the numerical computations using Mathcad 15. We also use the collocation points by using the formula \(x_{s} = { [ 1- \cos ( \frac{ ( s+1 ) \pi }{N+1} ) ] } / {2}\), \(s=0,1,\dots, N\).

Example 1

Consider the following fractional integro-differential equation:

$$ D^{\frac{1}{2}} y ( x ) =y ( x ) + \frac{8}{3 \varGamma ( 0.5 ) } x^{1.5} - x^{2} - \frac{1}{3} x^{3} + \int _{0}^{x} y ( t ) \,dt $$

subject to \(y ( 0 ) =0\) with the exact solution \(y ( x ) = x^{2}\).

Applying the procedure in Sect. 3, the main matrix equation of this problem and the conditions are given by

$$ \{ \mathbf{X}_{{{1}} / {{2}}} \mathbf{L S}_{{{1}} / {{2}}} - \mathbf{L}-\mathbf{V} \} \mathbf{A} =\mathbf{G} $$

and

$$ \mathbf{U}_{0} \mathbf{A} = 0. $$

If we take \(N=2\), the collocation points become \(x_{0} =0.25\), \(x_{1} =0.75\), \(x_{2} =1\). Then the matrices mentioned above are

X 1 / 2 = [ 1 2 0 0 0 3 2 0 0 0 1 ] , L = [ 1 3 4 17 32 1 1 4 7 32 1 0 1 2 ] , S 1 / 2 = [ 0 2 π 8 3 π 0 0 4 3 π 0 0 0 ] , V = [ 1 4 7 32 73 384 3 4 15 32 33 128 1 1 2 1 6 ] , G = [ 1 3 π 13 192 3 π 45 64 8 3 π 4 3 ] , U 0 = [ 1 1 1 ] .

By solving this system, we get \(a_{0} =2\), \(a_{1} =-4\), \(a_{2} =2\). When we substitute the determined coefficients into Eq. (3), we get the exact solution.

Using the homotopy analysis method, this problem was also solved by Awawdeh et al. [19]. They found the approximate solution for \(N=5\), but they did not state the numerical results of the errors of their method. Besides, Sahu et al. [32] found the approximate solution with the maximum absolute error \(4.2 \times 10^{-15}\) by the Legendre wavelet Petrov–Galerkin method for \(N=6\). If the results are compared, it can be said that the proposed method is better than the other methods since the exact solution is found for \(N=2\).

Example 2

Consider the following fractional integro-differential equation:

$$ D^{0.75} y ( x ) = \frac{1}{\varGamma (1.25)} x^{0.25} +(x \cos x - \sin x )y(x)+ \int_{0}^{x} x \sin t y ( t ) \,dt, \quad 0\leq x\leq 1, $$

subject to \(y ( 0 ) =0\) with the exact solution \(y ( x ) =x\).

Applying the procedure in Sect. 3, the main matrix equation of this problem and the conditions are given by

$$ \{ \mathbf{X}_{{3} / {4}} \mathbf{L S}_{{3} / {4}} - \mathbf{PL}- \mathbf{V} \} \mathbf{A} =\mathbf{G} $$

and

$$ \mathbf{U}_{0} \mathbf{A} = 0. $$

If we take \(N=1\), the collocation points become \(x_{0} =0.5\), \(x_{1} =1\). Then the matrices mentioned above are

X 3 / 4 = [ 8 4 2 0 0 1 ] , L = [ 1 1 2 1 0 ] , S 3 / 4 = [ 0 2 2 Γ ( 3 4 ) π 0 0 ] , G = Γ ( 3 4 ) π [ 2 5 4 2 2 ] , U 0 = [ 1 1 ] , V = [ 2 sin 2 ( 1 4 ) 2 sin ( 1 2 ) 2 + 1 4 1 cos ( 1 ) 1 2 sin ( 1 ) 2 ] , P = [ cos ( 1 2 ) 2 sin ( 1 2 ) 0 0 cos ( 1 ) sin ( 1 ) ] .

By solving this system, we get \(a_{0} =1\), \(a_{1} =-1\). When we substitute the determined coefficients into Eq. (3), we get the exact solution.

This problem was also solved by Awawdeh et al. [19] with the homotopy analysis method. They found the approximate solution for \(N=5\), but they did not state the numerical results of the errors of their method. Besides, Sahu et al. [32] found the approximate solution with the maximum absolute error \(1.1 \times 10^{-16}\) by the Legendre wavelet Petrov–Galerkin method for \(N=6\). If the results are compared, it can be said that the proposed method is better than the other methods since the exact solution is found for \(N=1\).

Example 3

Consider the following fractional integro-differential equation:

$$ D^{\sqrt{3}} y ( x ) = \frac{2}{\varGamma (3- \sqrt{3} )} x^{2- \sqrt{3}} +2 \sin x -2x+ \int_{0}^{x} \cos (x-t) y ( t ) \,dt, $$

subject to \(y ( 0 ) =0\), \(y ' ( 0 ) =0\) with the exact solution \(y ( x ) = x^{{2}}\).

Applying the solution method given in Sect. 3, the main matrix equation of this problem and the conditions are given by

$$ \{ \mathbf{X}_{\sqrt{3}} \mathbf{L S}_{\sqrt{3}} -\mathbf{V} \} \mathbf{A} =\mathbf{G} $$

and

$$ \mathbf{U}_{0} \mathbf{A} = 0. $$

Let \(N=2\), the collocation points become \(x_{0} =0.25\), \(x_{1} =0.75\), \(x_{2} =1\). Here, the matrices in the main matrix relation of this problem are given as follows:

X 3 = [ 4 3 1 0 0 0 ( 4 3 ) 3 1 0 0 0 1 ] , S 3 = [ 0 0 1 Γ ( 3 3 ) 0 0 1 Γ ( 3 3 ) 0 0 0 ] , G = [ 2 sin ( 1 4 ) + 2 ( 4 ) 3 2 Γ ( 3 3 ) 1 2 2 sin ( 3 4 ) + 2 ( 3 4 ) 2 3 Γ ( 3 3 ) 3 2 2 sin ( 1 ) + 2 Γ ( 3 3 ) 2 ] , L = [ 1 3 4 17 32 1 1 4 7 32 1 0 1 2 ] , U 0 = [ 1 1 1 ] , V = [ sin ( 1 4 ) cos ( 1 4 ) + sin ( 1 4 ) 1 2 cos ( 1 4 ) 7 4 sin ( 3 4 ) cos ( 3 4 ) + sin ( 3 4 ) 1 2 cos ( 3 4 ) 5 4 sin ( 1 ) cos ( 1 ) + sin ( 1 ) 1 2 cos ( 1 ) 1 ] .

By solving this system, we get \(a_{0} =2\), \(a_{1} =-4\), \(a_{2} =2\). When we substitute the determined coefficients into Eq. (3), we get the exact solution.

This problem was also solved by Awawdeh et al. [19] and they found the approximate solution by the homotopy analysis method for \(N=5\). By the proposed method, we have found the exact solution of the problem for \(N=2\). Apparently, our method is better than the other method.

Example 4

Consider the following fractional Volterra integro-differential equation with the given initial condition \(y ( 0 ) =0\) and with the non-polynomial exact solution \(y ( x ) = x^{{3} / {2}}\):

$$ D^{\frac{1}{3}} y ( x ) = \frac{3 \sqrt{\pi }}{4\varGamma ( {13} / {6} ) } x^{{7} / {6}} - \frac{2}{63} x^{{9} / {2}} \bigl( 9+7 x^{2} \bigr) + \int_{0}^{x} \bigl( xt+ x^{2} t^{2} \bigr) y ( t ) \,dt. $$

The main matrix equation of this problem and the conditions are given as

$$ \{ \mathbf{X}_{{1} / {3}} \mathbf{L S}_{{1} / {3}} -\mathbf{V} \} \mathbf{A}=\mathbf{G} $$

and

$$ \mathbf{U}_{0} \mathbf{A} = 0. $$

The absolute errors of our method are compared with three methods: linear scheme, quadratic scheme, and linear-quadratic scheme for the fractional integro-differential equations of Kumar et al. [28] for \(N=5\) in Table 1. It is seen that our method gives better results than the other methods.

Table 1 Comparison of the absolute errors of Example 4 for different methods

Example 5

Consider the following linear fractional Volterra integro-differential equation which is a test problem to the proposed method with a non-polynomial exact solution and with a non-separable kernel:

$$ D^{\frac{1}{2}} y ( x ) +y ( x ) = \frac{2}{5} + \frac{3 \sqrt{\pi } x}{4} + x^{\frac{3}{2}} -2 \frac{e^{x^{ \frac{7}{2}}}}{5} + \int_{0}^{x} x e^{x t^{2} \sqrt{t}} y ( t ) \,dt $$

subject to the initial condition \(y ( 0 ) =0\) with the exact solution \(y ( x ) = x^{{3} / {2}}\).

Since the solution is not a polynomial, the exact solution cannot be obtained by the proposed method. That is why approximate solutions are gained and maximum absolute errors of this problem are given in Table 2 for the different N values.

Table 2 Maximum errors of Example 5 for different N values

5 Conclusion

In this study, a collocation method based on Laguerre polynomials has been developed for solving the fractional linear Volterra integro-differential equations. For this purpose, the matrix relation for the Caputo fractional derivative of the Laguerre polynomials has been obtained for the first time in the literature. Using these relations and suitable collocation points, the integro-differential equation has been transformed into a system of algebraic equations. The method is faster and simpler than the other methods in the literature, and better than the homotopy analysis and Legendre wavelet method.