1. Introduction
The fractional derivatives are a generalization of the integer-order derivatives and provide powerful tools for analyzing functions and systems. Many of the methods for studying integer-order derivatives also apply to fractional derivatives. The Caputo fractional derivative of order
, where
is defined as
Fractional calculus is an active research area and have been used to describe phenomena that cannot be adequately explained by integer-order derivatives. Fractional differential equations have found applications in various fields, including physics, engineering, chemistry and biology [
1,
2,
3,
4,
5,
6]. Numerical methods are used to analyze models that involve fractional differential equations. The finite difference schemes for solving numerically fractional differential equations use approximations of the fractional derivative. Consider the interval
and a uniform grid with a step size of
, where
N is a positive integer. Denote
and
. The approximations of fractional derivative
have the form
where
are the weights of the approximation and
. The generating function of an approximation of the fractional derivative is defined as
. Two important approximations of the fractional derivative are the Grünwald difference approximation and the L1 approximation. The Grünwald difference approximation of the fractional derivative of order
has a first-order accuracy and a generating function
. Grünwald approximation is a second-order shifted approximation of he fractional derivative with a shift parameter
. L1 approximation has an order
and a generating function
. Their weights satisfy
The properties of the weights of an approximation of the fractional derivative (
1) allow for an effective analysis of the convergence of numerical schemes for fractional differential equations [
7,
8,
9,
10]. The construction of approximations for the fractional derivative and schemes for numerically solving fractional differential equations is an area of ongoing research. Second-order approximations of the fractional derivative are constructed by Arshad et al. [
11], Nasir and Nafa [
12]. Approximations of order
are constructed by Alikhanov [
13], Gao et al. [
14], Xing and Yan [
15]. High-order approximations and numerical schemes for fractional differential equations are studied in [
16,
17,
18,
19,
20]. Implicit ADI schemes for fractional differential equations are constructed by Nasrollahzadeh and Hosseini [
21], Wang et al. [
22]. Denote
. In [
23] we obtain an approximation of the fractional derivative and its asymptotic formula
where
Approximation (
2) has an order
and a generating function
. The main class of approximations of integer-order derivatives are the finite-difference approximations which have first-order accuracy and second-order at the midpoint. Finite-difference approximations are local numerical differentiation methods and are a special case of the Grünwald difference approximation, where the order is an integer. Methods for global numerical differentiation are studied in [
24,
25]. The methods for constructing approximations of fractional derivatives using a generating function also apply to the construction of integer-order derivative approximations. In [
26,
27] we construct approximations of the first and second derivatives whose generating functions are transformations of the exponential and logarithmic functions. In [
26,
28] we construct second-order approximations of the fractional derivative using the asymptotic formula of the L1 approximation and second derivative approximations. In this paper we apply the method from [
26,
27] for constructing an approximation of first derivative and its second-order asymptotic formula
where the coefficient
has a value
. Approximation (
3) has a generating function
and is a global approximation of the first derivative. The structure of the paper is as follows. In section 2 we construct approximation (
3) and the following first-order approximation
The weights of approximations (
3) and (
4) satisfy conditions (
1). We consider the application of these approximations for numerically solving an ordinary differential equation and propose an algorithm that computes the numerical solutions using
arithmetic operations. The computational time and accuracy of the numerical methods are compared with Euler’s method. In section 3 we derive estimates for the errors of approximations (
3) and (
4) and the corresponding numerical solutions. In
Section 4, we construct numerical solutions for first-order ODEs which use approximation (
3) of the first derivative. We determine the values of the parameter
a such that the numerical methods achieve an arbitrary order of accuracy in the interval
. In section 5 we construct a finite difference scheme for the heat diffusion equation which uses approximation (
3) for the first partial derivative. The stability and convergence of the scheme are analyzed. In section 6, we consider an application of approximation (
3) for constructing an approximation of the Caputo fractional derivative. By applying approximation (
3) with the parameter value
to the first derivative
in the asymptotic formula (
2), we obtain the following approximation of a fractional derivative of order
.
where
We prove that the weights of approximation (
5) satisfy properties (
1). The numerical experiments presented in the paper validate the theoretical results on the accuracy and error of the numerical methods.
2. Asymptotic Formula
In this section we use the method from [
26,
27] to construct an approximation for the first derivative and its asymptotic formula by specifying the generating function of the approximation. Let
where
.The generating function
has properties
. Denote
The functions
and
have Maclaurin series
Consider a uniform grid on the interval
with step size of
where
N is a positive integer and let
. From (
6) and (
7) we obtain
where the function
and satisfies the condition
. Now we extend asymptotic formula (
8) to all functions in the class
. Let
where
satisfies the condition
.
The coefficient
has a value
and
Asymptotic formula (
9) holds for all functions
. When the parameter
a is zero,
is a first-order backward difference approximation of the first derivative. We will consider an application of formula (
9) for the numerical solution of an ordinary differential equation and compare the performance of the method with the Euler method.
Example 1.
Consider the following first order ordinary differential equation
By approximating the first derivative at the point
using a first-order backward difference approximation, we get
The numerical solution of equation (
10) satisfies
and
The value of
is computed with one addition and one multiplication, assuming that the values
of the function
F at the nodes
of the grid are known. The total number of arithmetic operations of Euler method is
. Note that in many cases, the computational time required to evaluate the values of
exceeds the time needed to compute the numerical solution
NS1. Now we construct the numerical solution of equation (
10) which uses asymptotic formula (
9). By substituting
with
we find
The numerical solution obtained from (
11) by truncating the error term satisfies
The sequence
has initial conditions
and satisfies
Numerical solution
NS1 is a special case of
NS2 when the parameter
a is zero,
. Direct computation of numerical solution
NS2 using the above formula requires
operations. The weights of
consist of powers of the parameter
a, which allows to compute
NS2 with
operations. The sequence
satisfies
where
The sequence
satisfies
Both sequences
and
are computed with
operations. The pseudocode for calculating the numerical solution
NS2 is given below.
The algorithm uses four operations on Step 1 and five operations for calculating each value of the sequence
for
in Step 2. Total number of operations for computation of numerical solution
NS2 is
. Consider the ordinary differential equation
where
. The numerical results for the error and order of numerical solutions
11 and
NS1 of equation (
NS2) are given in
Table 1. The calculation of the numerical solutions was performed with Mathematica software. Although formula (
9) is valid only asymptotically, the experimental results in
Table 1 suggest that numerical method
NS1 has a first-order accuracy. This fact is proven in the next section. The time for computation of the values of
is greater than the computational time of the numerical solutions. We observed a small difference of the computational time of the numerical solutions in
Table 1, which is a fraction of a second. The finite geometric series satisfies
By differentiating (
13) twice we find
Now we construct an approximation of the first derivative in the form
which satisfies the conditions
and
. The values of the coefficients
and
are determined from the two conditions.
The numbers
and
satisfy
Using formulas (
13) and (
14) we get
From (
16) and (
17) we find
Approximation
has the form
and holds for every value of
n, where
. Now we construct the numerical solution of equation (
10) which uses approximation
for the first derivative. By replacing the first derivative
with
we get
Numerical solution
NS3 has initial conditions
. The algorithm and pseudocode for computing the numerical solution
NS3 are given below:
where
The sequence
satisfies
The sequences
and
are calculated in
time with the following pseudocode.
The algorithm uses ten operations on Step 1 and five operations for calculating each value of the sequence
in Step 2 for
. The total number of operations for calculating numerical solution
NS3 is
.
From (
8) approximation
has a second-order asymptotic expansion formula
where
. Approximation
has second-order accuracy, when the coefficient
is equal to zero,
or
.
Approximation
is second-order accurate when
and
. Consider the following ordinary differential equation
Equation (
19) has a solution
. The experimental results of numerical solution
NS3 for equation (
19) and values of the parameter
and
are given in
Table 2.
3. Error Estimates and Convergence
In this section we derive estimates for the errors of approximations
and
of the first derivative and the errors of numerical solutions
NS2 and
NS3 of equation (
10). Denote
Lemma 2.
let . Then
where the coefficient satisfies the estimate
Proof. From Taylor theorem
for
and
. By substituting
with (
22) in formula (
20) for
we get
where
From (
14) and (
15) we get
□
Lemma 3.
let . Then
where the coefficient satisfies the estimate
Proof. Approximation
is written in the form
where the coefficients
and
satisfy
□
The estimate for the coefficients
and
derived in Lemma 2 and Lemma 3 depends on the step size
h and approximations
and
can be defined for any interval
. Asymptotic formula
is a first-order approximation of the first derivative for
while
is an approximation of the first derivative for all
. Now we use the bound for the errors of approximations
and
to prove the convergence of numerical methods
NS2 and
NS3. Let
be the error of numerical solution
NS3 at the point
for
. First we estimate the errors
and
. From Taylor Theorem the solution of equation (
10) satisfies
In Theorem 4 and Theorem 5 we derive bounds for the errors of numerical solutions
NS2 and
NS3 of equation (
10). The theorems are proved by induction.
Theorem 4.
The errors of numerical solution NS3 satisfies
Proof. The estimate (
24) for the error of numerical method
NS3 holds for
and
. Suppose that (
24) holds for
. The solution of equation (
10) and the error of
NS3 satisfy
where
for
. The error
is expressed with
as
By applying (
25) successively
times, we obtain
The error
satisfies the estimate.
□
Now we estimate the error
of numerical solution
NS2.
Theorem 5.
The error of numerical solution NS2 satisfies
Proof. The estimate (
26) for the error of numerical method
NS2 holds for
and
. Suppose that (
26) holds for
. The solution of equation (
10) satisfies
Then
where
for
. The error
is expressed with
as
By applying (
27) successively
times, we obtain
Denote
and
. Then
□
4. Numerical Solutions of First Order ODEs
In this section we construct the numerical methods for first order ODEs which use approximation of the first derivative and we obtain recursive formulas for computation of the numerical solution. The performance of the numerical methods is compared with the performance of the corresponding Euler methods. We show that the numerical methods can achieve an arbitrary order in the interval by using appropriate choices of the parameter of approximation .
Example 6.
Consider the first-order linear ODE with constant coefficients
By approximating
with first order backward difference approximation we obtain
The numerical solution is computed as
and
By approximating
with approximation
we obtain
Denote
. The solution of equation (
28) satisfies
The numerical solution of equation (
28) is computed as
The numerical solution (
29) is calculated with
arithmetic operations using an algorithm that is similar to the algorithms for calculating
NS2 and
NS3. From formula (
29), the value of
is expressed in terms of
as follows.
The numerical solution of equation (
28) using the approximation
for the first derivative is computed recursively as
and
Consider the following first-order linear ODE
Experimental results for the error and order of numerical solutions
NS4 and
NS5 of equation (
30) and positive values of
L are are given in
Table 3. Now we prove the convergence of numerical method NS5 when the value of
L is positive. Denote by
the error of NS5 at the point
. First, we estimate the errors
and
. The solution of equation (
28) satisfies
From Taylor theorem the truncation error
satisfies
In a similar way, we show that
. The errors
and
satisfy the estimates
We will prove the convergence of the numerical method
NS5 of equation (
30) for positive values of the parameter
L and derive an estimate for the error of the method. Denote
Proof. Inequality (
33) is satisfied for
and
. Assume that (
33) holds for
. The error
satisfies
Using the assumption of induction
By the principle of induction, the bound (
33) holds for all
. □
We will compare the performance of numerical methods
NS4 and
NS5 and negative values of the parameter
L of equation (
30). Experimental results for the error and order of numerical solutions NS4 and NS5 and
are given in Tables 4-6. The results of the numerical experiments presented in this section refer to ODSs that are defined in the interval
. The numerical results in
Table 4 show that method
NS4 has a first-order accuracy and its error can be very large for small values of the step size
h of the method. In
Table 5 the values of the parameter
a are fixed numbers close to one. In
Table 6 the parameter
and numerical solution
NS5 has an order
. Although the order of
NS5 in Tables 5-6 is smaller than one, the errors of the method are significantly smaller than the corresponding errors of numerical solution
NS4 in
Table 4.
Example 8.
Consider the first-order linear ODE
The numerical solutions
NS6 and
NS7 for equation (
34) which use backward difference approximation and approximation
for first derivative are computed as
In a similar way as in Example 7, a recursive formula for calculating the numerical solution of an equation (
34) is derived from (
35)
The first-order liner ODE
has a solution
. The experimental results of numerical solutions
NS6 and
NS7 of equation (
36) are given in
Table 7.
Numerical solution
NS7 depends on a parameter
a. The method can have any order in the interval
with a suitable choice of the parameter. The coefficient
in an asymptotic formula (
3) has a value
. The order of NS7 is
when the coefficient
is equal to
.
When
the coefficient
and
NS7 has an order
. When
the coefficient
and
NS7 has an order
. A summary of these results is given below.
• Numerical method
NS7 has an order
when
and
,
Values of the parameter
p greater than one,
lead to a second-order method. The experimental results for
and
are given in
Table 8.
•
NS7 has an order
, when
and
,
The experimental results for
and
are given in
Table 9.
•
NS7 has an order
, when
and
,
When
, numerical solution
NS7 has a second-order accuracy. The experimental results for
and
are given in
Table 10.
The logistic equation is a first-order nonlinear ordinary differential equation used for modeling population dynamics [
29,
30,
31].
Example 9.
Consider the logistic equation
Equation (
40) has a solution
The explicit schemes of equation (
40) which use first-order backward difference and approximation
of the first derivative satisfy
Numerical method (
41) has initial conditions
and is computed recursively as
Experimental results for the error and order of numerical solutions
NS8 and
NS9 of equation (
40) are given in
Table 11.
5. Numerical Solutions of Heat Equation
The heat equation is a partial differential equation that models the distribution of temperature in a one-dimensional object. Heat conduction a classical problem in physics and engineering that can be generalized to higher dimensions and has a wide range of applications. The analytical and numerical solutions of the heat equation are extensively studied in [
32,
33,
34,
35,
36]. In this section we construct a finite difference scheme for the heat equation which uses approximation
for the partial derivative in time and second order difference approximation for the partial derivative in space. The stability and convergence of the method is proved and its performance is compared with the standard method using first order difference approximation for the partial derivative in time.
Example 10.
Consider the following heat equation
where
D is the thermal diffusivity of the material and
. Denote
, where
M and
N are positive integers and by
the values of the solution at the nodes
of a rectangular grid
on
. By approximating the partial derivative in time by first-order backward difference approximation and the partial derivative in space by second-order central difference approximation we obtain
where
and
is the truncation error of the approximations of the partial derivatives at the point
of the grid
. The coefficients
and
satisfy
, where
The numerical solution
of heat equation (
42) on layer
m of the grid
is a solution of the system of linear equations
and has initial conditions
for
and boundary conditions
The system of linear equations (
44) is written in matrix form as
where
and
are vectors of dimension
which have entries
and
for
and
. The matrix
is the tridiagonal matrix of dimension
with main diagonal entries equal to 2 and entries above and below the main diagonal equal to
. Numerical solution
NS10 has an accuracy
and it is computed with
operations because
is a tridiagonal M-matrix [
37,
38]. Now we construct the finite difference scheme of equation (
42) which uses approximation
for the partial derivative in time and central difference approximation for the partial derivative in space. The solution of heat equation (
42) satisfies
Denote
.
From Lemma 3 the coefficient
satisfies the estimate
. The formula (
45) is written in the form
From formulas (
45) and (
46) we obtain
The solution of heat equation (
51) satisfies
where
. The numerical solution of heat equation (
42) on row
m of the grid
which corresponds to (
47) satisfies
The system of liner equations (
58) is written in matrix form as
where
is the vector of dimension
with elements
. Consider the following heat equation
where
. Experimental results for error and order of numerical methods
44 and
NS11 of equation (
49) and
are given in
Table 12. The orders of the methods with respect to
and
h are computed with formulas
and
, where
is he error of the method for the given values of
in
Table 12. The two methods,
44 and
NS11, have similar performance with respect to computational time and accuracy. Numerical solution
NS11 has an order
when the parameter
. The numerical results for
and
are given in
Table 13.
A Crank-Nicolson scheme for heat equation has second order accuracy [
39,
40]. The convergence of finite difference schemes for heat equation are studied in [
41,
42]. Now we derive a bound for the error of finite difference scheme
NS11. Let
be the error of
59 at the point
and
be the vector with the errors
on row
m of the grid
, where
. The infinity norm of a vector is the maximum absolute value of its components and the infinity norm of a matrix is the maximum of the absolute row sums. In Lemma 11 we estimate the errors of difference scheme
NS11 on the first row of the grid
.
Lemma 11.
Let . Then
Proof. The solution of equation (
42) on the first row of the grid
satisfies
The first order difference approximation satisfies
where
for
. Then
where
for
. The error
satisfies
Hence
for
and
. The errors of numerical method
NS11 on the first row of the grid
satisfy
The elements of
are equal to zero,
and the vector
with the errors of
59 on the first row of the grid
satisfies
where
is the vector with elements
. From (
62) the infinity norm of
satisfies
The matrix
is a diagonally dominant M-matrix and its infinity norm satisfies [
43,
44]
□
The vector
with the errors of difference scheme
59 on row
m of the grid
satisfies
where
is the vector with entries
. The infinity norm of
satisfies
where
The matrix
has eigenvalues [
45]
and eigenvectors
for
which have components
, where
. Denote by
P and
Q the following matrices
The sequence of vectors
satisfies
The matrix
P has eigenvalues
for
. The spectral radius of the matrix
P is smaller than one,
and its powers
converge to zero. Therefore
. Denote
In Theorem 12 we prove that finite difference scheme
NS11 is unconditionally stable and has an accuracy
.
Theorem 12.
Let . Then
where and all .
Proof. By applying (
54) successively
times we obtain
From Lemma 11 the norm of the vector
satisfies
. Hence
□
6. Approximations of the Fractional Derivative
In this section, we discuss the construction of an approximation (
5) for the fractional derivative, using the asymptotic formula (
2) and the approximation
for the first derivative. Two approximations of the fractional derivative of order
whose weights satisfy (
1) are given below. Let
. The L1 approximation of Caputo fractional derivative has the form
where
,
The L1 approximation and approximation (
5) have an order
and and their weights satisfy (
1). In [
7,
46] we use the properties of the weights (
1) of approximations of the fractional derivative for analyzing the convergence and order of the numerical solutions of two-term ordinary fractional differential equation and the time-fractional Black-Scholes equation. In [
26,
28] we construct second order approximations of Caputo derivative using the asymptotic formula of L1 approximation. In [
23] we obtain an approximation of the Caputo fractional derivative of order
by substituting the first derivative in (
2) with a first-order backward difference approximation.
where
,
and
. Now we apply approximation
for constructing an approximation of the Caputo derivative. By substituting the first derivative
in formula (
2) with
we obtain an approximation of order
.
where
,
The value of zeta function
is negative when
and the parameter
b of approximation
has a modulus smaller than one,
. Therefore
and
for
. In Lemma 13 we show that the coefficient
of approximation (
58) is negative when the parameter
b has a value
.
Proof.
Inequality (
58) holds when
Taking the logarithm of both sides, we get
Let
. The function
f satisfies
and has first derivative
It is sufficient to prove that
is positive. The zeta function and its derivative have Laurent series expansions
where
are Stieltjes constants
The derivative of the function
f satisfies
The function
g has first, second and third order derivatives
The values of the function
g and its derivatives
at zero are positive
The third derivative
is positive on the interval
because
Therefore the functions are positive and increasing and . The function f is increasing and positive because . □
Approximation (
5) of the fractional derivative is obtained from (
58) and value of the parameter
. The two-term and multi-term ordinary fractional differential equations are an important class of equations in fractional calculus which generalize the linear ordinary differential equations with constant coefficients. Their analytical and numerical solutions are studied in [
47,
48,
49,
50,
51]. In the next examples, we will consider an application of approximation (
57) for construction of numerical schemes for the two-term ordinary fractional differential equation and the fractional subdiffusion equation.
Example 14.
Consider the following two-term equation
The numerical solution
of equation (
59) which uses L1 approximation (
56) of the fractional derivative is computed as
The numerical solution of equation (
59) which uses approximations (
56) and (
57) of the fractional derivative
satisfies
and has initial conditions
The initial conditions (
Section 6) are obtained with the approximation of the fractional derivative
Consider the two-term equation
Equation (
62) has a solution
, where
is the Mittag-Leffler function
The experimental results of numerical solutions
NS12 and
NS13 of equation (
62) on the interval
are given in
Table 14 and
Table 15. The second column of
Table 14 pertains to
NS13 using approximation (
57), while the results in the third column relate to NS13 using approximation (
58) with a parameter
. The numerical results in
Table 15 were obtained using approximation (
5) for the fractional derivative. The sequence
and the coefficients
and
of approximations (
56) and (
57) for
are computed recursively in
arithmetic operations. The
NS12 and
NS13 methods have similar computational time and accuracy. The approximation (
56) is obtained from the formula (
2) by replacing the first derivative
with a first-order difference approximation. Replacing the second derivative and derivatives of higher order with finite difference approximations in the asymptotic formulas leads to approximations whose weights do not satisfy (
1). The method of constructing approximation (
5) using the approximation
of the first derivative has the advantage that it can be generalized to constructions of high-order fractional derivative approximations which have properties (
1).
The time fractional subdiffusion equation is a generalization of heat diffusion equation using a time-fractional derivative of order
with
. The analytical and numerical solutions of fractional subdiffusion equations are studied in [
52,
53,
54,
55,
56].
Example 15.
Consider the following fractional subdiffusion equation
where
and
denotes the Caputo derivative of the solution
in time. Let
and
, where
M and
N are positive integers and
be a rectangular grid with nodes
. The numerical solution
on the first three rows of
is computed with the approximation (
61) of the partial fractional derivative and second-order central difference approximation of the partial derivative in space
Denote
. The numerical solution satisfies the system of linear equations
and has initial conditions
for
and boundary conditions
for
. The numerical solution on row
m of the grid
, where
, which uses approximation (
5) of the fractional derivative satisfies
Denote
. The numerical solution on row
m satisfies the tridiagonal system of linear equations
Consider the fractional subdiffusion equation
Equation (
64) has a solution
. Experimental results for the error and order of numerical solution
NS14 of equation (
64) are given in
Table 16.
7. Conclusions
In this paper, we construct approximations of the first derivative whose weights contain powers of a parameter
a, where
. The approximations are applied for the numerical solution of ordinary differential equations and the heat equation. The properties of the weights allow the computation of the numerical solution of ordinary differential equations with
operations. The numerical solutions of partial differential equations are computed with
operations, where
M is the number of nodes in the time and
N is the number of nodes in space. The numerical methods are compared with the Euler method using a first-order backward approximation of the first derivative. In the examples given in the paper, we observe similar computational time and accuracy for the numerical methods, with the difference in computational time being less than a second. The numerical methods for ODEs and PDEs using approximation (
3) of the first derivative can achieve an arbitrary order in
using values of the parameter (
37), (
38), and (
39). The numerical methods constructed in the paper are easy to implement and have a better performance compared to the Euler method for equation (
30) with negative values of
L and values of the parameter
a close to one, as shown in Tables 4-6. The main goal of constructing the approximations of the first derivative (
3) and (
4) is to apply them to the construction of approximations of the fractional derivative, whose weights have property (
1). An example of a construction of an approximation of the fractional derivative of order
which uses asymptotic formula (
2) and approximation (
3) of the first derivative is given in section 6. In future work, we will extend the method for constructing approximations of the second and higher-order derivatives. We will study constructions of high-order approximations of the fractional derivative that satisfy (
1), and we will investigate the properties and convergence of the finite difference schemes for fractional differential equations.
Author Contributions
Conceptualization, Y.D. and S.G.; data curation, V.T.; formal analysis, Y.D. and V.T.; funding acquisition, S.G.; investigation, Y.D.; methodology, V.T. and S.G.; project administration, Y.D. and V.T.; resources, S.G.; software, S.G.; supervision, Y.D.; validation, V.T.; visualization, S.G.; writing—original draft, Y.D. and S.G.; writing—review and editing, Y.D. and V.T. All authors have read and agreed to the published version of the manuscript.