1. Introduction
Fractional calculus refers to the calculus of integrals and derivatives of any real positive order [
1,
2,
3]. During the last few years, it became very popular due to its applications in various fields of science and engineering. In fact, in many applications, real phenomena can be modeled by differential equations having a fractional derivative both in time and space. This allows one to take into account in a clear way the history and nonlocal behavior of the physical quantities under study. Through fractional calculus, we can study, for example, the viscoelasticity properties of special materials, anomalous diffusion in human tissues, water flow in deep ground, the prediction of earthquakes, and fractal problems [
4,
5,
6,
7].
There are several definitions of the fractional derivative that become equivalent under particular assumptions [
1,
3]. The first definition of a fractional derivative suitable for general functions appeared in the first half of the 19th Century and is now known as the Riemann–Liouville derivative:
where:
is the Euler gamma function and
denotes the set of positive natural numbers.
Using the Riemann–Liouville definition, the usual differentiation operator in the Fourier domain can be easily extended to the fractional case, i.e.,
where
denotes the Fourier transform operator. Moreover, the Riemann–Liouville derivative coincides with the Grunwald–Letnikov derivative
where:
are the generalized binomial coefficients [
1]. It is worth noticing that the sequence
is compactly supported when
, while for
, the sequence
is no longer compactly supported, but its coefficients decay toward infinity as:
The Grunwald–Letnikov definition (
3) is easier to use when addressing the numerical solution of fractional differential equations by finite difference methods [
8].
The Riemann–Liouville derivative is not suitable to be used in real-world models for two main reasons: the Riemann–Liouville derivative of constant functions is not zero, and the initial conditions for initial value fractional differential problems are not easy to enforce. To overcome these problems, in 1967, Caputo [
9] introduced a new definition of the fractional derivative, now named the Caputo derivative:
The Riemann–Liouville derivative and the Caputo derivative are related to each other by:
so that they coincide when the function
satisfies homogeneous initial conditions [
1].
Even if the Caputo derivative requires higher smoothness of the function
, it is more suitable to describe real phenomena since it shares some of the main properties with the ordinary derivative. In particular, the Caputo derivative of constant functions is zero, and the initial and boundary conditions are easy to implement. For this reason, in this paper, we consider an initial value differential problem having the Caputo derivative in time. For a discussion on other types of fractional derivatives, see [
10].
In the literature, several numerical methods have been proposed to solve fractional differential equations [
8,
11,
12]. Finite difference methods are very popular since they are easy to implement, but they require high order difference formulas to achieve high accuracy at the price of a high computational cost [
13,
14]. Spectral methods are more efficient since the solution to the differential problem is approximated by an expansion in a global polynomial basis, whose fractional derivative can be evaluated explicitly. However, the coefficients of the expansion are obtained by solving a dense linear system so that its numerical solution could have a high computational cost [
11,
14]. For this reason, expansions in local bases with small support are preferable. For instance, polynomial B-splines [
15] are piecewise polynomials with small support that can be used to construct a basis for the spline space. In fact, spline functions are piecewise polynomials of a given degree and prescribed smoothness that can be constructed as linear combinations of B-splines. The freedom to choose the degree of the polynomial pieces and the overall smoothness of the spline give a great flexibility that can be used to adapt the spline to the function to be approximated.
As in the case of spectral methods, the expansion coefficients of the B-spline representation can be obtained using collocation methods with the advantage that the collocation matrix is triangular and the off-diagonal entries decay fast. In the case of cardinal B-splines, i.e., B-splines with uniform knots, their fractional derivative can be evaluated explicitly by the backward finite difference operator [
16]. This approach was introduced by two of the authors in [
17] (see also [
18]), where a spline collocation method based on B-spline bases was used to solve a time fractional diffusion equation. The method proved to be particularly effective also in the case of nonlinear fractional differential equations [
19]. A different approach was considered in [
20,
21], where the fractional differential equation under study was reformulated as an integral equation and solved by approximating its solution by a spline function represented by a Lagrange polynomial basis. More recently, a similar approach was used in [
22] to solve multi-term fractional differential equations. For a comprehensive treatment of this topic, see [
23].
In this paper, we propose a new method based on refinable spline quasi-interpolatory operators. Quasi-interpolatory operators have greater flexibility with respect to interpolation, since they are only required to reproduce polynomials up to a given degree rather than interpolate a function at given points. For this reason, they can be constructed to satisfy some special properties, such as shape preserving properties or prescribed approximation order. In more detail, we consider an initial value problem having the fractional derivative in time and approximate its solution by a family of discrete quasi-interpolatory operators [
24,
25,
26]. Then, the unknown coefficients of the approximating function are determined by the collocation method introduced in [
18]. The method presented here is a generalization of the collocation method introduced in [
18,
27]. The main novelty is the use of spline quasi-interpolatory operators as approximating functions so that the unknown coefficients are suitable functionals of the solution to the differential problem. Different choices of the functionals allow us to increase the polynomial reproducibility of the approximating function with the advantage of achieving higher accuracy. To our knowledge, this is the first time that quasi-interpolatory operators have been used to numerically solve differential equations having a fractional derivative.
Since the quasi-interpolatory operators we consider are spline functions, i.e., piecewise polynomials of integer degree, their fractional derivatives are fractional splines, i.e., piecewise polynomials of non-integer degree [
16]. Thus, the fractional derivatives needed to evaluate the numerical solution by the collocation method can be computed efficiently by an explicit differentiation rule [
28]. The numerical results show that the method is easy to implement and efficient so that it can be used to solve other kinds of fractional differential problems, such as boundary value problems and nonlinear problems.
The paper is organized as follows. Some preliminaries, needed to develop the numerical method, are given in
Section 2. In particular, in
Section 2.1, the fractional differential equation we are interested in is introduced, as well as its analytical solution expressed in terms of the Mittag–Leffler function. In
Section 2.2, the spline space we use as the approximating space is described. In
Section 2.3, the family of discrete spline quasi-interpolatory operators we use as approximating functions is defined, and its main properties are analyzed. The new method we propose is introduced in
Section 3 where the explicit expression of the fractional derivative of the B-spline basis is also given (cf.
Section 3.1). Finally, in
Section 4, some numerical tests are performed.
Section 5 is devoted to the discussion of our results, while in
Section 6, some conclusions are offered.
3. Numerical Method
For any fixed
, we approximate the solution to the fractional differential problem (
7) by the discrete quasi-interpolatory operator (
23), i.e.,
where
are the coefficients defined in (
25) and:
are the unknown coefficients whose expression depends on the polynomial reproducibility order
r. In particular, for
:
while for
:
where
,
,
are given distinct points in the interval
.
We determine the unknown coefficients by collocation. To this end, we choose a set of collocation points
that belong to the discretization interval
I and enforce the approximating function
to solve the differential problem on these points, i.e.,
Substituting (
28) in the previous equations and rearranging the sums, we get:
Equations (
30) form a linear system that can be written in matrix form as:
where
is the unknown column vector,
is the matrix collecting the coefficients
,
is the row vector whose entries are the basis functions evaluated at the initial point
,
are the collocation matrices of the refinable basis, and:
is the known term.
The linear system (
31) has
equations and
unknowns. To guarantee the existence of a unique solution, for any fixed
n and
r, the number of collocation points
and the refinement level
j have to be chosen so that number of unknowns is no greater than the number of equations (cf. [
27,
36]). In the case when
, (
31) results in an overdetermined linear system that can be solved by the least squares method. In this case, particular attention should be paid to fulfill the initial condition.
We notice that from the partition of unity property (
12) and [
18] (Th. 3.1), it follows that the collocation solution
is stable, i.e.,
where
is a constant independent of
j.
Finally, the collocation method can be proven to be convergent (cf. [
27,
28]).
Theorem 1. The collocation method is convergent, i.e.: with convergence order ν provided that , i.e., Proof. Using Definition (
5), it is easy to show that the fractional differential equation (
7) is equivalent to the integral equation:
where
. The collocation method can be used also to approximate the solution to this integral equation, i.e.,
where
is the quasi-interpolatory operator (
23). Thus, the equivalence implies that the approximation error
is the same as the approximation error
(cf. [
36]). Since
is a spline operator, the convergence is guaranteed with approximation order
when
[
30]. □
3.1. The Fractional Derivative of the Refinable B-Spline Basis
To numerically solve the linear system (
31), we need to evaluate the Caputo derivative of the basis functions
,
. For
, the Caputo derivative of
can be explicitly evaluated by [
18,
27]:
For
, the functions
are left edge functions having support on
. When
, their fractional derivative can be explicitly evaluated by [
27]:
where:
We assume when .
In
Figure 1, the cubic basis
and its fractional derivatives at the refinement level
are shown for some values of the fractional derivative
.
4. Numerical Results
In this section, we show the numerical solutions we obtain by the collocation method introduced in the previous section.
For the sake of simplicity, in the tests, we chose as collocation points the dyadic points of the interval
I, i.e.,
where
and
is the collocation level. Moreover, we used as approximating spaces the refinable spaces generated by the cubic B-spline basis
, and we set
so that the time step is
. We used as approximating functions the two discrete quasi-interpolatory operators
obtained by setting
,
, and
in (
23), i.e., the operators given in (
26) and (
27), respectively. The points
and
are the endpoints of
, i.e.,
To analyze the performance of the collocation method, we evaluate the infinity norm of the approximation error
, i.e.,
and the numerical convergence order defined as:
For the ease of notation, in the following, we will drop the subscript 3.
4.1. Example 1
In the first example, we set
,
and
so that the initial value problem (
7) becomes:
In this case, the exact solution is . The discretization interval is .
Since the proposed method reproduces polynomials up to degree three when using the cubic B-spline basis, to check the polynomial reproducibility, in the first test, we set
. Thus, the approximation is exact, and we expect the approximation error to be zero. Actually, the results listed in
Table 1 show that the infinity norm of the error is in the order of machine precision for both quasi-interpolatory operators
with
and
.
To check the convergence order, in the second test, we set
so that the theoretical convergence order is precisely
. The numerical convergence order for different values of
is displayed in
Figure 2 as a function of the refinement level
j. For comparison, a line having the same slope as the theoretical convergence order is also displayed. The infinity norm of the approximation error and the numerical convergence order are listed in
Table 2 and
Table 3.
Table 2 refers to the quasi-interpolatory operators
with
, while
Table 3 refers to the case
.
4.2. Example 2
To check the accuracy of the method in the case of large intervals, in the second example, we set the discretization interval to
. For this test, we chose
,
, and
, so that the initial value problem (
7) becomes:
One can easily see that in this case, Equation (
8) reduces to:
To evaluate the Mittag–Leffler function appearing in the exact solution, we used the algorithm given in [
37]. The numerical solution and the absolute value of the error for different values of
j and
are displayed in
Figure 3. The numerical convergence order is shown in
Figure 4. For comparison, a line having the same slope as the theoretical convergence order is also displayed. The infinity norm of the error and the numerical convergence order as a function of the refinement level
j are listed in
Table 4 and
Table 5.
Table 4 refers to the quasi-interpolatory operators
with
, while
Table 5 refers to the case
.
5. Discussion
The numerical results in
Section 4 show that the collocation method we proposed is accurate and efficient. As shown in the first example of
Section 4.1, the method is exact for polynomials up to degree
, the degree of the spline approximating function, so that the error is in the order of the machine precision (cf.
Table 1). In the second example of
Section 4.1, the error decreases according to the theoretical convergence rate for both quasi-interpolatory operators. In fact, the numerical convergence rate is
, where
is the smoothness of the solution
(cf.
Table 2 and
Table 3). Nevertheless, the quasi-interpolatory operator with
gives a smaller error showing that higher accuracy can be achieved by operators with a higher degree of polynomial reproduction. It is worth noting that the error is rather small even at the low refinement level
, i.e., using only 11 basis functions and 16 collocation points. A similar behavior is shown in the examples of
Section 4.2 (cf.
Table 4 and
Table 5). Here, we used a large discretization interval, i.e.,
. We point out that other numerical methods, such as spectral methods or finite difference methods, require high computational cost to approximate accurately the solution of fractional differential equations in large intervals. Instead, our method gives a good accuracy with a low computational cost. In this example, the numerical convergence rate is slightly different from the theoretical one, which is
with
. In particular, the approximation with the quasi-interpolatory operator with
shows a lower convergence rate while the quasi-interpolatory operator with
shows a higher convergence rate. This behavior is worth investigating in more detail. Finally, we notice that the error is higher near the left boundary (cf.
Figure 3). This can be due to the use of truncated B-splines as left-edge functions for which initial conditions are more difficult to fulfil. This problem can be overcome using optimal B-spline bases [
38].
The proposed method can be easily applied to more general fractional differential equations. As an example, we consider the Bagley–Torvik equation:
which is a second order multi-term fractional differential equation used to describe the viscoelastic properties of real materials [
39]. Its exact solution is
. We numerically solved Equation (
37) using the quasi-interpolatory operator
with
and
. The infinity norm of the error and the numerical convergence order as a function of the refinement level
j are listed in
Table 6. We notice that in the case of differential problems having a second order derivative, the theoretical convergence order is smaller than
, as the numerical results show. The error is comparable with the error obtained by other spline methods in the literature (cf. [
20,
22]) and shows that the method is effective also for this kind of problem. More general problems, such as boundary value problems and nonlinear problems, will be the subject of a forthcoming paper.