1. Introduction
The calculus of non-integer order and fractional differential equations has been applied in the mathematical modeling of physical phenomena in the different fields of science and engineering [
1,
2,
3,
4,
5,
6,
7]. An example of the use of fractional derivatives in mathematical modeling is the fractional differential equation describing heat conduction in a medium. This equation was derived by using a non-local dependence between the heat flux vector and the temperature gradient [
4]. As a result, the time-fractional partial differential equation of the heat conduction was obtained. The separation of variables in this equation leads to a time-fractional three-term ordinary differential equation [
8,
9].
The exact solutions of initialvalue problems of the fractional order are often expressed by the special functions [
10,
11]. In particular, there are the Mittag-Leffler function and the Prabhakar function, as well as the generalized Wright and generalized hypergeometric functions. The properties of the Mittag-Leffler and the Prabhakar functions are the subject of [
12,
13,
14]. The generalized Wright function and hypergeometric functions are discussed in [
15,
16,
17,
18]. In the context of numerical calculations, it should be pointed out that the Prabhakar function and the generalized Wright function are not implemented in the software packages Mathematica and Maple, while the Mittag-Leffler function and the generalized hypergeometric function are predefined in these packages. Therefore, if a solution of the problem is expressed by the Prabhakar or generalized Wright function, then the usage of a relationship between this function and the generalized hypergeometric function allows one to convert the solution to the form with predefined hypergeometric function. In this paper, a relationship is used for presenting the solution of the three-term fractional equation in terms of the generalized hypergeometric functions.
Linear initial value problems are often solved by using the Laplace transform method. A stage of the usage of this method is determining the inverse Laplace transform. If an analytical inverse transform in a closed form is not possible to find, then the methods for numerical inversion can be used [
19,
20,
21]. However, the inversion of the Laplace transform is an ill-conditioned problem [
21,
22]. This means that arbitrarily small changes in the transform can generate arbitrarily large changes in the value of the inverse Laplace transform. If the Laplace transform is given in the form of a rational function then, in order to find the inverse transform, an analytical–numerical method can be applied. In this case, the singularity points of the Laplace transform as roots of a polynomial can be numerically determined and used to create the inverse transform. A similar approach can be applied for the Laplace transform, which is obtained as a solution in the transform domain of a commensurate fractional differential equation [
23]. The inverse Laplace transform is obtained in terms of the Mittag-Leffler and the Prabhakar functions.
The ill conditioning of the numerical inversion of the Laplace transforms is a disadvantage of the Laplace transform technique used to solve differential equations. In turn, a disadvantage of the series solutions is the slow convergence of many functional series or the loss of the convergence of these series for some arguments. Due to these disadvantages, a control of the numerical results of the solutions of the differential equations is needed. For the purpose of such control, various mathematical methods derived from different theoretical bases may be applied simultaneously.
In this paper, the two forms of an exact solution of a three-term fractional differential equation with the Caputo derivatives is presented. The solution of the differential equation, for which the difference of fractional derivative orders is a rational number, was derived in the form of a series of generalized hypergeometric functions. A solution of the commensurate fractional equation in the form of a finite sum of the Mittag-Leffler and the Prabhakar functions using an analytical–numerical method is presented. A numerical comparison and discussion of these methods and their effectiveness are carried out.
  2. Exact Solution of the Three-Term Fractional Equation
We consider the differential equation in the form
      
      where 
 and 
 are real constants and 
 and 
 are the fractional Caputo derivatives of order 
 and 
, respectively. The Caputo derivative is defined by
      
      where 
 is the gamma function. We continue for the rest of the paper with 
 and 
. The fractional differential Equation (1) of order 
 is complemented by the initial condition.
      
If 
, then in addition to the condition (3a), the initial condition for the derivative is also required [
3].
      
The general solution of the three-term fractional equation using the generalized Wright function is presented in [
3]. The solution of the initial value problem (1), (3a,b) can be written in the form
      
      where
      
      and
      
      whereas 
 is the generalized Wright function, which is defined as [
13]:
It can be noted that  is Green’s function for the differential Equation (1) with zero initial conditions.
The function 
 can be expressed by the Prabhakar function 
, which is defined by
      
      where 
 is the Pochhammer symbol.
      
The Prabhakar function (8) for 
 is the Mittag-Leffler function 
, i.e., 
. Using Equations (6)–(9), we obtain that
      
For certain values of orders 
 and 
, the function 
 can be represented in terms of the generalized hypergeometric function 
, which is defined by
      
On the basis of Equations (8)–(11), we obtain for 
: 
For 
, where 
 and 
 are positive integer numbers, using Equations (8) and (10), we can write:
Another form of the expression (13) can be obtained by utilizing the following properties of the Pochhammer symbol:
      where 
, 
. Using these symmetric (14a) and non-symmetric (14b) properties in Equation (13), one obtains
      
      where
      
Taking into account Equation (11), we find that 
 is the generalized hypergeometric function
      
      where 
. As a result, the solution of the initial value problem (1), (3) was obtained in the form (4) with function 
 given by Equation (5) and functions 
 defined by (15), whereas 
 are the generalized hypergeometric functions (17).
As mentioned earlier, the generalized hypergeometric functions are implemented in the software packages Mathematica and Maple. Therefore, the presentation of a solution of an initial value problem by generalized hypergeometric functions is a benefit from the viewpoint of numerical calculations with the help of these software packages.
  3. A Solution of the Three-Term Fractional Equation Using the Laplace Transform Technique
We consider the fractional order initial value problem (1), (3) with the derivative orders satisfying the inequalities: 
. In order to solve the problem, we use the Laplace transform method. The Laplace transform 
 of a function 
 is defined by
      
      where 
 is a complex parameter. The Laplace transform 
 exists, if 
 is an exponentially bounded function [
24], i.e., if there exist real constants 
, 
 and 
c such that 
 for all 
. For exponentially bounded functions, we utilize the property of the Laplace transform of the Caputo derivative [
11]:
Applying the Laplace transformation to Equation (1), using initial conditions Equations (3a) and (3b) and Equation (19) we obtain the Laplace transform of the solution 
 in the form
      
From Equation (19), it follows that the term 
 on the right-hand side of Equation (20) occurs only if 
. Similarly, the term 
 occurs only if 
. The inverse Laplace transform, 
, can be written as
      
      where 
 and
      
The inverse transform of Equation (22) can be determined by an expansion of this function in a series. Using the expansion proposed by Podlubny [
10], the function 
 can be expressed in the following series form
      
Utilizing the Laplace transform pair, the inverse Laplace transform of the function (23) is obtained as it can be noted that the same form has the function , which was introduced in the previous section (Equations (5) and (10)) by using the relationship between the generalized Wright function and the Prabhakar function. Hence, we have  for all t for which the series (25) is convergent.
The solution of the fractional differential Equation (1) is presented in terms of the infinite series (5) of the generalized Wright functions (6) or the Prabhakar functions (10) or the generalized hypergeometric functions (15). We now derive a solution of this initial value problem in the form of a finite sum of the Mittag-Leffler and the Prabhakar functions. We consider the fractional differential Equation (1) with commensurate derivative orders 
 and 
. In this case, there exists such a real number 
 and two integer numbers 
 and 
 that 
 and 
. Firstly, we define the auxiliary function
      
      where 
, 
, 
 and 
 is the floor function. The denominator of this function 
 is the characteristic polynomial of the fractional commensurate Equation (1). Using Equations (22) and (26), we can write
      
Applying the procedure of partial fraction decomposition, we rewrite function 
 for 
 in the form of a sum
      
      where 
 are distinct roots of the denominator of the function (26) and 
 is the multiplicity of the 
-th root, 
. The Equations (27) and (28) give
      
Using the formula (24), we find the inverse Laplace transform for 
 as
      
If 
, then the function (26) can be rewritten in the form
      
In this case, 
 is the root of the denominator of the function (31) and 
 is the multiplicity of this root. Taking this into account in Equations (28) and (29), we write 
 instead of 
 in these equations. As a result, we obtain the function 
 as
      
Finally, the solution of the initial problem (1), (3) is given by equation (21), whereas the function  is given by (30) if  and by equation (32) if .
  4. Numerical Analysis
The function (4) is a solution of the initial value problem (1), (3). This solution is expressed by the function 
, which is defined by Equation (5). Taking into account Equations (8) and (10) in Equation (5), we write the function 
 in the form of the double series
      
The series (33) can be used for the numerical calculation of the function 
 for a small argument 
. For large arguments, the asymptotic expansion of the Prabhakar function can be utilized, which is presented in [
13]. Using this asymptotic expansion in Equation (10), we obtain
      
The results of the numerical calculations of the function 
 by using three representations of this function are presented below. The first representation is the series (5) with coefficients (15) expressed by the generalized hypergeometric functions (17). The second method for the calculation of this function relies on using the double series (33) and (34), which are applicable for small and large arguments, respectively. The third representation of the function 
 was obtained by using the analytical–numerical method in the form of the finite sum (30). The function 
 is Green’s function for the fractional differential Equation (1). For 
, this equation is known as the Bagley–Torvik equation [
25].
We consider the differential Equation (1) assuming: 
, 
, 
, 
 and 
. Parameters occurring in Equation (26) are: 
, 
, 
 and 
. In order to calculate the values of the function 
 by using Equation (30), the roots 
 of the characteristic polynomial and the corresponding coefficients 
 must be determined. The characteristic polynomial 
 has two single real roots and a pair of conjugate complex roots. The roots 
 and the corresponding coefficients 
 are
      
Using Equation (30), we get the function 
 in the form
      
Numerical values of the function 
 computed using the infinite series (5) with coefficients (15) expressed by the generalized hypergeometric functions (17), the double series (33), (34) and the finite sum (35) are listed in 
Table 1. To receive proper accuracy of the values of this function represented by the series of the generalized hypergeometric functions (15), computations with a high precision should be made. As follows from 
Table 1, the values of the functions (33) and (34) in a certain interval are approximately equal, however, the first series can be only applied for small arguments and the second for large arguments. For the calculation of the function with the Formula (35), firstly the roots of the polynomial equation and the coefficients of the partial fraction decomposition must be determined. If the computations are made with the help of the software packages Mathematica or Maple, then the roots and the coefficients can be appointed with arbitrary precision. The Mittag-Leffler function occurring in the Formula (35) is predefined in both software packages and the arbitrary precision evaluation for the complex arguments is provided. The presented results show that the correctness of the received numerical values should be confirmed by using different forms of the analytical solution.
Assuming 
 in Equation (1), a particular solution of this equation satisfying zero initial conditions can be written in the convolution form
      
For the calculation of this integral, the Laplace transform property can also be used. The Laplace transform 
 of this function can be written as
      
Introducing 
, we obtain an auxiliary function in which the denominator is 
. It follows that the four roots determined earlier should be complemented by the roots of the equation 
. Then calculating the coefficients 
, we can write the solution as a sum
      
In the second example, we consider differential Equation (1), assuming that 
 and 
 where 
 is a constant, 
. Moreover, we assume that the function 
 is given in the form
      
In this case, the exact solution of Equation (1) with zero initial conditions is the function
      
Considering the differential Equation (1) with the orders of derivatives: 
 and 
, we obtain the parameters occurring in Equation (26): 
, 
 and 
. The characteristic polynomial 
 has only simple roots 
. Therefore, using Equation (30), the function 
 can be written in the form
      
Hence, the solution of Equation (1) can be written as follows
      
The integrals occurring in this equation can be calculated numerically.
Numerical values of the function (42) are compared with the exact solution (40). The absolute values of relative errors 
, where 
 is obtained by using (42) and 
 is the value of the function (40), are presented in 
Table 2 for 
. The small relative errors confirm the usefulness of the analytical–numerical method for also solving the commensurate fractional differential equation for the high degree of the characteristic polynomial.
The fractional differential Equation (1) for 
 and 
 is known as the Basset equation [
11]. We consider this equation, assuming A = 5, B = 2 and 
 in the following form
      
The exact solution of this equation for arbitrary 
, satisfying zero initial conditions is the function 
. The solution derived on the basis of Equations (4) and (30) for a rational order 
 has the form
      
      where 
m and 
n are positive integers, relatively prime numbers and 
. The results of numerical calculations obtained by using the solution (44) for 
 were compared with the exact solution. The absolute values of relative errors 
 for different values of the variable 
t and 
 are given in 
Table 3. The accuracy of the results depends on errors of the numerical determining of roots of the characteristic polynomial, errors of calculations of the coefficients and errors of numerical calculations of the integrals occurring in the solution (44).