Keywords

1 Preliminaries

1.1 Local Truncation Error

Let \(z:[a,b]\rightarrow {\mathbb {R}}^d\) and \(f:{\mathbb {R}}^d\rightarrow {\mathbb {R}}^d\) a smooth curve and a smooth vector field, respectively, for \(d\in \mathbb {N}\) and \([a,b]\subset {\mathbb {R}}\). Using the usual dot notation as time derivative we can define the initial value problem:

$$\begin{aligned} \dot{z}=f(z),\quad z(a)=z_0, \end{aligned}$$
(1)

\(z_0\in {\mathbb {R}}^d\), with smooth solution \(z(t)\subset {\mathbb {R}}^d\). On the other hand, we define an implicit one-step numerical method:

$$\begin{aligned} z_{k+1}=z_k+h\,f_h(z_k,z_{k+1},h), \end{aligned}$$
(2)

where \(h\in {\mathbb {R}}_+\) is the time step, \(f_h:{\mathbb {R}}^d\times {\mathbb {R}}^d\times {\mathbb {R}}_+\rightarrow {\mathbb {R}}^d\) is smooth, and \(z_k\) is considered an approximation of \(z(t_k)\) for the time grid \(t_k=\left\{ a+hk\,|\,k=0,\cdots ,N\right\} \), with \(N=(b-a)/h.\) We say that the local truncation error order of the method (2) with respect to (1) is p if

$$\begin{aligned} ||z(t_{k+1})-z_{k+1}||= O(h^{p+1}), \end{aligned}$$
(3)

when \(h\rightarrow 0\) and where \(||\cdot ||\) is the Euclidean norm in \({\mathbb {R}}^d\) [6].

1.2 Conservative Mechanical Systems

The dynamics of conservative simple mechanical systems, subject to a potential force [7], is described by the second-order differential equation:

$$\begin{aligned} m\ddot{x}=-\nabla U(x), \quad x(a)=x_0,\,\,\dot{x}(a)=v_0, \end{aligned}$$
(4)

where \(x_0,v_0\in {\mathbb {R}}\), \(m\in {\mathbb {R}}_{+}\) is the mass of the system (for simplicity, we will set \(m=1\)), \(x:[a,b]\rightarrow {\mathbb {R}}\)Footnote 1 is the dynamical curve and the potential energy \(U:{\mathbb {R}}\rightarrow {\mathbb {R}}\) is a smooth function. This equation can be transformed into a first-order differential equation:

$$\begin{aligned} \begin{aligned} \dot{x}&=v,\\ \dot{v}&=-\nabla U(x),\quad x(a)=x_0,\,\,\,v(a)=v_0. \end{aligned} \end{aligned}$$
(5)

The dynamical equation (4) can be obtained as a critical condition for extremals from the Hamilton’s principle [8], given the action integral

$$\begin{aligned} S(x)=\int _a^bL(x(t),\dot{x}(t))\,dt \end{aligned}$$
(6)

for a Lagrangian function \(L:T{\mathbb {R}}\rightarrow {\mathbb {R}}\) (we shall consider the tangent bundle \(T{\mathbb {R}}\), i.e. the state space, as the space locally isomorphic to \({\mathbb {R}}\times {\mathbb {R}}\), with coordinates \((x,\dot{x})\)) defined by

$$\begin{aligned} L(x,\dot{x})=\frac{1}{2}\dot{x}^2-U(x). \end{aligned}$$
(7)

Remarkable geometric properties of the flow generated by (4) (equivalently (5)) are its symplecticity (it preserves the symplectic form \(\varOmega _L:=dx\wedge d\dot{x}=dx\wedge dv\in \bigwedge ^2(T{\mathbb {R}})\)) and the preservation of symmetries (Noether’s theorem) [8].

Remark 1

Observe that we are choosing a “Lagrangian version” (5) of Hamilton equations for simple mechanical systems. In the picked setup, i.e. the configuration manifold is the real space and the particular Lagrangian function (7), both Lagrangian and Hamiltonian pictures are equivalent. Therefore, the theorems about the local truncation error order of variational integrators in [5, 9], apply for (5).

1.3 Variational Integrators

A natural way of obtaining integrators preserving the symplectic form \(\varOmega _L\) and the symmetries of the system is to construct variational integrators [5]. For that, we replace the continuous curves x(t) by discrete ones \(x_d=\left\{ x_k\right\} _{0:N}:=\left\{ x_0,x_1,\cdots ,x_N\right\} \in {\mathbb {R}}^{N+1}\). Moreover, we define the discrete Lagrangian \(L_d:{\mathbb {R}}\times {\mathbb {R}}\rightarrow {\mathbb {R}}\) as an approximation in one time step of the action integral (6), say

$$\begin{aligned} L_d(x_k,x_{k+1},h)\simeq \int _{t_k}^{t_{k}+h}L(x(t),\dot{x}(t))\,dt, \end{aligned}$$
(8)

where we shall omit the h dependence of the discrete Lagrangian unless needed. Given this, we define the discrete action sum \(S_d(x_d)=\sum _{k=0}^{N-1}L_d(x_k,x_{k+1})\); the discrete Hamilton’s principle applied upon this action sum provides the so-called discrete Euler-Lagrange equations:

$$\begin{aligned} D_1L_d(x_k,x_{k+1})+D_2L_d(x_{k-1},x_{k})=0, \quad k=1,...,N-1, \end{aligned}$$
(9)

which, under the condition \([D_{12}L_d]\) is regular, define a discrete flow \(F_{L_d}:{\mathbb {R}}\times {\mathbb {R}}\rightarrow {\mathbb {R}}\times {\mathbb {R}}\); \((x_k,x_{k+1})\mapsto (x_{k+1},x_{k+2})\), that we call variational integrator. Alternatively, the transformationFootnote 2:

$$\begin{aligned} \begin{aligned} v_k^{-}&=-D_1L_d(x_k,x_{k+1}),\\ v_{k+1}^{+}&=\,\,\,\,\,D_2L_d(x_k,x_{k+1}), \end{aligned} \end{aligned}$$
(10)

defines an alternate discrete flow \(\tilde{F}_{L_d}:{\mathbb {R}}\times {\mathbb {R}}\rightarrow {\mathbb {R}}\times {\mathbb {R}}\); \((x_k,v_k)\mapsto (x_{k+1},v_{k+1})\), which, when we pick the Lagrangian (7), will be a variational integrator for (5) (observe that, in the general case, the “velocity matching” condition \(v_k^{-}=v_k^{+}\) reproduces the discrete Euler-Lagrange equations (9)). As mentioned above, \(\tilde{F}_{L_d}\) is symplectic and momentum preserving. Moreover, the symplecticity ensures a bounded energy behaviour in the long-term, which is explained by Backward Error Analysis [6]. Another advantage of the variational approach is that the local truncation error order of the integrators can be determined from the approximation in (8). In particular, we can establish the following result, which is a direct application of the order theorems in [5] and [9]:

Theorem 1

Given the Lagrangian \(L(x(t),\dot{x}(t))\) (7) and \(L_d(x_k,x_{k+1})\) an order p approximation of the action integral (8), then the local truncation error of the variational integrator \(\tilde{F}_{L_d}\) determined by (10) with respect to (5) is of order p.

Low-order integrators (up to 2)Footnote 3 can be obtained through a first order quadrature and the following linear interpolation between the points \([x_k,x_{k+1}]\): \(\dot{x}(t_k)\simeq (x_{k+1}-x_k)/h\) and \(x(t_k)\simeq \gamma x_k+(1-\gamma )x_{k+1}\), where \(\gamma \in [0,1]\subset {\mathbb {R}}\). Namely:

$$ L_d(x_k,x_{k+1})=\frac{1}{2h}(x_{k+1}-x_k)^2-hU(\gamma x_k+(1-\gamma )x_{k+1}). $$

From this discrete Lagrangian, the discrete Euler-Lagrange equations read:

$$ \frac{x_{k+1}-2x_k+x_{k-1}}{h^2}=-\gamma \nabla U(\gamma x_k+(1-\gamma )x_{k+1})-(1-\gamma )\nabla U(\gamma x_{k-1}+(1-\gamma )x_{k}), $$

which are a discretization in finite differences of (4); whereas the flow \(\tilde{F}_{L_d}\) defined by (10) reads:

$$\begin{aligned} \begin{aligned} x_{k+1}&=x_k+hv_k-h^2\gamma \nabla U(\gamma x_k+(1-\gamma )x_{k+1}),\\ v_{k+1}&=v_k-h\nabla U(\gamma x_k+(1-\gamma )x_{k+1}). \end{aligned} \end{aligned}$$
(11)

Using the Taylor expansion and the definition in Sect. 1.1, it is easy to see that the order 2 of this integrator w.r.t. (5) is achieved when \(\gamma =1/2\), i.e. for the midpoint rule, circumstance which is consistent with Theorem 1.

1.4 Linearly Damped Mechanical Systems

The dynamical equations of a mechanical system subject to linear damping are:

$$\begin{aligned} \ddot{x}=-\nabla U(x)-\rho \,\dot{x},\quad x(a)=x_0,\,\,\,\dot{x}(a)=v_0, \end{aligned}$$
(12)

with \(\rho \in {\mathbb {R}}_+\). In the first-order version:

$$\begin{aligned} \begin{aligned} \dot{x}&=v,\\ \dot{v}&=-\nabla U(x)-\rho \,v,\quad x(a)=x_0,\,\,\,v(a)=v_0. \end{aligned} \end{aligned}$$
(13)

There is no Lagrangian function such that (12) are its Euler-Lagrange equations [11]. With our fractional approach [1, 2], explained in Sect. 2, we have designed a restricted variational principle surpassing this issue.

2 Fractional Variational Integrators

2.1 Continuous and Discrete Fractional Derivatives

Given a smooth function \(g:[a,b]\rightarrow {\mathbb {R}}\), the \(\alpha \)-fractional derivatives (Riemann-Liouville version), with \(\alpha \in [0,1]\) are:

$$ D^{\alpha }_{-}g(t)=\frac{1}{\varGamma (1-\alpha )}\frac{d}{dt}\int _a^t(t-\tau )^{-\alpha }g(\tau )d\tau ,\,\, D^{\alpha }_{+}g(t)=-\frac{1}{\varGamma (1-\alpha )}\frac{d}{dt}\int _t^b(\tau -t)^{-\alpha }g(\tau )d\tau , $$

where \(\varGamma (z)\) is the Gamma function [12]. Relevant properties in our approach are

$$\begin{aligned} \int _a^bh(t)D^{\alpha }_{\sigma }g(t)dt=\int _a^b\left( D^{\alpha }_{-\sigma }h(t)\right) g(t)dt,\,\,D^{_{1/2}}_{-}D^{_{1/2}}_{-}g(t)=\dot{g}(t),\,\, \,D^{_{1/2}}_{+}D^{_{1/2}}_{+}g(t)=-\dot{g}(t), \end{aligned}$$
(14)

with \(\sigma =\left\{ -,+\right\} \). On the other hand, for a discrete curve \(\left\{ x_k\right\} _{0:N}\) and the time step \(h\in {\mathbb {R}}_+\), we can define the following discrete \(\alpha \)-fractional derivatives [4]:

$$\begin{aligned} \varDelta _{-}^{\alpha }x_k:=\frac{1}{h^{\alpha }}\sum _{n=0}^k\alpha _nx_{k-n},\,\,\,\quad \quad \varDelta _{+}^{\alpha }x_k:=\frac{1}{h^{\alpha }}\sum _{n=0}^{N-k}\alpha _nx_{k+n}, \end{aligned}$$
(15)

where \(\alpha _n:=-\alpha (1-\alpha )(2-\alpha )\cdots (n-1-\alpha )/n!\) and \(\alpha _0:=1.\) It is proven in [13] (Theorem 2.4) that \(\varDelta _{\pm }^{\alpha }x_k\) is an order 0 approximation (i.e. consistent) of \(D_{\pm }^{\alpha }x(t)\).

2.2 Continuous Restricted Variational Principle

In [1, 2], the fractional state space \(\mathcal {T}{\mathbb {R}}\) is defined, which is a vector bundle over \({\mathbb {R}}\times {\mathbb {R}}\) with coordinates \((x,y,\dot{x},\dot{y},D^{\alpha }_{-}x,D^{\alpha }_{+}y)\) over the point (xy). This is an extension of the usual tangent bundle, including the fractional derivatives after doubling the space of curves (note that we are considering an extra curve y(t)). The necessity of this doubling comes out of the assymetric integration by parts rule in (14). Given this fractional phase space, we define a Lagrangian function \(\mathcal {L}:\mathcal {T}{\mathbb {R}}\rightarrow {\mathbb {R}}\) and the action integral:

$$\begin{aligned} S((x,y))=\int _a^b\mathcal {L}(x(t),y(t),\dot{x}(t),\dot{y}(t),D^{\alpha }_{-}x(t),D^{\alpha }_{+}y(t))\,dt. \end{aligned}$$
(16)

Using a particular set of varied curves \((x(t),y(t))_{\epsilon }:=(x(t),y(t))+\epsilon (\delta x(t),\delta x(t))\) (observe that we are “restricting” the variations of both curves to be equal), where \(\epsilon \in {\mathbb {R}}_+\) and \(\delta x:[a,b]\rightarrow {\mathbb {R}}\) is smooth and defined such that \(\delta x(a)=\delta x(b)=0,\) and considering the extremal condition of the action as \(d/d\epsilon \big |_{\epsilon =0}S((x,y)_{\epsilon })=0,\) we obtain the next result.

Proposition 1

Given the Lagrangian function

$$\begin{aligned} \mathcal {L}(x,y,\dot{x},\dot{y},D^{\alpha }_{-}x,D^{\alpha }_{+}y)= \left( \frac{1}{2}\dot{x}^2-U(x)\right) + \left( \frac{1}{2}\dot{y}^2-U(y)\right) -\rho D^{\alpha }_{-}xD^{\alpha }_{+}y, \end{aligned}$$
(17)

then, a sufficient condition for the extremals of (16) subject to restricted variations \((x,y)_{\epsilon }\) are the equations:

$$\begin{aligned} \begin{aligned} \ddot{x}&=-\nabla U(x)-\rho \, D^{\alpha }_{-}D^{\alpha }_{-}x\rightarrow (\alpha =1/2) \rightarrow \ddot{x}=-\nabla U(x)-\rho \, \dot{x},\\ \ddot{y}&=-\nabla U(y)-\rho \, D^{\alpha }_{+}D^{\alpha }_{+}y \rightarrow (\alpha =1/2) \rightarrow \, \ddot{y}=-\nabla U(y)+\rho \, \dot{y}. \end{aligned} \end{aligned}$$
(18)

The previous equations are the so-called restricted fractional Euler-Lagrange equations in [1, 2] (see these references for the proof) for the particular Lagrangian (17). It can be rigorously proven that the y-system is nothing but the x-system in reversed time (even for more general Lagrangians), and therefore these equations do not imply extra physics. For a general \(\alpha \) we obtain the equations of a mechanical system subject to fractional damping. When \(\alpha \rightarrow 1/2\), according to (14), we recover the dynamics of systems with linear damping (12).

2.3 Discrete Restricted Variational Principle

Given discrete sequences \(x_d=\left\{ x_k\right\} _{0:N}\) and \(y_d=\left\{ y_k\right\} _{0:N}\) and defining \(\dot{x}_k:=(x_{k+1}-x_k)/h\); equiv. \(y_k\); \(x_{k+1/2}:=(x_{k+1}+x_k)/2\) and \(x_{k-1/2}:=(x_{k}+x_{k-1})/2\); equiv. \(y_{k\pm 1/2}\); (we pick the midpoint rule because it provides the maximum order of (11) w.r.t. (5)), the discrete action sum for the fractional problem is

$$\begin{aligned} S_d((x_d,y_d))=\sum _{k=0}^{N-1}h\mathcal {L}(x_{k+1/2},y_{k+1/2},\dot{x}_k,\dot{y}_k, \varDelta _{-}^{\alpha }x_k,\varDelta _{+}^{\alpha }y_k), \end{aligned}$$
(19)

where the discrete fractional derivatives are defined in (15). As in the continuous case, we pick a particular set of restricted discrete variations, namely \((x_d,y_d)_{\epsilon }:=(\left\{ x_k\right\} _{0:N},\left\{ y_k\right\} _{0:N})+\epsilon (\left\{ \delta x_k\right\} _{0:N},\left\{ \delta x_k\right\} _{0:N})\), where \(\left\{ \delta x_k\right\} _{0:N}\) is such that \(\delta x_0=\delta x_N=0\). Considering the extremal condition of the discrete action as \(d/d\epsilon \big |_{\epsilon =0}S_d((x_d,y_d)_{\epsilon })=0\), we get the next result:

Proposition 2

Given the Lagrangian \(\mathcal {L}\) (17), a sufficient condition for the extremals of (19) subject to restricted variations \((x_d,y_d)_{\epsilon }\) is

$$\begin{aligned} \begin{aligned} \frac{x_{k+1}-2x_k+x_k}{h^2}&=-\frac{1}{2}\nabla U(x_{k+1/2})-\frac{1}{2}\nabla U(x_{k-1/2})-\rho \,\varDelta _{-}^{\alpha }\varDelta _{-}^{\alpha }x_k,\\ \frac{y_{k+1}-2y_k+y_k}{h^2}&=-\frac{1}{2}\nabla U(y_{k+1/2})-\frac{1}{2}\nabla U(y_{k-1/2})-\rho \,\varDelta _{+}^{\alpha }\varDelta _{+}^{\alpha }y_k, \end{aligned} \end{aligned}$$
(20)

for \(k=1,\cdots ,N-1.\)

The previous equations are the so-called discrete restricted fractional Euler-Lagrange equations in [1, 2] for the particular Lagrangian (17). In (20) we recognize a discretization in finite differences of (18) for a general \(\alpha \). Moreover, it can be also rigorously proven that the discrete y-system is the discrete x-system in reversed (discrete) time.

3 Order Result

As original result, we explore the local truncation error order of (20) with respect to (13). With that aim, we need to establish an equivalent to (10) in the fractional case. Based on [1, 2], we pick (restricting to the x-system):

$$\begin{aligned} v_k^{-}&=\frac{x_{k+1}-x_k}{h}+\frac{h}{2}\nabla U(x_{k+1/2})+h\rho \,\varDelta _{-}^{\alpha }\varDelta _{-}^{\alpha }x_k,\end{aligned}$$
(21a)
$$\begin{aligned} v_{k+1}^+&=\frac{x_{k+1}-x_k}{h}-\frac{h}{2}\nabla U(x_{k+1/2}). \end{aligned}$$
(21b)

Note that the first two terms in the right hand side of both equations corresponds to (10) for \(L_d(x_k,x_{k+1})=(x_{k+1}-x_k)/2h-h\,U(x_{k+1/2}).\) In addition, observe that the “velocity matching” condition \(v_k^-=v_k^+\) reproduces the discrete dynamics (20). Finally, according to (15) it can be proven [1, 2] that

$$\begin{aligned} \varDelta _{-}^{_{1/2}}\varDelta _{-}^{_{1/2}}x_k=(x_{k}-x_{k-1})/h, \quad k=1,\cdots ,N. \end{aligned}$$
(22)

With these elements, we can establish the following order result

Theorem 2

The local truncation order of the fractional variational integrators for simple mechanical systems (21) when \(\alpha =1/2\), with respect to the continuous dynamics (13), is one.

Proof

First, using Taylor expansions and setting the notation \(x(t_k):=x_k,\,\dot{x}(t_k):=v_k,\,v(t_k):=v_k\), we deliver expressions for \(x(t_{k+1})\) and \(v(t_{k+1})\) in terms of the dynamics (13), namely:

$$\begin{aligned} x(t_k+h)&=x_k+hv_k-\frac{h^2}{2}\nabla U(x_k)-\frac{h^2}{2}\,\rho \,v_k+O(h^3),\end{aligned}$$
(23a)
$$\begin{aligned} v(t_k+h)&=v_k-h\nabla U(x_k)-h\rho v_k-\frac{h^2}{2}\varDelta U(x_k)v_k\\&\qquad \qquad \quad \,\,\,\,\,\, +\frac{h^2}{2}\rho \nabla U(x_k)+\frac{h^2}{2}\rho ^2v_k+O(h^3).\nonumber \end{aligned}$$
(23b)

On the other hand, from (21) we get the integrator:

$$\begin{aligned} x_{k+1}&=x_k+hv_{k+1}+\frac{h^2}{2}\nabla U(x_{k+1/2}),\end{aligned}$$
(24a)
$$\begin{aligned} v_{k+1}&=v_k-h\nabla U(x_{k+1/2})-h\rho \,\varDelta _{-}^{_{1/2}}\varDelta _{-}^{_{1/2}}x_k. \end{aligned}$$
(24b)

Replacing (24b) into (24a) we get

$$ \begin{aligned} x_{k+1}&=x_k+hv_k-\frac{h^2}{2}\nabla U(x_{k+1/2})-h^2\rho \varDelta _{-}^{_{1/2}}\varDelta _{-}^{_{1/2}}x_k\\&=^{_1}x_k+hv_k-\frac{h^2}{2}\nabla U(x_{k+1/2})-h^2\rho \left( \frac{x_k-x_{k-1}}{h}\right) \\&=^{_2}x_k+hv_k-\frac{h^2}{2}\nabla U(x_k)-h^2\rho \,v_k+O(h^3), \end{aligned} $$

where in \(=^{_1}\) we have used (22) and in \(=^{_2}\) we have used \(x_{k+1/2}=x_k+hv_k/2+O(h^2)\) and \((x_k-x_{k-1})/h=v_k+h\nabla U(x_{k-1/2})/2\), according to (21b). Thus, from the last expression and (23a), it follows that \(||x(t_{k+1})-x_{k+1}||=O(h^2).\) From (24b) we get

$$ \begin{aligned} v_{k+1}&=v_k-h\nabla U(x_{k+1/2})-h\rho \,\varDelta _{-}^{_{1/2}}\varDelta _{-}^{_{1/2}}x_k=v_k-h\nabla U(x_{k+1/2})-h\rho \,\left( \frac{x_k-x_{k-1}}{h}\right) \\&=v_k-h\nabla U(x_k)-h\rho v_k-\frac{h^2}{2}\varDelta U(x_k)v_k-\frac{h^2}{2}\rho \nabla U(x_{k-1/2})+O(h^3)\\&=v_k-h\nabla U(x_k)-h\rho v_k-\frac{h^2}{2}\varDelta U(x_k)v_k-\frac{h^2}{2}\rho \nabla U(x_{k})+O(h^3), \end{aligned} $$

where we have taken into account that \(x_{k-1/2}=x_k+O(h)\) and used the same expressions as above for \(x_{k+1/2}\) and \((x_k-x_{k-1})/h\). From this last expression and (23b), we obtain that \(||v(t_{k+1})-v_{k+1}||=O(h^2)\), and the result follows from the definition of local truncation error in Sect. 1.1. \(\square \)

Remark 2

The alternate integrator:

$$ v_k^{-}=\frac{x_{k+1}-x_k}{h}+\frac{h}{2}\nabla U(x_{k+1/2}),\,\,\,\,v_{k+1}^+=\frac{x_{k+1}-x_k}{h}-\frac{h}{2}\nabla U(x_{k+1/2})-h\rho \,\varDelta _{-}^{\alpha }\varDelta _{-}^{\alpha }x_{k+1}, $$

which also reproduces (20) via velocity matching \(v_k^-=v_k^+\), delivers the same result.

4 Conclusions

We prove that the local truncation error order of the fractional variational integrators (21), with respect to the dynamics of linearly damped mechanical systems (13), is one. These integrators are designed in the spirit of variational integrators [5], i.e. by means of the discretization of variational principles, in our case the Hamilton’s principle with restricted variations. Thus, we expect similar behaviour in terms of Theorem 1, i.e. the order of the approximation of the action is equal to the order of the integrator. Our result is not coherent in the fractional case. On the one hand, we pick the midpoint rule approximation \(x(t_k)\simeq (x_k+x_{k+1})/2\), which is the case where the maximum order (2) is achieved for the usual variational integrators and conservative mechanical systems. On the other, the approximation of the fractional derivative that we use, \(\varDelta ^{\alpha }_{-}x_k\), is only consistent (order 0) w.r.t. \(D^{\alpha }_{-}x(t)\) ([13], Theorem 2.4). Thus, the approximation of the action (16) is limited to O(h), whereas the integrator is \(O(h^2).\) This represents an improvement from the expected result, and its numerical demonstration can be found in ([2], §5) through several simulations.