Abstract
Fractional differential problems are widely used in applied sciences. For this reason, there is a great interest in the construction of efficient numerical methods to approximate their solution. The aim of this paper is to describe in detail a collocation method suitable to approximate the solution of dynamical systems with time derivative of fractional order. We will highlight all the steps necessary to implement the corresponding algorithm and we will use it to solve some test problems. Two Mathematica Notebooks that can be used to solve these test problems are provided.
1. Introduction
Presently, fractional differential problems are well established models to describe a great variety of real-world phenomena [1,2,3,4]. Since their analytical solution can be obtained in just a few cases, numerical methods are required for its approximation. A key point to construct efficient numerical methods is the ability to reproduce the nonlocal behavior of the fractional derivative. This is a challenging goal especially in cases of nonlinear problems.
In the literature several methods, such as finite difference methods, spectral methods, finite element methods, collocation methods, were proposed to solve fractional differential problems [5,6,7]. In this context, collocation methods are revealed particularly attractive since their global nature is suitable to catch the non-locality of the fractional derivative.
The aim of this paper is to describe in detail how to apply the fractional collocation method introduced in [8] for the numerical solution of nonlinear dynamical systems with time derivative of fractional order. The method was already used to numerically solve some linear and nonlinear problems with fractional time derivative [9,10,11]. Here, we will describe how to use the method to solve differential problems of a more general form and discuss its implementation issues. To allow the reader to easily follow the description of the algorithm, we limit ourselves to the case when the approximate solution belongs to the spline space. In particular, we will show some numerical tests when using both linear and cubic splines and provide two Mathematica Notebooks [12] that can be used to solve such test problems.
The paper is organized as follows. In Section 2 the fractional differential problem we are interested in and the collocation method we use are briefly recalled. In particular, the spline space we use to construct the approximate solution is described in Section 2.2 and Section 2.3; the analytical expression of both the basis functions and their fractional derivative is given in Section 2.3 and Section 2.4; the algorithm of the collocation method is described in Section 2.5. The results of the numerical tests are shown in Section 3 and briefly discussed in Section 4. Finally, in Section 5 some conclusions are given.
2. Materials and Methods
In this section, after describing the differential problem we are interested in, we recall the main features of the numerical method we use to approximate its solution.
2.1. Nonlinear Fractional Dynamical Systems
Let and be real-valued vector functions, and be a real vector. A nonlinear dynamical system with derivative of fractional, i.e., noninteger, order in time can be written as
where denotes the Caputo fractional derivative with respect to the time t. For a sufficiently smooth vector function , its Caputo derivative is defined as
where
and denotes the Euler’s gamma function. For details on fractional calculus and fractional derivatives see, for instance, [13,14,15,16].
The existence, unicity and smoothness of the solution to (1) can be analyzed by transforming the problem into an integral equation [17,18].
2.2. The Cardinal B-Splines
The cardinal B-splines are piecewise polynomials with breakpoints on integer knots. Given the sequence of simple integer knots , the Cardinal B-spline of integer degree can be defined by applying the divided difference operator to the truncated power function on the knots :
where
is the collocation matrix of the function system on the nodes and
is the backward finite difference operator.
We recall that is compactly supported on , is positive in and belongs to . For details and further properties on polynomial B-splines, see, for instance, [19].
2.3. B-Spline Bases on the Semi-Infinite Interval
The system of the integer translates forms a function basis for the space of piecewise polynomials of degree n on the real line and enjoys many useful properties that make it especially suitable in approximation problems. In particular, is a partition of unity, reproduces polynomials up to degree n, satisfies the Strang-Fix theory and has approximation order (cf. [19]).
To construct a function basis in the semi-infinite interval we restrict to this interval. The interior functions, i.e., the functions with , which have support all contained in , remain unchanged. The left-edge boundary functions, i.e., the functions with , whose support is not all contained in , are modified introducing a knot of multiplicity at the left-edge of the interval. Thus, the B-spline basis on the semi-infinite interval is
where , , are the left-edge boundary functions. In [20] their analytical expressions is given in terms of suitable collocation matrices:
where is the order collocation matrix
and is the () order collocation matrix
The B-spline bases can be generalized to any sequence of equidistant knots on the interval by mapping , where is the refinement step:
where , , are the left-edge functions and , , are the interior functions. We observe that at the left-edge of the interval the basis functions satisfy the initial conditions
where denotes the Kronecker delta. Consequently, just the first basis function does not vanish in the origin with .
2.4. The Fractional Derivative of the Cardinal B-Splines
The Caputo fractional derivative of the interior functions can be easily evaluated by the differentiation rule (cf. [8,21])
The Caputo fractional derivative of the left-edge boundary functions can be obtained by applying the fractional differentiation operator to their analytical expression [20]:
where
Equation (8) shows that is a linear combination of the fractional derivative of the translates of the truncated power function whose expression is given by
where denotes the rising Pochhammer symbol [20].
2.5. The Collocation Method
We approximate the solution to the dynamical system (1) by a linear combination of the functions belonging to the basis :
where , , are unknown vectors that can be determined requiring that satisfies the differential problem (1) on a set of collocation points.
Let be the discretization interval and let be a set of collocation points. The restriction of to the interval I is
where . Thus, the discretized version of (1) reads
First of all, we observe that due to (6) and the partition of unity property, the initial condition is easily satisfied by setting
This is a nonlinear system with equations and unknowns. The existence of a unique solution to (14) depends on the existence of a unique solution to (1) [17,18,22].
The convergence and the stability of the method can be proved following the same line of reasoning in [8,11] (cf. also [22]). For sufficiently smooth the method is stable and the convergence is guaranteed with convergence order at least , i.e., , where and is a constant independent of h. Moreover, polynomial reproduction implies that the spline approximation is exact whenever the solution is a polynomial of degree at most n.
The solution to the nonlinear system (14) can be approximated by the Gauss-Newton method. Let
be the unknown vector and let
be the collocation matrices of the basis functions and of their fractional derivative, respectively. Let be the vector-valued function whose entries are the equations of the nonlinear system (14). Then, the nonlinear system can be written as
where is the identity matrix of order m and the vector stands for the know term F evaluated in all the collocation points. Here, the symbol ⊗ denotes the Kronecker product on two matrices. The Gauss-Newton method starts by an initial guess and approximates the solution to the nonlinear system by the iterative procedure
where the vector is the solution to the linear system
and is the Jacobian matrix of . For a general nonlinear fractional differential problem of type (1) the Jacobian matrix can be written as
where denotes the Jacobian matrix of the known term F evaluated in the collocation points. Here, the symbol ∘ denotes the entrywise product of arrays. To have a unique solution to the linear system (17), the number of the collocation points and the number of basis functions must be chosen so that . In case of equality the linear system is squared otherwise we get an overdetermined linear system that can be solved by the least squares method (cf. [11]).
In practical computation, the iterative procedure is stopped when , where is a given tolerance. It is known that the local convergence of the Gauss-Newton method is not guaranteed, and particular attention should be paid in implementing the method.
The flow chart showing all the steps needed to implement the method is displayed in Figure 1.
Figure 1.
The flow chart of the collocation method described in Section 2.
3. Results
In this section, we give some algorithmic details on the collocation method described in the previous section when using linear or cubic splines to approximate its solution. Two Mathematica Notebooks (Supplementary Materials) [12] describing all the necessary steps to implement the algorithm for solving some numerical tests are provided as Supplementary Materials.
3.1. The Linear B-Spline Basis
Given a finite interval , the linear B-spline basis
has just one left-edge boundary function, i.e., , and interior functions, i.e., , , where . Obviously, T and h must be chosen in order . The explicit expression of the basis functions is well known and is given by
where
The Caputo derivative of fractional order of the basis functions has the following expression
where
is the Caputo derivative of the linear B-spline.
The edge function and the linear cardinal B-spline are shown in Figure 2 while their fractional derivative of order is shown in Figure 3.
Figure 2.
The left-edge function (blue) and the linear cardinal B-spline (orange).
Figure 3.
The fractional derivatives (blue) and (orange).
3.2. The Cubic B-Spline Basis
Given a finite interval , the cubic B-spline basis
consists of 3 left-edge boundary functions, i.e., , , and interior functions, i.e., , , where . Their explicit expression can be evaluated by Equations (4) and (5). For the convenience of the reader we give the resulting expression taken from [20]:
where
The Caputo derivative of fractional order of the basis functions has analytical expression
where
and
are the Caputo derivatives of the truncated power function of degree 3 and of the cubic B-spline, respectively.
The edge functions , , and the cubic cardinal B-spline are shown in Figure 4 while their fractional derivative of order is shown in Figure 5.
Figure 4.
The left-edge functions (blue), (orange), (green), and the cubic cardinal B-spline (red).
Figure 5.
The fractional derivatives (blue), (orange), (green), (red).
3.3. Numerical Solution of Linear Dynamical Systems
The collocation method described in Section 2.5 can be also used to solve linear problems of type
where is a real matrix. In this case, the Jacobian matrix is independent of ℓ and reduces to
so that the numerical solution is computed by solving a linear system (cf. [11]). As a test problem we consider the linear dynamical system
taken from [23]. We solved the problem on the discretization interval using a set of equidistant collocation nodes with time step for a total of 254 collocation points. We used as function basis the cubic B-spline basis and the linear B-splines basis with so that the basis has 131 functions and 129 functions, respectively. Thus, the final linear system to be solved has 765 equations and 390 unknowns in the first case and 765 equations and 384 unknowns in the second case. The numerical solutions obtained by the algorithm implemented in the Mathematica Notebooks (Supplementary Materials) are displayed in Figure 6.
Figure 6.
The numerical solution for (solid lines) and (dashed line) of the linear dynamical system (37). In both cases . The first, second and third entries of the vector are displayed in blue, yellow and green, respectively.
3.4. Numerical Solution of Nonlinear Dynamical Systems
We solved the nonlinear dynamical system (cf. [23])
using the same collocation points and the same function basis as in the linear case.
The numerical solutions obtained by the algorithm implemented in the Mathematica Notebooks (Supplementary Materials) are displayed Figure 7.
Figure 7.
The numerical solution for (solid lines) and (dashed line) of the nonlinear dynamical system (38). In both cases . The first, second and third entries of the vector are displayed in blue, yellow and green, respectively.
4. Discussion
The examples above show that the collocation method described in Section 2 is easy to implement and give accurate results both in the linear and cubic case. We notice that the Mathematica Notebooks (Supplementary Materials) we provided are just intended for explaining in detail the algorithm shown in Figure 1. To solve high dimensional problems the algorithm should be implemented in a more efficient way. For instance, the slight instabilities appearing near the initial point in Figure 7 can be avoided by solving the overdetermined linear system (17) by Krylov methods [24]. Moreover, the Jacobian matrix can be compressed by usual techniques [25]. Taking these remarks into account, the method can be used not only to solve several kinds of initial problems but also to solve boundary value problems.
5. Conclusions
We presented a collocation method suitable to solve nonlinear differential problems with time fractional derivative. The strength of the method is its ability to approximate exactly the fractional derivative of the approximating function by using the explicit formulas (7) and (8). Moreover, the method is easy to implement since required just the construction of the nonlinear system (14). With respect to the collocation method considered in [17], where the number of equations is equal to the number of unknowns, in our examples the number of equations is almost twice the number of unknowns. To apply the method in case of high dimensional problems, the number of equations should be reduced. This can be done, for instance, using non-equidistant collocation points as done in [17]. In particular, using Gaussian nodes instead of equidistant nodes not only could reduce the dimension of the nonlinear system but could also improve the accuracy of the method. Finally, a detailed analysis of the stability and the convergence of the method should be conducted. This will be the subject of a forthcoming paper.
Supplementary Materials
The following are available online at https://www.mdpi.com/1999-4893/12/8/156/s1, Mathematica Notebooks: CollMethod_FractTimeNonLinDynSistem_LinearBspline.nb (linear spline approximation), CollMethod_FractTimeNonLinDynSistem_CubicBspline.nb (cubic spline approximation).
Funding
This research received no external funding.
Conflicts of Interest
The authors declare no conflict of interest.
References
- Mainardi, F. Fractional Calculus and Waves in Linear Viscoelasticity: An Introduction to Mathematical Models; World Scientific: Singapore, 2010. [Google Scholar]
- Hilfer, R. Applications of Fractional Calculus in Physics; World Scientific: Singapore, 2000. [Google Scholar]
- Kilbas, A.A.; Srivastava, H.M.; Trujillo, J.J. Theory and Applications of Fractional Differential Equations; Elsevier Science: Amsterdam, The Netherlands, 2006. [Google Scholar]
- Tarasov, V.E. Fractional Dynamics. Applications of Fractional Calculus to Dynamics of Particles, Fields and Media; Nonlinear Physical Science; Springer: Berlin, Germany, 2010. [Google Scholar]
- Baleanu, D.; Diethelm, K.; Scalas, E.; Trujillo, J.J. Fractional Calculus: Models and Numerical Methods; World Scientific: Singapore, 2016. [Google Scholar]
- Li, C.; Zeng, F. Numerical Methods for Fractional Calculus; A Chapman & Hall Book/CRC Press: Boca Raton, FL, USA, 2015. [Google Scholar]
- Li, C.; Chen, A. Numerical methods for fractional partial differential equations. Int. J. Comput. Math. 2018, 95, 1048–1099. [Google Scholar] [CrossRef]
- Pezza, L.; Pitolli, F. A multiscale collocation method for fractional differential problems. Math. Comput. Simul. 2018, 147, 210–219. [Google Scholar] [CrossRef]
- Pezza, L.; Pitolli, F. A fractional spline collocation-Galerkin method for the time-fractional diffusion equation. Commun. Appl. Ind. Math. 2018, 9, 104–120. [Google Scholar] [CrossRef]
- Pitolli, F. A fractional B-spline collocation method for the numerical solution of fractional predator-prey models. Fractal Fract. 2018, 2, 13. [Google Scholar] [CrossRef]
- Pellegrino, E.; Pezza, L.; Pitolli, F. A collocation method in spline spaces for the solution of linear fractional dynamical systems. arXiv 2019, arXiv:1907.10927. [Google Scholar]
- Wolfram Research, Inc. Mathematica, Version 12.0.0.0; Wolfram Research: Champaign, IL, USA, 2019. [Google Scholar]
- Diethelm, K. The Analysis of Fractional Differential Equations: An Application-Oriented Exposition Using Differential Operators of Caputo Type; Springer: Berlin, Germany, 2010. [Google Scholar]
- Sabatier, J.; Agrawal, O.; Tenreiro Machado, J.A. Advances in Fractional Calculus; Springer: Berlin, Germany, 2007. [Google Scholar]
- Samko, S.G.; Kilbas, A.A.; Marichev, O.I. Fractional Integrals and Derivatives; Gordon & Breach Science Publishers: London, UK, 1993. [Google Scholar]
- Podlubny, I. Fractional Differential Equations; Academic Press: Cambridge, MA, USA, 1998. [Google Scholar]
- Pedas, A.; Tamme, E.; Vikerpuur, M. Smoothing transformation and spline collocation for nonlinear fractional initial and boundary value problems. J. Comput. Appl. Math. 2017, 317, 1–16. [Google Scholar] [CrossRef]
- Vainikko, G. Multidimensional Weakly Singular Integral Equations; Lecture Notes in Mathematics; Springer: Berlin, Germany, 1993. [Google Scholar]
- Schumaker, L.L. Spline Functions: Basic Theory; Cambridge University Press: Vambridge, UK, 2007. [Google Scholar]
- Pitolli, F. Optimal B-spline bases for the numerical solution of fractional differential problems. Axioms 2018, 7, 46. [Google Scholar] [CrossRef]
- Unser, M.; Blu, T. Fractional splines and wavelets. SIAM Rev. 2000, 42, 43–67. [Google Scholar] [CrossRef]
- Ascher, U. Discrete least squares approximations for ordinary differential equations. SIAM J. Num. Anal. 1978, 15, 478–496. [Google Scholar] [CrossRef]
- Li, C.; Ma, Y. Fractional dynamical system and its linearization theorem. Nonlinear Dyn. 2013, 71, 621–633. [Google Scholar] [CrossRef]
- Calvetti, D.; Pitolli, F.; Somersalo, E.; Vantaggi, B. Bayes meets Krylov: Statistically inspired preconditioners for CGLS. SIAM Rev. 2018, 60, 429–461. [Google Scholar] [CrossRef]
- Mallat, S. A Wavelet tour of Signal Processing. The Sparse Way; Elsevier: Amsterdam, The Netherlands, 2009. [Google Scholar]
© 2019 by the author. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).