Next Article in Journal
A High-Order Fractional Parallel Scheme for Efficient Eigenvalue Computation
Previous Article in Journal
Experimental Study of Confining Pressure-Induced Fracture Network for Shale Gas Reservoir Under Triaxial Compression Conditions
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Review

FDE-Testset: Comparing Matlab© Codes for Solving Fractional Differential Equations of Caputo Type

1
Department of Mathematics and Informatics “U. Dini”, University of Firenze, 50134 Firenze, Italy
2
Department of Mathematics, University of Bari Aldo Moro, 70125 Bari, Italy
3
Institute of Mathematics and Statistics, University of Tartu, 50090 Tartu, Estonia
*
Author to whom correspondence should be addressed.
Fractal Fract. 2025, 9(5), 312; https://doi.org/10.3390/fractalfract9050312
Submission received: 17 April 2025 / Revised: 29 April 2025 / Accepted: 8 May 2025 / Published: 13 May 2025

Abstract

Fractional differential equations (FDEs) have attracted more and more attention in the last years; among them, equations of Caputo type allow for “more natural” initial conditions when the order is greater than one. As a result, many numerical methods have been devised and investigated for approximating their solution: the Matlab© codes of some of them are also available. The aim of this paper is a systematic comparison of such codes on a selected set of test problems. The obtained results are available on the web.

1. Introduction

Fractional Differential Equations (FDEs) have gained an increasing interest because of their use for the mathematical modeling of a number of applicative problems (see, e.g., [1,2] and references therein). Consequently, their numerical solution has been the subject of many investigations in the last years. As a result, many numerical methods have been devised and analyzed for numerically solving them: high-order approximations for the derivative based on linear multistep methods [3], the use of discrete convolution techniques [4,5], finite-difference methods on graded meshes [6], scalable techniques and finite element/difference methods [7,8,9], Krylov methods [10], and collocation-type methods [11,12], just to mention a few (see also the review paper [13] and references therein). In particular, we shall here be concerned with problems in the form
y ( α ) = f ( y ) , t [ 0 , T ] , y ( i ) ( 0 ) = y 0 i R m , i = 0 , , α 1 ,
where α > 0 is the order of the fractional derivative and, as is usual, α denotes the smallest integer greater than or equal to α . For the sake of brevity, and without loss of generality, in (1) we have omitted t as an explicit argument of the vector field f.
In (1),   y ( α ) ( t ) : = D α y ( t )   denotes the Caputo fractional derivative, which is defined, under suitable regularity assumptions on y, as
D α y ( t ) = 1 Γ ( α α ) 0 t ( t τ ) α α 1 y ( α ) ( τ ) d τ ,
with Γ ( · ) the Euler Gamma function. Under regularity assumptions on f ( y ) , it is known [13,14] that the solution of (1) is formally given by
y ( t ) = i = 0 α 1 t i i ! y 0 i + I α f ( y ( t ) ) T α ( t ) + 1 Γ ( α ) 0 t ( t τ ) α 1 f ( y ( τ ) ) d τ ,
with I α f ( y ( t ) ) the corresponding Riemann–Liouville integral.
We shall consider here only numerical methods which have been implemented as Matlab© codes, either made available on the web, or published elsewhere: as matter of fact, the primary goal of this paper is to make a systematic comparison of such codes on a selected set of test problems. All the obtained results are also reported at the URL [15], which we plan to eventually update in the future, much in the spirit of the Test Set for IVP Solvers [16], in the ODE/DAE/IDE case.
With this premise, the structure of the paper is as follows: in Section 2 we report the main facts about the numerical methods implemented in the codes that we are going to compare; in Section 3 we list the test problems used for the comparisons; after that, in Section 4 we collect the obtained experimental results; at last, a few conclusions are given in Section 5.

2. The Matlab© Codes

The following codes will be considered for the numerical tests: each subsection contains a reference to the code and a brief description of it.

2.1. The Code fde12

This code relies on a predictor–corrector method for solving FDEs. It is described in [17] and is available at the URL [18]. When used with the default parameters, it implements a predictor–corrector method for approximating (3) at the grid points t j = j h , j = 0 , 1 , , N , with h = T / N the used timestep. By setting, as usual, y j y ( t j ) and f j = f ( y j ) , one then obtains, for   n = 1 , , N :
y n 0 = T α ( t n ) + h α Γ ( α + 1 ) j = 0 n 1 b n j 1 f j , Ψ n = T α ( t n ) + h α Γ ( α + 2 ) a n 0 f 0 + j = 1 n 1 a n j f j , y n i = Ψ n + h α Γ ( α + 2 ) f ( y n i 1 ) i = 1 , , μ ,
with Ψ n a known memory term, μ the number of corrector iterations, and the coefficients
b n = ( n + 1 ) α n α , a n 0 = ( n 1 ) α + 1 n α ( n α 1 ) , a n = ( n + 1 ) α + 1 2 n α + 1 + ( n 1 ) α + 1 , n = 1 , 2 , .
This method can be regarded as a generalization of a particular Adams predictor–corrector pair to the case of FDEs, using μ correction iterations. It is worth noticing that the convolutions in (4) are computed via a fast FFT algorithm [19]. The calling sequence of the function is
[t,y] = fde12(alpha,fdefun,t0,tfinal,y0,h,param,mu,mutol)
In output, t and y contain the computed solution (y is stored by columns), whereas, in input:
alpha is the order α of the derivative;
fdefun is the identifier of the function evaluating the vector field (fdefun(t,y)), which returns a column vector;
[t0,tfinal] is the integration interval;
y0 is a m × α matrix with the initial conditions;
h is the used stepsize, assumed constant;
param (optional) contains possible parameters for fdefun;
mu is the parameter μ in (4). The default value is μ = 1 , corresponding to the classical PECE implementation;
mutol is the tolerance for testing the convergence of the corrector iteration in (4) (the default value is 10 6 ).

2.2. The Code flmm2

This code relies on a fractional version of linear multistep methods. It is described in [20] and is available at the URL [21]. In more detail, it implements three second-order fractional linear multistep formulas, which we sketch below by using the same notation introduced in Section 2.1 for fde12.
The first method is the fractional version of the trapezoidal rule, which, in its simplest form, is given by
y n = Ψ n + h α Γ ( α + 2 ) f ( y n ) , n = 1 , 2 , , N ,
with Ψ n defined according to (4) and (5). In other words, it is the fully implicit version of the corrector used by fde12. More generally, the methods implemented in the code are in the form
y n = T α ( t n ) + h α j = 0 s w n , j f j + h α j = 0 n ω n j f j , n = 1 , , N ,
where (see [20])  s = 1 + α 1   is the cardinality of the set   A 1 = ν = i + j α < 1 , i , j N ,   and the coefficients { w n , j } of the correction term,
h α j = 0 s w n , j f j ,
are defined in order for the approximation of the Riemann–Liouville integral to be exact for the functions   t ν , ν A 1 { 1 } .   Consequently, at each timestep, the weights { w n , j } are obtained by solving the linear system of equations
j = 0 s w n , j j ν = j = 0 n ω n j j ν + Γ ( ν + 1 ) Γ ( 1 + ν + α ) n ν + α .
Therefore, they are independent of h, as well as the coefficients ω j , j = 0 , , n , which are the first n + 1 coefficients of the formal power series
ω α ( ξ ) j 0 ω j ξ j ,
with ω α ( ξ ) depending on the chosen method. In particular [20,22], the following is true:
ω α ( ξ ) = ( 1 + ξ ) α ( 2 ( 1 ξ ) ) α   gives the coefficients of the fractional trapezoidal rule;
ω α ( ξ ) = ( 1 ξ ) α 1 α 2 ( 1 ξ )   defines a so-called fractional Newton–Gregory formula;
ω α ( ξ ) = 2 α ( 3 4 ξ + ξ 2 ) α   gives the fractional BDF2 method.
It is worth noticing that, according to the general procedure in [22], in the case of the fractional trapezoidal and BDF2 methods,
ω α ( ξ ) = σ ( ξ 1 ) ρ ( ξ 1 ) α ,
with ρ ( z ) and σ ( z ) the first and second characteristic polynomials of the corresponding linear multistep method used in the ODE case. Moreover, as for the code fde12, also in this case the convolution in (7) is evaluated via a fast FFT algorithm [19].
As is clear, all the above methods are implicit, since at the nth timestep y n is obtained by solving a nonlinear system in the form
y n = g n + h α ω 0 f ( y n ) ,
with g n a known vector. The system (8) is solved by means of a straight Newton method, with a safeguard on the maximum number of iterations.
The calling sequence of the function flmm2 is
[t,y] = flmm2(alpha,fdefun,Jdefun,t0,tfinal,y0,h,param,method,tol,itmax)
In output, t and y contain the computed solution (y is stored by columns), whereas, in input:
alpha is the order α of the derivative;
fdefun is the identifier of the function evaluating the vector field (fdefun(t,y)), returning a column vector;
Jfdefun is the identifier of the function evaluating the Jacobian (Jfdefun(t,y));
[t0,tfinal] is the integration interval;
y0 is a m × α matrix with the initial conditions;
h is the used stepsize, assumed constant;
param contains possible parameters needed by fdefun and Jfdefun;
method denotes the used fractional linear multistep method: 1 for the trapezoidal rule; 2 for the Newton–Gregory formula; 3 for the BDF2 method;
tol is the tolerance for the convergence of the Newton iteration for solving (8) (the default value is 10 6 );
itmax is the maximum number of Newton iterations for solving (8) (the default value is 100).

2.3. The Code fcoll

This code is described and published in [23]. It relies on a collocation method for solving (1), though only in the scalar case ( m = 1 ). In more detail, given the mesh
t 0 = 0 , t j = t j 1 + h j , j = 1 , , N ,
and q collocation points
t j i t j 1 + η i h j [ t j 1 , t j ] , i = 1 , , q ,
the used method looks for approximations
z j i D ( α ) y ( t j i ) , i = 1 , , q ,
such that, by setting l i j the ith Lagrange polynomial on the abscissae (10),
i = 1 q z j i l i j ( t ) , l i j ( t ) = ν = 1 , ν i q t t j ν t j i t j ν , t [ t j 1 , t j ] , j = 1 , , N ,
as the interpolating polynomial of degree q 1 , one has
z j k = f ϕ j ( t j k ) + i = 1 q z j i I α l i j ( t j k ) , k = 1 , , q ,
with, according to (3), the memory term given by
ϕ j ( t ) : = T α ( t ) + μ = 1 j 1 i = 1 q z μ i I α l i μ ( t ) , t [ t j 1 , t j ] .
The discrete problem (12) is solved via the Matlab© function fsolve by using very tiny tolerances. The code implements an efficient computation of the involved Riemann–Liouville integrals of the Lagrange polynomials in (11), which, in turn, allows to effectively solve the local discrete problem (12) and (13), thus providing the approximation at t j as
y j : = ϕ j ( t j ) + i = 1 q z j i I α l i j ( t j ) .
Further, in order to ensure a fast error decay, a graded mesh in the form
t j = j N r , j = 0 , 1 , , N ,
with r 1 , may be adopted in case the vector field is not smooth at the origin. Clearly, when r = 1 , a uniform mesh is obtained. The calling sequence is
[t,y] = fcoll(f,b,gam,alpha,eta,r,N)
In output, t and y contain the computed solution, whereas, in input:
f is the identifier of the function implementing the vector field (f(t,y));
b is the final integration time (the starting time is 0);
gam is a column vector containing the initial conditions;
alpha is the order of the fractional derivative;
eta is a column vector of the normalized collocation abscissae (see (9) and (10)),
η i = t j i t j 1 h j , i = 1 , q ;
r is the parameter for the graded mesh (14);
N is the number of mesh points.

2.4. The Code tsfcoll

This code is described and published in [24]. It implements a two-step collocation method aimed at increasing the order of accuracy w.r.t. the code fcoll. Just as this latter code, it only solves scalar problems (i.e., m = 1 in (1)). In more detail, by using the same notation introduced in Section 2.3, the code fcoll (actually, a slight modification of it) is used to advance the solution from t 0 = 0 to t 1 = h 1 (i.e., this code is the so-called starting procedure of the two-step method). After that, for j = 2 , , N , to advance the solution from t j 1 to t j , one solves a collocation problem in the form
z j k = f ϕ ^ j ( t j k ) + i = 1 q z j i I α l ^ q + i j ( t j k ) + z j 1 , i I α l ^ i j ( t j k ) , k = 1 , , q ,
with   l ^ i j ( t ) Π 2 q 1 ,   i = 1 , , 2 q ,  the ith Lagrange polynomial defined on the 2 q abscissae t j 1 , 1 , , t j 1 , q , t j 1 , , t j q , and the memory term given by
ϕ ^ j ( t ) : = T α ( t ) + μ = 2 j 1 i = 1 q z μ i I α l ^ q + i μ ( t ) + z μ 1 , i I α l ^ i μ ( t ) , t [ t j 1 , t j ] .
Also in this case, the discrete problem (16) is solved by using the Matlab© function fsolve, and, moreover, a graded mesh in the form (14) can be considered to cope with possible nonsmooth vector fields at the starting point. The calling sequence of the code tsfcoll is
[t,y] = tsfcoll(f,b,gam,alpha,eta,r,N)
with the input and output parameters defined as in the code fscoll.

2.5. The Code fhbvm

This code is described in [25,26,27] and is available at the URL [28]. The basic idea is that of deriving a local polynomial approximation of the vector field by expanding it along the orthonormal Jacobi polynomial basis
P j Π j , 0 1 ω ( x ) P i ( x ) P j ( x ) d x = δ i j , i , j = 0 , 1 , , ω ( x ) = α ( 1 x ) α 1 ,
with α > 0 , the order of the fractional derivative in (1). As is as sketched in Remark 1 below, this is equivalent to defining a variational method of approximation. In more detail, given a mesh in the form (9), let us denote by
y j ( c h j ) : = y ( t j 1 + c h j ) , c [ 0 , 1 ] , j = 1 , , N ,
the restriction of the solution of (1) to the sub-interval [ t j 1 , t j ] . Consequently, problem (1) can be rewritten as the following sequence of local problems:
y j ( α ) ( c h j ) = f ( y j ( c h j ) ) , c [ 0 , 1 ] , j = 1 , , N , y 1 ( i ) ( 0 ) = y 0 i , i = 0 , , α 1 .
By expanding the local vector fields along the Jacobi basis (17),
f ( y j ( c h ) ) = l 0 P l ( c ) γ l ( y j ) , c [ 0 , 1 ] , j = 1 , , N ,
with γ l ( y j ) the th Fourier coefficient defined by
γ l ( y j ) = 0 1 ω ( τ ) P l ( τ ) f ( y j ( τ h j ) ) d τ , l = 0 , 1 , ,
one then obtains the following equivalent formulation of (18):
y j ( α ) ( c h j ) = l 0 P l ( c ) γ l ( y j ) , c [ 0 , 1 ] , j = 1 , , N , y 1 ( i ) ( 0 ) = y 0 i , i = 0 , , α 1 .
Consequently, for c [ 0 , 1 ] , so that t = t n 1 + c h n [ t n 1 , t n ] , one obtains
y ( t ) y n ( c h n ) = Ψ n ( c h n ) + h n α l 0 I α P l ( c ) γ l ( y n ) , c [ 0 , 1 ] ,
with   I α P l ( c )   the Riemann–Liouville integral, and Ψ n ( c h n ) a memory term, formally given by
Ψ n ( c h n ) = T α ( t n 1 + c h n ) + j = 1 n 1 h j α l 0 J l α t n 1 t j 1 + c h n h j γ l ( y j ) , c [ 0 , 1 ] ,
having set
J l α ( x ) : = 1 Γ ( α ) 0 1 ( x τ ) α 1 P l ( τ ) d τ , x 1 .
A piecewise approximation
σ j ( c h j ) y j ( c h j ) , c [ 0 , 1 ] , j = 1 , , N ,
can be obtained by truncating the vector fields in (21) to polynomials of degree s 1 :
σ j ( α ) ( c h j ) = l = 0 s 1 P l ( c ) γ l ( σ j ) , c [ 0 , 1 ] , j = 1 , , N , σ 1 ( i ) ( 0 ) = y 0 i , i = 0 , , α 1 ,
with the Fourier coefficients γ l ( σ j ) defined according to (20) by formally replacing y j with σ j . Consequently, for t = t n 1 + c h n [ t n 1 , t n ] , one obtains
σ n ( c h n ) = Ψ n s ( c h n ) + h n α l = 0 s 1 I α P l ( c ) γ l ( σ n ) , c [ 0 , 1 ] ,
with the memory term Ψ n s ( c h n ) now given by
Ψ n s ( c h n ) = T α ( t n 1 + c h n ) + j = 1 n 1 h j α l = 0 s 1 J l α t n 1 t j 1 + c h n h j γ l ( σ j ) , c [ 0 , 1 ] ,
in place of (22) and (23), respectively. Next, in order to obtain a practical numerical method, the Fourier coefficients γ l ( σ j ) are approximated by means of an interpolatory Gauss–Jacobi quadrature of order 2 k , with abscissae given by the zeros of P k ( c ) in (17), for a convenient k s P k ( c i ) = 0 i = 1 , , k ,  and corresponding weights  b 1 , , b k :
γ l ( σ j ) i = 1 k b i P l ( c i ) f ( σ j ( c i h j ) ) = : γ ^ l j , l = 0 , , s 1 , j = 1 , , N ,
where, for the sake of brevity, we continue denoting by σ j the approximation of the solution in [ t j 1 , t j ] , after the discretization of the Fourier coefficients. In so doing, one obtains a FHBVM ( k , s ) method. A noticeable feature of such methods (common to HBVMs, obtained for α = 1 [29,30]) is that the discrete problem can be cast in terms of the s Fourier coefficients of the current sub-interval, independently of k. In fact, from (26) and (28), one derives
γ ^ l n = i = 1 k b i P l ( c i ) f Ψ n s ( c i h n ) + h n α r = 0 s 1 I α P r ( c i ) γ ^ r n , l = 0 , , s 1 ,
which can be efficiently solved by means of a Newton-type iteration [26].
The code fhbvm implements a FHBVM(22,20) method. Moreover, in order to have manageable integrals involved in its implementation, it uses either a uniform mesh,
t j = j h , j = 0 , , N , h = T N ,
or a graded one, where, for a convenient r > 1 ,
t 0 = 0 , t j = t j 1 + h j , h j = r j 1 h 1 , j = 1 , , N , h 1 r N 1 r 1 = T .
In fact, in such a case (see (27))
t n 1 t j 1 + c h n h j = n j + c , for ( 30 ) , r n j 1 r 1 + c r n j , for ( 31 ) .
The code automatically selects between (30) or (31), depending on the smoothness of the vector field at the initial point, also choosing the parameters N, r, and h 1 . Moreover, also the smoothness of the vector field is automatically detected by means of a trial-and-error process.
Remark 1.
It is worth noticing that the local vector fields in (25) are equivalent to requiring the corresponding residuals, r j ( c h j ) : = σ j ( α ) ( c h j ) f ( σ j ( c h j ) ) c [ 0 , 1 ] , be orthogonal, w.r.t. the weighted product in (17). I.e., for all  j = 1 , , N :
0 1 ω ( c ) P l ( c ) r j ( c h j ) d c = 0 , l = 0 , , s 1 .
In this respect, FHBVMs can be regarded as variational methods w.r.t. the Jacobi orthonormal polynomial basis. In consideration of the high value of s ( s = 20 ) implemented in the code fhbvm, one expects a spectral accuracy in time for the numerical solution [25], similarly to what happens in the ODE case for HBVMs [31].
The calling sequence of the code fhbvm is
[t,y,stats,err] = fhbvm(fun, y0, T, M)
In input:
fun is the identifier of a function computing the following:
The vector field (fun(t,y)), also in vector mode, returning row vectors;
The Jacobian (fun(t,y,1));
The order of the fractional derivative, if called without arguments;
y0 is a α × m matrix containing the initial conditions in (1);
T is the width of the integration interval (the initial time being set at 0);
M is an optional parameter such that h = T / M is the constant timestep if (30) is selected, or h N T / M is the final timestep if (31) is used. In this latter case, the parameters N , r , h 1 are automatically computed.
It is worth noticing that this code requires very few parameters be given by the user in input. In output:
t,y contain the computed solution (y is stored by rows);
stats is an optional vector containing the following four times:
The pre-processing time;
The execution time;
The pre-processing time for the error estimation;
The execution time for the error estimation.
Consequently, the total execution time is given by their sum;
err is an optional vector containing the estimated error on a doubled mesh (this is an expensive procedure, which is done only if this parameter is specified in output).

2.6. The Code fhbvm2

This code is described in [25,26,27,32], and is available at the URL [28]. Alike the code fhbvm, it relies on methods in the FHBVM class. Nevertheless, it can be regarded as an improvement of the code fhbvm, in that it combines a possible initial graded mesh,
t ^ 0 = 0 , t ^ i = t ^ i 1 + h i , h i = r i 1 h 1 , i = 1 , , ν , h 1 r ν 1 r 1 = n h n T N ,
for a suitable n { 1 , , N } , with a subsequent uniform one,
t j = j h j T N , j = n , , N .
Clearly, when ν > 1 and n = N , the mesh reduces to a purely graded one, whereas when ν = n = 1 , it becomes a purely uniform one. For the graded mesh (32), the parameter r is fixed as follows [32]:
r = 2 , if n = 1 , n n 1 , if n 2 .
Consequently, by increasing n, the parameter r of the graded mesh becomes smaller and smaller, though always greater than 1. The motivation for using a double mesh is to cope with the possible nonsmoothness of the vector field at the initial point, with a subsequent oscillatory solution. In this respect, we notice that from (32) one obtains that, for a given value of n, in order to reduce the initial timestep h 1 , one needs to increase the value of ν .
The code fhbvm2 implements a FHBVM(22,22) method, i.e., a FHBVM ( k , s ) method, as described in Section 2.5, with k = s = 22 . Consequently, also in this case, according to what was observed in Remark 1, a spectrally accurate solution can be expected. Moreover, it can be proved that, when k = s , in each sub-interval the method becomes a collocation method at the abscissae given by the zeros of P s ( c ) [32]. The calling sequence of the code is
[t,y,etim] = fhbvm2(fun, y0, T, N, n, nu)
In input:
fun is the identifier of a function computing the following:
The vector field (fun(t,y)) also in vector mode, returning row vectors;
The Jacobian (fun(t,y,1));
The order of the fractional derivative, if called without arguments;
y0 is a α × m matrix containing the initial conditions in (1);
T is the width of the integration interval (the initial time being set at 0);
N,n,nu are the parameters used for the meshes (32) and (33).
In output:
t,y contain the computed solution (y is stored by rows);
etim is an optional parameter containing the elapsed time.

3. The Test Problems

In this section we collect the problems that will be used to compare the codes sketched in Section 2. The test problems are divided into two main sub-categories: linear problems and nonlinear problems, since for the former problems the structure of the solution is basically the same. Moreover, we shall consider both scalar and vector problems in order to allow comparisons with the codes solving only scalar problems (fcoll and tsfcoll). Each problem has a specific property characterizing its solution and/or the vector field: such properties are described in the subsection devoted to each problem. In particular, we shall consider the following types of problem:
With a linear or nonlinear vector field;
Scalar or vector ones;
Stiff (i.e., with different time scales) or non-stiff ones;
With autonomous or non-autonomous vector field;
With both a smooth solution and vector field;
With a nonsmooth solution but a smooth vector field;
With both a nonsmooth solution and vector field;
With stable or periodic solutions.
Clearly, these features are representative of a wide range of dynamic behaviors. A given problem is implemented in a corresponding Matlab© function named probX, with X the number of the problem ( X { 1 , 2 , . . . , 10 } ). With reference to (1), the usage of such functions is as follows:
alpha = probX,  which returns the order α of the fractional derivative;
f = probX(t,y),  which returns the vector field, with  f R m , if t is a scalar, or f R k × m ,  if  length ( t ) = k > 1 ;
Jf = probX(t,y,1),  which returns its Jacobian (only in one point);
y = probX(t),  which returns the solution evaluated at all points of t (if explicitly known), or numerically evaluated at t = T .  In this latter case, only probX(T) returns a non-void vector. Moreover, if length ( t ) = n ,  then  y R n × m .

3.1. Linear Problems

In this category, for α ( 0 , 1 ) , fall problems in the form
y ( α ) = A y + b , t [ 0 , T ] , y ( 0 ) = y 0 R m ,
with A a nonsingular matrix, whose solution is known to be given by
y ( t ) = E α ( A t α ) ( y 0 y ¯ ) + y ¯ , t 0 ,
being   y ¯ = A 1 b ,  and
E α ( z ) = j 0 z j Γ ( α j + 1 )
the one-parameter Mittag-Leffler function. For its numerical evaluation, we shall use the Matlab© function ml given in [33,34], considering that, for all the considered matrices, the canonical Jordan decomposition is known.
As is clear from their very definition, the vector field in (35) and its solution (36) share the same regularity at the initial point, both behaving like t α , so that the derivative of order α is singular at 0. In particular, for all linear problems below, we consider α = 1 2 , so that the first derivative is unbounded at 0.

3.1.1. Problem 1

This is a scalar problem with a slowly decaying mode:
y ( 0.5 ) = y + 1 , t [ 0 , 10 3 ] , y ( 0 ) = 10 .
Consequently, according to (36),  y ( t ) 1 , as   t .  Its solution is depicted in Figure 1. The width of the integration interval is chosen in order to observe the convergence of the solution to the limit point.

3.1.2. Problem 2

Also, this problem is scalar, with a faster decaying mode:
y ( 0.5 ) = 20 y + 20 , t [ 0 , 10 ] , y ( 0 ) = 10 .
Also in this case,  y ( t ) 1 , as   t .  The solution is depicted in Figure 2. Again, we have chosen the width of the integration interval in order to observe the convergence of the solution to the limit point.

3.1.3. Problem 3

This problem is a stiff problem, since it has two decaying modes, a slow one and a fast one:
y ( 0.5 ) = 1 5 92 87 58 63 y 1 10 67 83 , t [ 0 , 10 2 ] , y ( 0 ) = 5 10 .
Its solution is depicted in Figure 3. As before, we have chosen the width of the integration interval in order to grasp the convergence to the limit point y ¯ = ( 2 , 2.5 ) .

3.1.4. Problem 4

The last problem is a stiffly oscillatory problem [32], since it has two oscillatory modes, a slow one and a fast one, along with a slowly decaying mode, combined together:
y ( 0.5 ) = 1 8 41 41 38 40 2 79 81 2 0 2 20 60 20 20 8 22 58 24 20 4 1 1 2 4 2 y , t [ 0 , 20 ] , y ( 0 ) = 1 2 3 4 5 .
Its solution is depicted in Figure 4. The width of the integration interval is now chosen in order to appreciate both the two oscillatory modes as well as the initial decay of the last mode.

3.2. Nonlinear Problems

In this section we collect problems, mostly taken from the literature, defined by a nonlinear vector field. For some of them the solution is known, but for some others it is not. In this latter case, a reference solution at the final point is computed numerically, by using a suitably small timestep, by means of the code fhbvm2, which is able to gain spectral accuracy.

3.2.1. Problem 5

The first nonlinear problem we consider [13] is
y ( α ) = y 3 / 2 + 8 ! Γ ( 9 α ) t 8 α 3 Γ ( 5 + α / 2 ) Γ ( 5 α / 2 ) t 4 α / 2 + 3 2 t α / 2 t 4 3 + 9 4 Γ ( α + 1 ) , t [ 0 , 1 ] , y ( 0 ) = 0 ,
having solution
y ( t ) = t 8 3 t 4 + α / 2 + 9 4 t α .
We consider the value α = 0.3 . It is worth noticing that, even though the solution is not smooth at 0, as is shown in the left plot of Figure 5, the vector field is very smooth, as can be deduced from the right plot in the same figure.

3.2.2. Problem 6

The second nonlinear problem [35] is
y ( 1.5 ) = y 2 ( t 1.9 1 ) 2 2 + Γ ( 2.9 ) Γ ( 1.4 ) t 0.4 , t [ 0 , 1 ] , y ( 0 ) = 1 , y ( 0 ) = 0 ,
having solution   y ( t ) = t 1.9 1 . For this problem, the vector field is not smooth at the origin, unlike the solution, as is shown in Figure 6.

3.2.3. Problem 7

The third nonlinear problem is still scalar, with both the solution and the vector field (see Figure 7) nonsmooth at the origin:
y ( 0.2 ) = ( 1 t 2 ) 2 + ( 4 + 2 t 0.1 3 t 0.3 ) t 0.2 2 y 2 + 24 Γ ( 4.8 ) t 3.8 4 Γ ( 2.8 ) t 1.8 3 Γ ( 1.5 ) Γ ( 1.3 ) t 0.3 + 2 Γ ( 1.3 ) Γ ( 1.1 ) t 0.1 + 4 Γ ( 1.2 ) , t [ 0 , 2 ] , y ( 0 ) = 1 .
Its solution is   y ( t ) = ( 1 t 2 ) 2 + ( 4 + 2 t 0.1 3 t 0.3 ) t 0.2 .

3.2.4. Problem 8

The next problem is adapted from [27]:
y 1 ( α ) = Γ ( 4 + α ) 6 t 3 t 8 + 2 α + y 2 2 , y 2 ( α ) = Γ ( 5 + α ) 24 t 4 + t 3 + α y 1 , t [ 0 , 2 ] , y 1 ( 0 ) = y 1 ( 0 ) = y 2 ( 0 ) = y 2 ( 0 ) = 0 ,
with solution   y 1 ( t ) = t 3 + α , y 2 ( t ) = t 4 + α .  We consider the value α = 1.25 . In such a case, both the solution (depicted in Figure 8) and the vector field are smooth at the origin.

3.2.5. Problem 9

We now consider the following fractional Brusselator problem [26]:
y 1 ( 0.7 ) = 1 4 y 1 + y 1 2 y 2 , y 2 ( 0.7 ) = 3 y 1 y 1 2 y 2 , t [ 0 , 200 ] , y ( 0 ) = ( 1.2 , 2.8 ) .
For this problem, the solution approaches a limit cycle so that it is of periodic type, as is shown in the two plots in Figure 9.

3.2.6. Problem 10

Finally, we consider the following fractional version of the Van der Pol problem [36]:
y 1 ( 0.9 ) = y 2 , y 2 ( 0.9 ) = y 1 10 y 2 ( y 1 2 1 ) , t [ 0 , 30 ] , y ( 0 ) = ( 0 , 2 ) .
As in the ODE case, the solution approaches a limit cycle, as is shown in the left plot of Figure 10, so that the solution becomes eventually periodic (see also the right plot in the same figure).

4. Results

In this section we report the obtained results in terms of Work Precision Diagrams (WPD), where, for each code, we plot the execution time versus accuracy. The latter, following [16], is measured in terms of mixed-error significant digits (mescd), defined as
mescd = max 0 , log 10 max n ( y ( t n ) y n ) . / ( 1 + | y ( t n ) | ) ,
where y n y ( t n ) , the latter being the reference solution, | y ( t n ) | is the vector with the absolute values of y ( t n ) , and . / is the component-wise division between vectors. The max with 0 is used to avoid odd results when the method does not work.
All numerical tests have been done on a 12-core M4-pro silicon-based computer with 64 GB of shared memory, using Matlab© 2024b.
For each problem and method, we shall list the parameters used for obtaining the corresponding WPD. Some of the parameters are, instead, fixed as follows:
fde12: we shall consider two values of the parameter mu, i.e., 1 and 10; we shall denote them as fde12 and fde12-10, respectively;
flmm2: we set the parameters tol to 10 15 and itmax to 10 3 , respectively. Moreover, we shall denote by flmm2-1, flmm2-2, and flmm2-3 the usage of the code with the trapezoidal rule, the Newton–Gregory formula, and the BDF2 method, respectively;
fcoll: we consider the collocation points, specified in the vector eta, fixed at the s Gauss-Legendre abscissae, s = 3 , 4 , 5 . Moreover, we shall fix the following values of r for the graded mesh: 1 (if appropriate), 5, and 10. In general, we shall denote fcoll-s-r the corresponding implementation;
tsfcoll: we choose the abscissae of the vector eta as { 1 / n , 2 / n , , 1 } , n = 3 , 4 , 5 . Moreover, the parameter r is fixed as done for fcoll, and the respective implementations will be denoted as tsfcoll-n-r.
As a general rule used for the choice of the (not already fixed) parameters of the various codes, we decided to choose them in order not to exceed an execution time of the order of 10 3 s of the corresponding run.

4.1. Results for Linear Problems

We first collect the results obtained by comparing the methods on the linear problems presented in Section 3.1. As recalled above, all such problems do have a nonsmooth vector field at the origin.

4.1.1. Problem 1

For building the WPD for this problem, we used the following parameters for the codes:
fde12, fde12-10: h = 10 i , i = 2 , , 5 ;
flmm2-1, flmm2-2, flmm2-3: h = 10 i , i = 1 , , 4 ;
fcoll-3-5, fcoll-3-10, tsfcoll-3-5, tsfcoll-3-10: N = 500 i i = 1 , , 5 ;
fcoll-4-5, fcoll-4-10, tsfcoll-4-5, tsfcoll-4-10: N = 250 i i = 1 , , 5 ;
fcoll-5-5, fcoll-5-10, tsfcoll-5-5, tsfcoll-5-10: N = 100 i i = 1 , , 5 ;
fhbvm: M = 5 , , 10 ;
fhbvm2: N = n = 1 ,   nu = 25 i i = 2 , , 6 .
We observe that tsfcoll-5-5 and tsfcoll-5-10 exhibit convergence problems, so we do not report the corresponding results. In Figure 11 we report the WPD obtained for this problem. From the reported plots, one infers the following:
fde12 is the less efficient code (about 500 s are needed to obtain less than 6 digits of accuracy), and additional corrections are not effective, since they only increase the execution time without improving accuracy;
flmm2 is more efficient than fde12 but less effective than the other codes. Moreover, flmm2-3 achieves slightly more than 7 digits of accuracy, whereas flmm2-1 and flmm2-2 can achieve slightly less than 10 significant digits in about 70 s;
fcoll is more efficient than flmm2, and the higher the number of collocation points, the more accurate the solution, which can reach more than 12 digits in 0.5 s. Moreover, the choice of the parameter r seems not to affect the performance that much, even though r = 5 is slightly better;
tsfcoll performs quite differently, depending on the choice of the parameter r. In particular, the choice r = 10 is much more effective than r = 5 . In fact, for the same value of N, the execution time is approximately the same, but the accuracy is pretty different: with r = 10 , tsfcoll can reach about 14 digits of accuracy in 6 s by using 3 collocation points, which are approximately double those obtained by using r = 5 . Further, the code appears to be more effective when using 3 collocation points only;
fhbvm and fhbvm2 are the most effective codes, showing a uniform accuracy of about 14 digits and a negligible execution time (of less than 5 × 10 2 s).

4.1.2. Problem 2

For this problem, we use the same methods and parameters used for Problem 1 to derive the corresponding WPD, with the only modification that, since the time interval is shorter by a factor of 100, the parameters h for fde12 and flmm2 are divided by 100 w.r.t. those used for Problem 1.
Also in this case, tsfcoll, when using 5 collocation points, does not converge, so we do not report the corresponding results, as well as those obtained with 4 collocation nodes, for which the same problem occurs in most of the runs: this further confirms that the code is more effective when using 3 collocation points only.
The obtained results are depicted in Figure 12 and overlap with those in Figure 11:
Also in this case, the two codes fhbvm and fhbvm2 turn out to be the most effective ones, among those considered, with a uniformly high accurate solution (about 14 mescd) and a negligible execution time (less than 5 × 10 2 s);
As for the previous problem, the highest-order collocation fcoll implementations are the most effective and appear not to be very sensitive to the choice of the parameter r used for the graded mesh (almost 12 digits of accuracy are obtained in about 0.5 s);
Differently, also for this problem, the larger the parameter r is, the better the accuracy of the computed solution by tsfcoll with 3 collocation points (which is the only one always converging). In particular, tsfcoll-3-10 can reach an accuracy comparable with that of fhbvm and fhbvm2, though with a much higher execution time (6 s vs. 4 × 10 2 and 10 2 s, respectively).

4.1.3. Problem 3

For this problem we cannot consider the codes fcoll and tsfcoll, which are only able to solve scalar problems. We use, therefore, the following codes, with the parameters fixed as reported below:
fde12, fde12-10: h = 10 i , i = 4 , 5 , 6 ;
flmm2-1, flmm2-2, flmm2-3: h = 10 i , i = 2 , 3 , 4 , 5 ;
fhbvm: M = 5 , , 10 ;
fhbvm2: nu = 50 n = 1 N = 10 i i = 5 , , 10 .
The obtained results are summarized in Figure 13, from which one deduces the following:
fde12 is able to reach about 3.5 significant digits in slightly more than 700 s (fde12-10 does not improve accuracy but only increases the execution time);
flmm2 is able to reach 5 significant digits in about 10 3 s when using either the trapezoidal rule or the Newton–Gregory formula, whereas the version using BDF2 is less accurate, though requiring comparable execution times;
fhbvm and fhbvm2 are the most efficient codes, reaching about 13 and 14 digits of accuracy, respectively, in less than 2 × 10 1 s.

4.1.4. Problem 4

Also for this problem we cannot consider the codes fcoll and tsfcoll, which are only able to solve scalar problems. We use, therefore, the following codes, with the parameters chosen as follows:
fde12, fde12-10: h = 10 i , i = 5 , 6 ;
flmm2-1, flmm2-2, flmm2-3: h = 5 × 10 i , i = 4 , 5 ;
fhbvm: M = 100 i i = 3 , 4 , 5 ;
fhbvm2: nu = 50 n = 1 N = 100 i i = 3 , 4 , 5 .
The obtained results are summarized in Figure 14, from which one deduces the following:
fde12-10 can reach an accuracy of about 3 mescd, higher than that of fde12, but with a high execution time (more than 2500 s);
flmm2-1 is more accurate than flmm2-2, which in turn is more accurate than flmm2-3 (all methods reach about 2 mescd), and all require about 700 s of execution time;
The codes fhbvm and fhbvm2 are able to reach more than 10 significant digits in a much lower time. In particular, the double-mesh implementation used in the code fhbvm2, which is particularly efficient for solving problems with oscillatory solutions, results in an execution time of 1.5 s, whereas fhbvm requires 70 s (though it is slightly more accurate than fhbvm2).

4.2. Results for Nonlinear Problems

We now report the results obtained by comparing the methods on the nonlinear problems presented in Section 3.2. Moreover, for those problems whose solution is not explicitly known, we shall list the parameters used for the code fhbvm2 to compute the reference solution at the final time.

4.2.1. Problem 5

This problem has a smooth vector field everywhere, so we have used all codes with a uniform mesh, with the only exception of tsfcoll, which performs quite badly with a uniform mesh; for this reason, we used this code with r = 10 . Further, we have used the parameters specified below:
fde12, fde12-10, flmm2-1, flmm2-2, flmm2-3: h = 10 i , i = 1 , , 5 ;
fcoll-3-1, fcoll-4-1, fcoll-5-1, tsfcoll-3-10, tsfcoll-4-10, tsfcoll-5-10 N = 25 i i = 2 , , 6 ;
fhbvm: M = 5 i i = 1 , 2 , 3 , 4 ;
fhbvm2: nu = n = 1 N = 5 i i = 1 , 2 , 3 , 4 .
The obtained results are summarized in Figure 15, from which one deduces the following:
fde12-10 can reach 10 significant digits in 2 s, thus performing better than fde12;
flmm2-1 reaches about 11 mescd, and is slightly more accurate than flmm2-2, in turn slightly more accurate than flmm2-3, all methods requiring about 1 s;
The higher the number of the Gauss points, the more accurate is fcoll, which can reach about 14 significant digits in about 2 × 10 1 s;
tfscoll is generally much less effective than fcoll, and when using 5 collocation points, it has a very low accuracy;
fhbvm and fhbvm2 have a uniform accuracy of about 15 significant digits with a very low execution time ( 2 × 10 2 and 6 × 10 3 s, respectively).

4.2.2. Problem 6

This problem has a smooth solution and a nonsmooth vector field. We have used the parameters specified below for the various codes:
fde12, fde12-10, flmm2-1, flmm2-2, flmm2-3: h = 10 i , i = 1 , 2 , 3 , 4 , 5 , 6 ;
fcoll-3-5, fcoll-3-10, tsfcoll-3-5, tsfcoll-3-10, fcoll-4-5, fcoll-4-10, tsfcoll-4-5, tsfcoll-4-10, fscoll-5-5, fscoll-5-10, tsfcoll-5-5, tsfcoll-5-10 N = 50 i i = 1 , 2 , 3 , 4 ;
fhbvm: M = 5 , 6 , 7 , 8 , 9 , 10 ;
fhbvm2: n = 1 nu = 50 , N = 5 i i = 1 , 2 , 3 , 4 .
The obtained results are summarized in Figure 16, from which one deduces the following:
fde and fde12-10 can reach about 9 significant digits in about 5 and 20 s, respectively;
flmm2 has a similar performance to fde12, with the exception of the BDF2 method, which is less accurate, though all require about 7 s with the smallest timestep;
The higher the number of the Gauss points, the more accurate is fcoll, which can reach about 15 significant digits in 7 × 10 2 s. The use of the smaller parameter r = 5 turns out to be slightly more effective than the choice r = 10 ;
tsfscoll with 4 or 5 collocation points and r = 10 is comparable with the best results of fcoll, though requiring a slightly higher execution time;
fhbvm reaches a uniform accuracy of about 11 significant digits with a very low execution time (less than 2 × 10 2 s);
fhbvm2 has a uniform accuracy of about 15 significant digits with a very low execution time (about 1.5 × 10 2 s).

4.2.3. Problem 7

This problem has both a nonsmooth solution and a vector field. We have used the parameters specified below for the various codes:
fde12, fde12-10, flmm2-1, flmm2-2, flmm2-3: h = 10 i , i = 5 , 6 , 7 ;
fcoll-3-5, fcoll-3-10, tsfcoll-3-5, tsfcoll-3-10, fcoll-4-5, fcoll-4-10, tsfcoll-4-5, tsfcoll-4-10, fscoll-5-5, fscoll-5-10, tsfcoll-5-5, tsfcoll-5-10 N = 10 i i = 1 , 2 , 3 , 4 ;
fhbvm: M = 5 , 6 , 7 , 8 , 9 , 10 ;
fhbvm2: n = 2 nu = 100 , N = 5 i i = 2 , 3 , 4 , 5 , 6 .
In this case, the code tsfcoll does not converge when using 5 collocation points, so we do not report the corresponding plots (tsfcoll does not converge also when using 4 collocation points coupled with the coarsest values of N). The obtained results are summarized in Figure 17, from which one deduces the following:
fde12 can reach about 3 significant digits of accuracy, with an execution time of more than 100 s for fde12 and more than 500 s for fde12-10;
flmm2 achieves, whichever is the method used, the same accuracy of less than 6 digits but requires about 1 h of execution time and about 100 s for getting 5 digits of accuracy;
fcoll has a better accuracy when considering a higher number of collocation points and when using the larger value of the parameter r. In particular, when using 5 Gauss points and r = 10 , it achieves an accuracy of more than 13 digits in about 200 s;
tsfcoll does not converge, as said before, for n = 5 , with the best results obtained by using n = 3 and r = 10 . In particular, about 8 significant digits in about 280 s;
fhbvm has a uniform accuracy of about 11 significant digits in about 0.5 s, whereas fhbvm2 has a uniform accuracy of 14 digits in less than 10 1 s.

4.2.4. Problem 8

We recall that problem (44) has both the solution and the vector field smooth at the origin. Moreover, fcoll and tsfcoll cannot be used because the problem is a system of two FDEs, as is the case for the subsequent Problems 9 and 10. The remaining methods are used with the following parameters:
fde12, fde12-10: h = 10 i , i = 1 , , 6 ;
flmm2-1, flmm2-2, flmm2-3: h = 5 × 10 i , i = 1 , , 5 ;
fhbvm: M = 5 , , 10 ;
fhbvm2: nu = n = 1 N = 5 , , 10 .
The obtained results are reported in Figure 18, from which one can conclude the following:
flmm2 is the less efficient code (all 3 methods are roughly equivalent), able to reach about 10 significant digits in 10 s;
fde12 is slightly better and more efficient than fde12-10, being able to achieve more than 11 digits of accuracy in about 6 s;
fhbvm and fhbvm2 have a uniform accuracy of more than 15 digits with an execution time of about 2 × 10 2 s.

4.2.5. Problem 9

For this problem, since the solution is not explicitly known, a reference solution at t = 200 has been computed through the following:
[t,y]=fhbvm2(’prob9’,[1.2 2.8],200,1000,50,1000);
and is returned by prob9(200). We have used the codes with the following parameters:
fde12, fde12-10: h = 10 i i = 2 , 3 , 4 , 5 ;
flmm2-1, flmm2-2, flmm2-3: h = 10 i i = 1 , 2 , 3 , 4 ;
fhbvm: M = 50 i i = 4 , 5 , 6 ;
fhbvm2: nu = 50 n = 1 N = 50 i i = 4 , 5 , 6 .
From the obtained results, depicted in Figure 19, one has the following:
flmm2, whichever is the method used, has a comparable performance and is able to obtain an accuracy of at most 8 significant digits in about 400 s;
fde12-10 performs better than fde12, but it is able to achieve less than 8 digits of accuracy (further decreasing the timestep does not improve accuracy but only increases the execution time) in about 40 s;
fhbvm and fhbvm2 have a uniform accuracy of 13 digits, reached in about 2.5 s and 0.5 s, respectively.

4.2.6. Problem 10

For this problem, since the solution is not explicitly known, a reference solution at t = 30 has been computed through the following:
[t,y]=fhbvm2(’prob10’,[0 -2],30,1000,50,1000);
This reference vector is returned by prob10(30). Moreover,
fde12 and fde12-10 do not converge even when using a timestep as small as h = 10 6 ;
flmm2-1, flmm2-2, and flmm2-3 exhibit problems in the convergence of the nonlinear iteration, even when using a timestep as small as h = 10 5 .
Consequently, we have not considered them. The remaining two codes have been used with the following parameters:
fhbvm: M = 50 i i = 4 , 5 , 6 , 7 ;
fhbvm2: nu = 50 n = 1 N = 50 i i = 4 , 5 , 6 , 7 .
From the obtained results, reported in Figure 20, one infers that both the codes fhbvm and fhbvm2 can reach an accuracy of 12 digits in about 4 s and 0.6 s, respectively.

5. Discussion and Conclusions

In this paper we have briefly recalled the main facts concerning a number of Matlab© numerical codes available for solving fractional differential equations of Caputo type. Moreover, we have presented a set of test problems, later used to compare the codes in a systematic way, in the spirit of the Test Set for IVP solvers [16], proposed to compare codes for solving ODE/DAE/IDE problems. As a result, a corresponding FDE-testset has been derived, which is available at the URL [15]. The aim of this project is to provide a standard way of comparing Matlab© codes for solving FDEs.
From the obtained results, we can draw the following considerations:
The code fde12 is appropriate for problems for which a constant timestep (with possible correction terms at the initial point) works well and having smooth solutions (see Problems 5, 6, 8, and 9). In this case, even the PECE implementation of the method is appropriate. This code is generally not effective when a high accuracy is required for the numerical approximation;
The code flmm2 has similar features to fde12, but it is more robust due to the implicit nature of the methods implemented into the code. These latter have roughly the same effectiveness (BDF2 slightly less) and are appropriate when a low-accuracy solution is enough (see Problems 1, 2, 5, 6, 8, and 9);
The code fcoll can be very effective when using a high number of Legendre collocation points (see Problems 1, 2, 5, and 6). It appears to be not very sensitive to the choice of the grading parameter of the mesh, which confers robustness. It has, however, a couple of severe weak points: the fact of solving scalar problems only and the use of a general-purpose function for solving the generated discrete problems (the Matlab© function fsolve);
The code tsfcoll appears to be less robust than fcoll, since it is more sensitive to the choice of the grading parameter and to the number of collocation points. In particular, their choice is, in our experience, another open problem. Alike fcoll, tsfcoll is currently restricted to the solution of scalar problems and uses a non-specialized method for solving the generated discrete problems;
fhbvm appears to be among the most effective codes tested here, with the additional feature of requiring almost no tuning parameter to reach a highly accurate solution. It is extremely effective when either a constant mesh or a graded one is to be used (see Problems 1–3 and 5–8), and, in the latter case, it automatically computes the optimal parameters for it. The code is less efficient, though always able to obtain a fully accurate solution, when the problem at hand couples a nonsmooth vector field at the origin with an oscillatory subsequent solution (see Problems 4, 9, and 10);
The code fhbvm2 can reach the same high accuracy as the code fhbvm on all problems, only requiring the tuning of a few input parameters. Moreover, it has the ability to couple an initial graded mesh with a subsequent uniform one, thus resulting very efficient also for problems having both a nonsmooth vector field at the origin and a subsequent periodic solution (see Problems 4, 9, and 10). In such a case, its execution time can be quite a bit smaller than that of fhbvm;
Summing up the results concerning the solution of Problems 1–10, we can see that currently fhbvm and fhbvm2 represent the best choice for solving an initial value problem of FDEs, regardless of its particular features, especially when a highly accurate approximation is needed. Furthermore, fhbvm2 is preferable when oscillatory solutions are to be approximated.
As a concluding remark, we mention that we plan, in the future, to maintain and enrich the FDE-testset with possible new codes (or updated versions of the ones considered so far) as well as by introducing new test problems. Moreover, it is worth mentioning that the FDE-testset could, in principle, be extended to other software environments, e.g., Python, Julia, etc.

Funding

Luigi Brugnano, Gianmarco Gurioli, and Felice Iavernaro acknowledge the financial support of the INdAM-GNCS Project CUP E53C24001950001; Mikk Vikerpuur is supported by the project n.ro PUTJD1275 of the Estonian Research Council.

Data Availability Statement

The data presented in this study are available at the website https://people.dimai.unifi.it/brugnano/FDEtestset/ (accessed on 16 April 2025).

Acknowledgments

The research of Mikk Vikerpuur has been done during a visit period at the Dipartimento di Matematica e Informatica “U. Dini,” Università di Firenze, Italy. The authors wish to thank two anonymous reviewers for their comments.

Conflicts of Interest

The authors declare no conflict of interests nor competing interests.

References

  1. Diethelm, K. The Analysis of Fractional Differential Equations—An Application-Oriented Exposition Using Differential Operators of Caputo Type; Lecture Notes in Math; Springer: Berlin/Heidelberg, Germany, 2010. [Google Scholar] [CrossRef]
  2. Podlubny, I. Fractional Differential Equations: An Introduction to Fractional Derivatives, Fractional Differential Equations, to Methods of Their Solution and Some of Their Applications; Academic Press, Inc.: San Diego, CA, USA, 1999. [Google Scholar]
  3. Lubich, C. Fractional linear multistep methods for Abel-Volterra integral equations of the second kind. Math. Comput. 1985, 45, 463–469. [Google Scholar] [CrossRef]
  4. Schädle, A.; Lopez-Fernandez, M.; Lubich, C. Fast and oblivious convolution quadrature. SIAM J. Sci. Comput. 2006, 28, 421–438. [Google Scholar] [CrossRef]
  5. Zeng, F.; Turner, I.; Burrage, K.; Karniadakis, G. A new class of semi-implicit methods with linear complexity for nonlinear fractional differential equations. SIAM J. Sci. Comput. 2018, 40, A2986–A3011. [Google Scholar] [CrossRef]
  6. Stynes, M.; O’Riordan, E.; Gracia, J.L. Error analysis of a finite difference method on graded meshes for a time-fractional diffusion equation. SIAM J. Numer. Anal. 2017, 55, 1057–1079. [Google Scholar] [CrossRef]
  7. Burrage, K.; Hale, N.; Kay, D. An efficient implicit FEM scheme for fractional-in-space reaction-diffusion equations. SIAM J. Sci. Comput. 2012, 34, A2145–A2172. [Google Scholar] [CrossRef]
  8. Li, C.; Yi, Q.; Chen, A. Finite difference methods with non-uniform meshes for nonlinear fractional differential equations. J. Comput. Phys. 2016, 316, 614–631. [Google Scholar] [CrossRef]
  9. Yuste, S.B.; Acedo, L. An explicit finite difference method and a new von Neumann-type stability analysis for fractional diffusion equations. SIAM J. Numer. Anal. 2005, 42, 1862–1874. [Google Scholar] [CrossRef]
  10. Moret, I.; Novati, P. On the convergence of Krylov subspace methods for matrix Mittag-Leffler functions. SIAM J. Numer. Anal. 2011, 49, 2144–2164. [Google Scholar] [CrossRef]
  11. Liang, H.; Stynes, M. Collocation methods for general Caputo two-point boundary value problems. J. Sci. Comput. 2018, 76, 390–425. [Google Scholar] [CrossRef]
  12. Pedas, A.; Tamme, E. Numerical solution of nonlinear fractional differential equations by spline collocation methods. J. Comput. Appl. Math. 2014, 255, 216–230. [Google Scholar] [CrossRef]
  13. Garrappa, R. Numerical Solution of Fractional Differential Equations: A Survey and a Software Tutorial. Mathematics 2018, 6, 16. [Google Scholar] [CrossRef]
  14. Diethelm, K.; Garrappa, R.; Stynes, M. Good (and Not So Good) Practices in Computational Methods for Fractional Calculus. Mathematics 2020, 8, 324. [Google Scholar] [CrossRef]
  15. Available online: https://people.dimai.unifi.it/brugnano/FDEtestset/ (accessed on 16 April 2025).
  16. Available online: https://archimede.uniba.it/~testset/testsetivpsolvers/ (accessed on 6 April 2025).
  17. Garrappa, R. On linear stability of predictor-corrector algorithms for fractional differential equations. Int. J. Comput. Math. 2010, 87, 2281–2290. [Google Scholar] [CrossRef]
  18. Available online: http://www.mathworks.com/matlabcentral/fileexchange/32918 (accessed on 24 March 2025).
  19. Hairer, E.; Lubich, C.; Schlichte, S. Fast numerical solution of nonlinear Volterra convolution equations. SIAM J. Sci. Stat. Comput. 1985, 6, 532–541. [Google Scholar] [CrossRef]
  20. Garrappa, R. Trapezoidal methods for fractional differential equations: Theoretical and computational aspects. Math. Comput. Simul. 2015, 110, 96–112. [Google Scholar] [CrossRef]
  21. Available online: http://www.mathworks.com/matlabcentral/fileexchange/47081-flmm2 (accessed on 24 March 2025).
  22. Lubich, C. Discretized fractional calculus. SIAM J. Math. Anal. 1986, 17, 704–719. [Google Scholar] [CrossRef]
  23. Cardone, A.; Conte, D.; Paternoster, B. A MATLAB implementation of spline collocation methods for fractional differential equations. In Computational Science and Its Applications—ICCSA 2021, Proceedings of the 21st International Conference, Cagliari, Italy, 13–16 September 2021; Gervasi, O., Murgante, B., Misra, S., Garau, C., Blecic, I., Taniar, D., Apduhan, B.O., Rocha, A.M.A.C., Tarantino, E., Torre, C.M., Eds.; Lecture Notes in Computer Science; Springer: Berlin/Heidelberg, Germany, 2021; Volume 12949, pp. 387–401. [Google Scholar] [CrossRef]
  24. Cardone, A.; Conte, D.; Paternoster, B. A MATLAB Code for Fractional Differential Equations Based on Two-Step Spline Collocation Methods. In Fractional Differential Equations—Modeling, Discretization, and Numerical Solvers; Cardone, A., Donatelli, M., Durastante, F., Garrappa, R., Mazza, M., Popolizio, M., Eds.; Springer INdAM Series; Springer: Berlin/Heidelberg, Germany, 2023; Volume 50, pp. 121–146. [Google Scholar] [CrossRef]
  25. Brugnano, L.; Burrage, K.; Burrage, P.; Iavernaro, F. A spectrally accurate step-by-step method for the numerical solution of fractional differential equations. J. Sci. Comput. 2024, 99, 48. [Google Scholar] [CrossRef]
  26. Brugnano, L.; Gurioli, G.; Iavernaro, F. Numerical solution of FDE-IVPs by using Fractional HBVMs: The fhbvm code. Numer. Algoritms 2025, 99, 463–489. [Google Scholar] [CrossRef]
  27. Brugnano, L.; Gurioli, G.; Iavernaro, F. Solving FDE-IVPs by using Fractional HBVMs: Some experiments with the fhbvm code. J. Comput. Methods Sci. Eng. 2025, 25, 1030–1038. [Google Scholar] [CrossRef]
  28. Available online: https://people.dimai.unifi.it/brugnano/fhbvm/ (accessed on 10 April 2025).
  29. Brugnano, L.; Iavernaro, F. Line Integral Methods for Conservative Problems; Chapman et Hall/CRC: Boca Raton, FL, USA, 2016. [Google Scholar]
  30. Brugnano, L.; Iavernaro, F. Line integral solution of differential problems. Axioms 2018, 7, 36. [Google Scholar] [CrossRef]
  31. Amodio, P.; Brugnano, L.; Iavernaro, F. Analysis of Spectral Hamiltonian Boundary Value Methods (SHBVMs) for the numerical solution of ODE problems. Numer. Algorithms 2020, 83, 1489–1508. [Google Scholar] [CrossRef]
  32. Brugnano, L.; Gurioli, G.; Iavernaro, F.; Vikerpuur, M. Analysis and implementation of collocation methods for fractional differential equations. arXiv 2025, arXiv:2503.17719. [Google Scholar] [CrossRef]
  33. Garrappa, R. Numerical evaluation of two and three parameter Mittag-Leffler functions. SIAM J. Numer. Anal. 2015, 53, 1350–1369. [Google Scholar] [CrossRef]
  34. Available online: http://www.mathworks.com/matlabcentral/fileexchange/48154-the-mittag-leffler-function (accessed on 7 April 2025).
  35. Satmari, Z. Iterative Bernstein spline technique applied to fractional order differential equations. Math. Found. Comput. 2023, 6, 41–53. [Google Scholar] [CrossRef]
  36. Petráš, I. Fractional-Order Nonlinear Systems—Modeling, Analysis and Simulation; Nonlinear Physical Science Ser. Springer: Berlin/Heidelberg, Germany, 2011. [Google Scholar]
Figure 1. Solution of Problem (37).
Figure 1. Solution of Problem (37).
Fractalfract 09 00312 g001
Figure 2. Solution of Problem (38).
Figure 2. Solution of Problem (38).
Fractalfract 09 00312 g002
Figure 3. Components of the solution of Problem (39).
Figure 3. Components of the solution of Problem (39).
Fractalfract 09 00312 g003
Figure 4. Components of the solution of Problem (40).
Figure 4. Components of the solution of Problem (40).
Fractalfract 09 00312 g004
Figure 5. Problem (41): solution (left plot) and vector field (right plot).
Figure 5. Problem (41): solution (left plot) and vector field (right plot).
Fractalfract 09 00312 g005
Figure 6. Problem (42): solution (left plot) and vector field (right plot).
Figure 6. Problem (42): solution (left plot) and vector field (right plot).
Fractalfract 09 00312 g006
Figure 7. Problem (43): solution (left plot) and vector field (right plot).
Figure 7. Problem (43): solution (left plot) and vector field (right plot).
Fractalfract 09 00312 g007
Figure 8. Components of the solution of Problem (44).
Figure 8. Components of the solution of Problem (44).
Fractalfract 09 00312 g008
Figure 9. Fractional Brusselator (45): solution in the phase space (left plot) and plotted versus time (right plot). In the left plot, the red circle is the starting point of the trajectory.
Figure 9. Fractional Brusselator (45): solution in the phase space (left plot) and plotted versus time (right plot). In the left plot, the red circle is the starting point of the trajectory.
Fractalfract 09 00312 g009
Figure 10. Fractional Van der Pol problem (46): solution in the phase space (left plot) and plotted versus time (right plot). In the left plot, the red circle is the starting point of the trajectory.
Figure 10. Fractional Van der Pol problem (46): solution in the phase space (left plot) and plotted versus time (right plot). In the left plot, the red circle is the starting point of the trajectory.
Fractalfract 09 00312 g010
Figure 11. WPD for Problem (37).
Figure 11. WPD for Problem (37).
Fractalfract 09 00312 g011
Figure 12. WPD for Problem (38).
Figure 12. WPD for Problem (38).
Fractalfract 09 00312 g012
Figure 13. WPD for Problem (39).
Figure 13. WPD for Problem (39).
Fractalfract 09 00312 g013
Figure 14. WPD for Problem (40).
Figure 14. WPD for Problem (40).
Fractalfract 09 00312 g014
Figure 15. WPD for Problem (41).
Figure 15. WPD for Problem (41).
Fractalfract 09 00312 g015
Figure 16. WPD for Problem (42).
Figure 16. WPD for Problem (42).
Fractalfract 09 00312 g016
Figure 17. WPD for Problem (43).
Figure 17. WPD for Problem (43).
Fractalfract 09 00312 g017
Figure 18. WPD for Problem (44).
Figure 18. WPD for Problem (44).
Fractalfract 09 00312 g018
Figure 19. WPD for Problem (45).
Figure 19. WPD for Problem (45).
Fractalfract 09 00312 g019
Figure 20. WPD for Problem (46).
Figure 20. WPD for Problem (46).
Fractalfract 09 00312 g020
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Brugnano, L.; Gurioli, G.; Iavernaro, F.; Vikerpuur, M. FDE-Testset: Comparing Matlab© Codes for Solving Fractional Differential Equations of Caputo Type. Fractal Fract. 2025, 9, 312. https://doi.org/10.3390/fractalfract9050312

AMA Style

Brugnano L, Gurioli G, Iavernaro F, Vikerpuur M. FDE-Testset: Comparing Matlab© Codes for Solving Fractional Differential Equations of Caputo Type. Fractal and Fractional. 2025; 9(5):312. https://doi.org/10.3390/fractalfract9050312

Chicago/Turabian Style

Brugnano, Luigi, Gianmarco Gurioli, Felice Iavernaro, and Mikk Vikerpuur. 2025. "FDE-Testset: Comparing Matlab© Codes for Solving Fractional Differential Equations of Caputo Type" Fractal and Fractional 9, no. 5: 312. https://doi.org/10.3390/fractalfract9050312

APA Style

Brugnano, L., Gurioli, G., Iavernaro, F., & Vikerpuur, M. (2025). FDE-Testset: Comparing Matlab© Codes for Solving Fractional Differential Equations of Caputo Type. Fractal and Fractional, 9(5), 312. https://doi.org/10.3390/fractalfract9050312

Article Metrics

Back to TopTop