1 Introduction

Fractional calculus and the calculus of variations are subjects that have attracted many scientists over time. To the best of our knowledge, it was F. Riewe who first linked these two topics in his work [20]: the fractional Euler–Lagrange equation was one of the formulas presented therein.

The fractional variational calculus theory has been developed in this century. A good account of works within the subject was published in the last years, see, e.g., Refs. [1, 3, 4, 6, 8, 9, 11, 14]. Despite many works are available in the literature, studies with a Lagrangian depending on derivatives of order greater than one are scarce; we could only find three works [1, 2, 17]. However: (1) the necessary conditions presented in Refs. [1, 2] are derived formally and there is little care with the boundary conditions used in the various problems considered in those papers; (2) in Ref. [17], the theory is developed using Riemann–Liouville fractional derivatives with restrictions in their order.

In this work, we consider and study a fractional variational problems depending on higher order Caputo fractional derivatives. Precisely, we define the functional space in which we search for solutions of the problem and derive a first-order optimality condition, in integral form, and then the Euler–Lagrange equation. We also mention other possible direction on how to generalize the problems depending on only one fractional derivative, namely by considering a sequential fractional derivative (cf. Remark 3.11 below). We have not ever seen such an approach in the literature before. We note that, contrary to the classical case, our working problems could not be solved in general using the results in Ref. [5], namely the Pontryagin maximum principle. Indeed, the Caputo fractional state equation consists of a vector of fractional derivatives all of the same order \(\alpha >0\) and, here, we deal with fractional derivatives of different orders (cf. for example (5) below).

The last section of this work deals with a sufficient condition for the basic problem, i.e., for the fractional variational problem depending on only one fractional derivative. It is hard to find results stating sufficient conditions for existence of minimizers to the functional in question, being the existing ones mostly related with convexity of the Lagrangian function L [7]. In the classical theory of the calculus of variations, one of the deepest results is the Jacobi sufficient (and necessary, by the way) condition [23, Theorem 10.5.1]. An analogue of this result for problems containing fractional derivatives does not exist in the literature; perhaps because the chain rule is heavily used in the classical proof, namely, \((f^2(t))'=2f(t)f'(t)\) (The uninformed reader must be aware that the fractional chain rule does not look so ‘nice’ as above). We note that even the classical Jacobi condition is not easy to use in practice, since the solution of a certain second-order differential equation must be known, which is often impossible. In order to bypass this issue, Garaev derived a sufficient condition for the classical problem based on an inequality [15]. Inspired by this recent work, we worked to obtain a sufficient condition for the fractional (basic) problem. We emphasize though that an analogue of the necessary and sufficient classical Jacobi condition for the fractional variational problem is still an open question.

2 Fractional calculus

In this section, we make a (very) brief introduction to the concepts and results we will use in this work. For a thorough study of the subject, we refer the reader to the monographs [10, 18].

Throughout the text, we always consider two real numbers a and b with \(a<b\). For \(\alpha >0\) and an interval [ab], the Riemann–Liouville left and right fractional integrals of order \(\alpha \) of a function f are defined by

$$\begin{aligned} I_{a^+}^\alpha f(t)=\frac{1}{\Gamma (\alpha )}\int _a^t(t-s)^{\alpha -1}f(s)ds,\quad I_{b^-}^\alpha f(t)=\frac{1}{\Gamma (\alpha )}\int _t^b(s-t)^{\alpha -1}f(s)ds, \end{aligned}$$
(1)

respectively. We also put \(I_{a^+}^0f=I_{b^-}^0f=f\).

Now, let \(n-1<\alpha <n\) with \(n\in \mathbb {N}\). The Riemann–Liouville left and right fractional derivatives of order \(\alpha \) of a function f are defined by

$$\begin{aligned} D^\alpha _{a^+}f(t)=D^nI_{a^+}^{n-\alpha } f(t),\quad D^\alpha _{b^-}f(t)=(-1)^nD^nI_{b^-}^{n-\alpha } f(t), \end{aligned}$$

respectively. Finally, the Caputo left and right fractional derivatives of order \(\alpha \) of a function f are defined by

$$\begin{aligned} {^c}D^\alpha _{a^+}f(t)=D^\alpha _{a^+}\left[ f-\sum _{i=0}^{n-1}\frac{D^if(a)}{i!}(\cdot -a)^i\right] (t),\quad {^c}D^\alpha _{b^-}f(t)=D^\alpha _{b^-}\left[ f-\sum _{i=0}^{n-1}\frac{D^if(b)}{i!}(b-\cdot )^i\right] (t), \end{aligned}$$

respectively.

Remark 2.1

It is well known that, if \(f\in C^n\), then \({^c}D^\alpha _{a^+}f(t)=I_{a^+}^{n-\alpha }f^{(n)}(t)\).

The following formulas will be used repeatedly, so we provide them for the benefit of the reader.

Proposition 2.2

[18, cf. Property 2.1 p.71] Let \(\alpha ,\beta >0\). Then,

$$\begin{aligned} I_{a^+}^\alpha (\cdot -a)^{\beta -1}(t)=\frac{\Gamma (\beta )}{\Gamma (\beta +\alpha )}(t-a)^{\beta +\alpha -1}, \\ D_{a^+}^\alpha (\cdot -a)^{\beta -1}(t)=\frac{\Gamma (\beta )}{\Gamma (\beta -\alpha )}(t-a)^{\beta -\alpha -1}, \\ I_{b^-}^\alpha (b-\cdot )^{\beta -1}(t)=\frac{\Gamma (\beta )}{\Gamma (\beta +\alpha )}(b-t)^{\beta +\alpha -1}, \\ D_{b^-}^\alpha (b-\cdot )^{\beta -1}(t)=\frac{\Gamma (\beta )}{\Gamma (\beta -\alpha )}(b-t)^{\beta -\alpha -1}, \end{aligned}$$

when they are defined.

The following result is [18, Lemma 2.22] but for other functional spaces. For completion, we present a proof here.

Lemma 2.3

Suppose \(0<\alpha \le 1\). If \(f,\ {^c}D_{a^+}^\alpha f\in C[a,b]\), then \(I_{a^+}^\alpha {^c}D_{a^+}^\alpha f(t)=f(t)-f(a)\) on [ab].

Proof

By hypothesis, \(I_{a^+}^\alpha {^c}D_{a^+}^\alpha f{:}{=}g\in C[a,b]\). Applying \(I_{a^+}^{1-\alpha }\) to both sides we obtain (since \({^c}D_{a^+}^\alpha f\) is continuous) \(I_{a^+}^1DI_{a^+}^{1-\alpha }[f-f(a)](t)=I_{a^+}^{1-\alpha }g(t)\) or \(I_{a^+}^{1-\alpha }[f-f(a)](t)=I_{a^+}^{1-\alpha }g(t)\). Applying \({^c}D_{a^+}^{1-\alpha }\) to both sides and using [18, Lemma 2.21], we get \(g(t)=f(t)-f(a)\). The proof is done. \(\square \)

3 Variational problems

For a natural number n and real numbers \(\alpha _i\), \(i\in \{1,\ldots ,n\}\), we define the condition below:

$$\begin{aligned} i-1<\alpha _i\le i,\ i\in \{1,\ldots ,n\}. \end{aligned}$$
(2)

We define the space of functions \(\mathcal {F}_n=\{f\in C^{n-1}[a,b]: {^c}D^{\alpha _n}_{a^+}f(t)\in C[a,b]\}\). The space of variations is defined by \(\mathcal {V}_n=\{f\in \mathcal {F}_n: f^{(j)}(a)=0=f^{(j)}(b), \text{ for } \text{ all } j\in \{0,\ldots ,n-1\}\}\).

It follows some preliminary results, essential to deduce the desired necessary optimality condition.

Lemma 3.1

Let \(\alpha _i\), \(i\in \{1,\ldots ,n-1\}\) be real numbers satisfying (2). For \(f\in C[a,b]\), we have

$$\begin{aligned} (b-t)^{n-\alpha _n} I_{b^-}^{\alpha _n-\alpha _i}[(b-\cdot )^{\alpha _n-n}f](t)\in C[a,b]. \end{aligned}$$

Proof

For \(t<b\) and \(M=\max _{t\in [a,b]}|f(t)|\), we have (recall (2))

$$\begin{aligned} |I_{b^-}^{\alpha _n-\alpha _i}[(b-\cdot )^{\alpha _n-n}f](t)|\le M\frac{ \Gamma (\alpha _n-n+1)}{\Gamma (2\alpha _n-n+1-\alpha _i)}(b-t)^{2\alpha _n-\alpha _i-n}. \end{aligned}$$

Therefore,

$$\begin{aligned} |(b-t)^{n-\alpha _n}I_{b^-}^{\alpha _n-\alpha _i}[(b-\cdot )^{\alpha _n-n}f](t)|\le M\frac{ \Gamma (\alpha _n-n+1)}{\Gamma (2\alpha _n-n+1-\alpha _i)}(b-t)^{\alpha _n-\alpha _i}, \end{aligned}$$

showing that the right hand side of the last inequality is defined at \(t=b\).

We now consider \(a\le c<b\). We want to show that

$$\begin{aligned} \lim _{s\rightarrow c} I_{b^-}^{\alpha _n-\alpha _i}[(b-\cdot )^{\alpha _n-n}f](s)= I_{b^-}^{\alpha _n-\alpha _i}[(b-\cdot )^{\alpha _n-n}f](c). \end{aligned}$$
(3)

We have

$$\begin{aligned}{} & {} |I_{b^-}^{\alpha _n-\alpha _i}[(b-\cdot )^{\alpha _n-n}f] (s)-I_{b^-}^{\alpha _n-\alpha _i}[(b-\cdot )^{\alpha _n-n}f](c)|\\{} & {} \quad =\frac{1}{\Gamma (\alpha _n-\alpha _i)}\left| \int _s^b(t-s)^ {\alpha _n-\alpha _i-1}(b-t)^{\alpha _n-n} f(t)dt- \int _c^b(t-c)^{\alpha _n-\alpha _i-1}(b-t)^{\alpha _n-n} f(t)dt\right| .\\ \end{aligned}$$

Now, we assume that \(b>s>c\), being the proof of the case \(s<c\) analogous (of course that when \(c=a\), then \(s>a\)). We have

$$\begin{aligned}{} & {} \frac{1}{\Gamma (\alpha _n-\alpha _i)}\left| \int _s^b(t-s)^{\alpha _n-\alpha _i-1}(b-t)^{\alpha _n-n} f(t)dt- \int _c^b(t-c)^{\alpha _n-\alpha _i-1}(b-t)^{\alpha _n-n} f(t)dt\right| \\{} & {} \quad =\frac{1}{\Gamma (\alpha _n-\alpha _i)}\left| \int _s^b[(t-s)^{\alpha _n-\alpha _i-1}-(t-c)^{\alpha _n-\alpha _i-1}](b-t)^{\alpha _n-n} f(t)dt\right. \\{} & {} \qquad \left. -\int _c^s(t-c)^{\alpha _n-\alpha _i-1}(b-t)^{\alpha _n-n} f(t)dt\right| {:}{=}A. \end{aligned}$$

Now, \((t-s)^{\alpha _n-\alpha _i-1}-(t-c)^{\alpha _n-\alpha _i-1}\ge 0\ (\le 0)\) accordingly \(\alpha _n-\alpha _i-1<0\) (\(\alpha _n-\alpha _i-1> 0\)). Therefore, suppose first that \(\alpha _n-\alpha _i-1<0\). Then,

$$\begin{aligned} A{} & {} \le \frac{M}{\Gamma (\alpha _n-\alpha _i)}\left[ \int _s^b[(t-s)^{\alpha _n-\alpha _i-1} -(t-c)^{\alpha _n-\alpha _i-1}](b-t)^{\alpha _n-n}dt\right. \\{} & {} \quad \left. +\int _c^s(t-c)^{\alpha _n-\alpha _i-1}(b-t)^{\alpha _n-n}dt\right] \\{} & {} =\frac{M}{\Gamma (\alpha _n-\alpha _i)}\left[ \int _s^b(t-s)^{\alpha _n-\alpha _i-1} (b-t)^{\alpha _n-n}dt-\int _c^b(t-c)^{{\alpha _n-\alpha _i-1}}(b-t)^{\alpha _n-n}dt\right. \\{} & {} \quad \left. +2\int _c^s(t-c)^{{\alpha _n-\alpha _i-1}}(b-t)^{\alpha _n-n}dt\right] \\{} & {} \le M\left[ \frac{\Gamma (\alpha _n-n+1)}{\Gamma (2\alpha _n-n-\alpha _i+1)} (b-s)^{2\alpha _n-n-\alpha _i}-\frac{\Gamma (\alpha _n-n+1)}{\Gamma (2\alpha _n-n-\alpha _i+1)}(b-c)^{2\alpha _n-n-\alpha _i}\right. \\{} & {} \quad \left. +2(b-s)^{\alpha _n-n} \frac{(s-c)^{\alpha _n-\alpha _i}}{\alpha _n-\alpha _i}\right] \end{aligned}$$

which proves (3) for this case. If \(\alpha _n-\alpha _i-1> 0\), then

$$\begin{aligned}{} & {} A\le \frac{M}{\Gamma (\alpha _n-\alpha _i)}\left[ \int _s^b[-(t-s)^{\alpha _n-\alpha _i-1}+(t-c)^{\alpha _n-\alpha _i-1}](b-t)^{\alpha _n-n}dt\right. \\{} & {} \qquad \left. +\int _c^s(t-c)^{\alpha _n-\alpha _i-1}(b-t)^{\alpha _n-n}dt\right] \\{} & {} \quad =\frac{M}{\Gamma (\alpha _n-\alpha _i)}\left[ -\int _s^b(t-s)^{\alpha _n-\alpha _i-1}(b-t)^{\alpha _n-n}dt+\int _s^b(t-c)^{{\alpha _n-\alpha _i-1}}(b-t)^{\alpha _n-n}dt\right. \\{} & {} \qquad \left. +\int _c^s(t-c)^{{\alpha _n-\alpha _i-1}}(b-t)^{\alpha _n-n}dt\right] \\{} & {} \quad = M\left[ \frac{-\Gamma (\alpha _n-n+1)}{\Gamma (2\alpha _n-n-\alpha _i+1)}(b-s)^{2\alpha _n-n-\alpha _i}+\frac{\Gamma (\alpha _n-n+1)}{\Gamma (2\alpha _n-n-\alpha _i+1)}(b-c)^{2\alpha _n-n-\alpha _i}\right] , \end{aligned}$$

and the proof of (3) is done. The result now follows in view that \((b-t)^{n-\alpha _n}\) is continuous on [ab). \(\square \)

Lemma 3.2

(Higher order of Bois–Reymond lemma). Let \(n\in \mathbb {N}\) and \(n-1<\alpha \le n\). Suppose that \(f\in C[a,b]\). If

$$\begin{aligned} \int _a^b(b-t)^{\alpha -n}f(t){^cD_{a^+}^{\alpha }}\eta (t)dt=0,\quad \forall \eta \in \mathcal {V}_n\cap C^n[a,b], \end{aligned}$$

then f is a polynomial of degree at most \(n-1\).

Proof

By Fubini’s theorem and Remark 2.1, we get

$$\begin{aligned} \int _a^b(b-t)^{\alpha -n}f(t){^cD_{a^+}^{\alpha }}\eta (t)dt&=\int _a^b(b-t)^{\alpha -n}f(t)\int _a^t\frac{(t-s)^{n-\alpha -1}}{\Gamma (n-\alpha )}\eta ^{(n)}(s)ds dt\\&=\int _a^b\int _s^b\frac{(t-s)^{n-\alpha -1}}{\Gamma (n-\alpha )}(b-t)^{\alpha -n}f(t)dt\eta ^{(n)}(s)ds\\&=\int _a^bI_{b^-}^{n-\alpha }[(b-\cdot )^{\alpha -n}f](s)\eta ^{(n)}(s)ds. \end{aligned}$$

Since \(n-1<\alpha \le n\) then we know from the proof of Lemma 3.1 that \(I_{b^-}^{n-\alpha }[(b-\cdot )^{\alpha -n}f]\in C[a,b]\). Therefore, by [19, Theorem I], there exist real numbers \(c_0,\ldots ,c_{n-1}\) such that

$$\begin{aligned} I_{b^-}^{n-\alpha }[(b-\cdot )^{\alpha -n}f](t)=c_0+c_{1}(b-t)+\cdots +c_{n-1}(b-t)^{n-1},\quad t\in [a,b]. \end{aligned}$$

Applying the operator \(D_{b^-}^{n-\alpha }\) to both sides of the previous equality and using Proposition 2.2, we get

$$\begin{aligned} (b-t)^{\alpha -n}f(t)=\hat{c}_0(b-t)^{\alpha -n}+\hat{c}_{1}(b-t)^{\alpha -n+1}+\cdots +\hat{c}_{n-1}(b-t)^{\alpha -1},\quad t\in [a,b), \end{aligned}$$

where we now are assuming that \(\alpha \ne n\) (the case \(n=\alpha \) is just the classical one). Finally, we get the desired result for \(t\in [a,b)\) by multiplying both sides of the previous equality by \((b-t)^{n-\alpha }\), and then, at \(t=b\) by the continuity of f. \(\square \)

Lemma 3.3

Let \(n\in \mathbb {N}\backslash \{1\}\) and \(i\in \{1,\ldots ,n-1\}\). Suppose that \(\alpha _i\) satisfy (2). For \(f\in C[a,b]\) and \(\eta \in \mathcal {V}_n\cap C^n[a,b]\), we have

$$\begin{aligned} \int _a^b(b-t)^{\alpha _n-n}f(t){^cD_{a^+}^{\alpha _i}}\eta (t)dt=\int _a^b I_{b^-}^{\alpha _n-\alpha _i}[(b-\cdot )^{\alpha _n-n}f](t){^cD_{a^+}^{\alpha _n}}\eta (t)dt. \end{aligned}$$
(4)

Proof

Using the semigroup property (see, e.g., [18, Lemma 2.3]), we have

$$\begin{aligned} {^cD_{a^+}^{\alpha _i}}\eta =I_{a^+}^{i-\alpha _i}\eta ^{(i)}=I_{a^+}^{i-\alpha _i}I_{a^+}^{n-i}\eta ^{(n)}=I_{a^+}^{n-\alpha _i}\eta ^{(n)}=I_{a^+}^{\alpha _n-\alpha _i}I_{a^+}^{n-\alpha _n}\eta ^{(n)}=I_{a^+}^{\alpha _n-\alpha _i}{^cD_{a^+}^{\alpha _n}}\eta . \end{aligned}$$

Using the fractional integration by parts formula (cf. [18, Lemma 2.7]), we immediately obtain the desired result. \(\square \)

Remark 3.4

We note that for \(\eta \in \mathcal {V}_n\cap C^n[a,b]\), the equality in (4) holds for \(\alpha _i=0\) if one let \(D_{a^+}^0\eta \) denote \(\eta \). Indeed, in that case,

$$\begin{aligned} \int _a^b(b-t)^{\alpha _n-n}f(t)\eta (t)dt=\int _a^b(b-t)^{\alpha _n-n}f(t)I_{a^+}^{\alpha _n}{^c}D_{a^+}^{\alpha _n}\eta (t)dt=\int _a^b I_{b^-}^{\alpha _n}[(b-\cdot )^{\alpha _n-n}f](t){^cD_{a^+}^{\alpha _n}}\eta (t)dt, \end{aligned}$$

where we have used [18, Lemma 2.22].

3.1 Necessary conditions

Let \(n\in \mathbb {N}\) and consider real numbers \(\alpha _i\) satisfying (2). Our working problem is the following:

$$\begin{aligned} \mathcal {L}(y)&=\int _a^b(b-t)^{\alpha _n-n}L(t,y(t),{^c}D^{\alpha _1}_{a^+}y(t),{^c} D^{\alpha _2}_{a^+}y(t),\ldots ,{^c}D^{\alpha _n}_{a^+}y(t))dt, \end{aligned}$$
(5)
$$\begin{aligned} y^{(j)}(a)&=y^{(j)}_a,\ y^j(b)=y^j_b,\quad j\in \{0,\ldots ,n-1\}, \end{aligned}$$
(6)

for \(y\in \mathcal {F}_n\). We assume \(L(t,u,v_1,\ldots ,v_n):[a,b]\times \mathbb {R}^{n+1}\rightarrow \mathbb {R}\) together with its partial derivatives \(L_u\) and \(L_{v_i}\), \(i\in \{1,\dots ,n\}\), to be continuous functions.

Definition 3.5

We say that \(y\in \mathcal {F}_n\) is a local minimum of (5)–(6) if y satisfies (6) and there exists a \(\delta >0\) such that \(\mathcal {L}(y)\le \mathcal {L}(z)\) for all \(z\in \mathcal {F}_n\) (satisfying (6)) with \(\Vert y-z\Vert <\delta \), where \(\Vert \cdot \Vert \) is a norm.

Theorem 3.6

If \(y\in \mathcal {F}_n\) is a local minimum of the problem (5)–(6), then there exists real constants \(c_0,c_1,\ldots ,c_{n-1}\) such that y satisfies the equation

$$\begin{aligned}{} & {} (b-t)^{n-\alpha _n}I_{b^-}^{\alpha _n}[(b-\cdot )^{\alpha _n-n}L_{u}(\bar{\cdot })](t)\nonumber \\{} & {} \quad +\sum _{i=1}^{n-1}(b-t)^{n-\alpha _n}I_{b^-}^{\alpha _n-\alpha _i}[(b-\cdot )^{\alpha _n-n}L_{v_i}(\bar{\cdot })](t)+L_{v_n}(\bar{t})=c_0+c_1t+\cdots +c_{n-1} t^{n-1},\quad t\in [a,b],\nonumber \\ \end{aligned}$$
(7)

where we use the notation \(\bar{t}=(t,y(t),{^c}D^{\alpha _1}_{a^+}y(t),{^c}D^{\alpha _2}_{a^+}y(t),\ldots ,{^c}D^{\alpha _n}_{a^+}y(t))\). We herein assume the usual convention that empty sums equal zero, i.e., \(\sum _{i=1}^0 g(i)=0\) for every sequence g.

Proof

Under our hypothesis on L, \(L_u\), \(L_v\) and taking into account the spaces \(\mathcal {F}_n\) and \(\mathcal {V}_n\) we may conclude that, for a solution \(y\in \mathcal {F}_n\) of (5)–(6) and any (fixed) variation \(\eta \in \mathcal {V}_n\), the quantity \(\frac{d}{d\varepsilon }\mathcal {L}(y+\varepsilon \eta )\) equals zero at \(\varepsilon =0\). Standard calculations then show that

$$\begin{aligned} \int _a^b(b-s)^{\alpha _n-n}[L_u(\bar{s})\eta (s)+L_{v_1}(\bar{s})^cD^{\alpha _1}_{a^+}\eta (s)+\cdots +L_{v_n}(\bar{s})^cD^{\alpha _n}_{a^+}\eta (s)]ds=0,\quad \forall \eta \in \mathcal {V}_n\cap C^n[a,b]. \end{aligned}$$

By hypothesis, each of the functions \(L_u(\bar{s})\) and \(L_{v_i}(\bar{s})\) (\(i\in \{1,\ldots ,n\}\)) is continuous on [ab]. Therefore, by Lemma 3.3 and Remark 3.4, we get

$$\begin{aligned} \int _a^b\left\{ I_{b^-}^{\alpha _n}[(b-\cdot )^{\alpha _n-n}L_u(\bar{\cdot })] (s)+I_{b^-}^{\alpha _n-\alpha _1}[(b-\cdot )^{\alpha _n-n}L_{v_1}(\bar{\cdot })](s)+\ldots \right. \\ \left. +I_{b^-}^{\alpha _n-\alpha _{n-1}}[(b-\cdot )^{\alpha _n-n}L_{v_n}(\bar{\cdot })](s) +L_{v_n}(\bar{s})\right\} {^cD_{a^+}^{\alpha _n}}\eta (s)ds=0, \end{aligned}$$

or

$$\begin{aligned} \int _a^b(b-s)^{\alpha _n-n}\left[ \underbrace{\sum _{i=0}^{n-1}(b-s)^{n-\alpha _n}I_{b^-}^{\alpha _n-\alpha _i}[(b-\cdot )^{\alpha _n-n}L_{v_i}(\bar{\cdot })](s)+L_{v_n}(\bar{s})}_{f(s)}\right] {^cD_{a^+}^{\alpha _n}}\eta (s)ds=0, \end{aligned}$$

where we put \(v_0=u\) and \(\alpha _0=0\). By Lemma 3.1, the function \(f\in C[a,b]\), hence (7) follows by Lemma 3.2.

\(\square \)

Corollary 3.7

(Euler–Lagrange equation). Suppose that \(n-1<\alpha _n<n\). Then, under the conditions of Theorem 3.6, y satisfies the following equation:

$$\begin{aligned} (b-t)^{\alpha _n-n}L_{u}(\bar{t})+\sum _{i=1}^{n}D_{b^-}^{\alpha _i}[(b-\cdot )^{\alpha _n-n}L_{v_i}(\bar{\cdot })](t)=0,\quad t\in [a,b). \end{aligned}$$
(8)

Proof

We start observing that

$$\begin{aligned} \sum _{i=0}^{n-1}c_it^{i}{} & {} =\sum _{i=0}^{n-1}(-1)^{i}c_i(b-t-b)^{i-1}=\sum _{i=0}^{n-1}(-1)^{i}c_i\sum _{k=0}^{i}\left( {\begin{array}{c}i\\ k\end{array}}\right) (-b)^{i-k}(b-t)^k\\{} & {} =\sum _{k=0}^{n-1}\sum _{i=k}^{n-1}(-1)^{i}c_i(-b)^{i-k}(b-t)^k, \end{aligned}$$

where we have used the binomial theorem and [13, Lemma 2.1]. Therefore,

$$\begin{aligned} (b-t)^{\alpha _n-n}\sum _{i=0}^{n-1}c_it^{i}=\sum _{k=0}^{n-1}\bar{c}_{k,n}(b-t)^{\alpha _n-n+k},\quad t<b, \end{aligned}$$

where we put \(\bar{c}_{k,n}=\sum _{i=k}^{n-1}(-1)^{i}c_i(-b)^{i-k}\). By performing the change of variables \(k=n-r\), we get

$$\begin{aligned} (b-t)^{\alpha _n-n}\sum _{i=0}^{n-1}c_{i}t^{i}=\sum _{r=1}^{n}\bar{c}_{n-r,n}(b-t)^{\alpha _n-r}. \end{aligned}$$

Suppose now that y satisfies (7). Then, we have that

$$\begin{aligned}{} & {} I_{b^-}^{\alpha _n}[(b-\cdot )^{\alpha _n-n}L_{u}(\bar{\cdot })](t) +\sum _{i=1}^{n-1}I_{b^-}^{\alpha _n-\alpha _i}[(b-\cdot )^{\alpha _n-n}L_{v_i}(\bar{\cdot })](t)\nonumber \\{} & {} \quad +(b-t)^{\alpha _n-n}L_{v_n}(\bar{t})=\sum _{i=1}^{n}\bar{c}_{n-i,n}(b-t)^{\alpha _n-i},\ t\in [a,b), \end{aligned}$$
(9)

where the real numbers \(\bar{c}_{n-i,n}\) are given above. Since the functions \((b-\cdot )^{\alpha _n-n}L_{u}(\bar{\cdot }),(b-\cdot )^{\alpha _n-n}L_{v_i}(\bar{\cdot })\in L_1[a,b]\) and \(D^{\alpha _n}_{b^-}(b-t)^{\alpha _n-i}=0\), we conclude the desired result, after applying \(D_{b^-}^{\alpha _n}\) to both sides of (9). \(\square \)

Remark 3.8

From the proof of Corollary 3.7, it is easily seen that if \(\alpha _i=i\) for all \(i\in \{1,\ldots ,n\}\), then we may remove the restriction on the Euler–Lagrange equation at \(t=b\) and (8) becomes

$$\begin{aligned} L_{u}(\bar{t})+\sum _{i=1}^{n}(-1)^iD^iL_{v_i}(\bar{t})=0,\quad t\in [a,b], \end{aligned}$$
(10)

where \(\bar{t}=(t,y(t),y'(t),y''(t),\ldots ,y^{(n)}(t))\). The previous equation is known by the higher order Euler–Lagrange equation and may be found, e.g., in [23, Formula (3.9)].

Remark 3.9

Equation (8) generalizes a result of [12], i.e., if we let \(n=1\) in Corollary 3.7, then we get [12, Corollary 3.1].

Example 3.10

For \(1<\alpha \le 2\), consider the problem of finding \(y\in \mathcal {F}_2\) such that

$$\begin{aligned} \mathcal {L}(y)=\int _0^1(1-t)^{\alpha -2}({^c}D^\alpha _{0^+}y(t))^2dt\rightarrow \min ,\quad y(0)=y(1)=0,\ y'(0)=y'(1)=1. \end{aligned}$$
(11)

By Theorem 3.6, there exist two constants \(c_0\) and \(c_1\) such that

$$\begin{aligned} 2{^c}D_{0^+}^{\alpha }y(t)=c_0+c_1t,\quad t\in [0,1]. \end{aligned}$$

Applying the operator \(I_{0^+}^{\alpha }\) to both sides of the previous equality and using the boundary conditions we obtain, after some calculations,

$$\begin{aligned} y(t)=t-(1+\alpha ) t^{\alpha }+\alpha t^{1+\alpha }. \end{aligned}$$

Observe that \(y''(0)\) is not defined when \(\alpha <2\), hence the only candidate (for a solution of (11)) \(y\notin C^{2}[0,1]\).

Remark 3.11

The fact that, in general, for two positive orders \(\alpha ,\beta \), \(^cD_{a^+}^\alpha {^cD}_{a^+}^\beta \ne {^cD}_{a^+}^{\alpha +\beta }\) (cf. [10, Remark 3.4]), gives raise to several ways of generalizing the variational problem containing derivatives of higher order. For example, we may consider the problem (for the sake of exposition we now consider two fractional orders)

$$\begin{aligned} \mathcal {L}(y)=\int _a^b(b-t)^{\alpha _1+\alpha _2-2}L(t,&y(t),{^c}D^{\alpha _1}_{a^+}y(t),{^c}D^{\alpha _2}_{a^+}{^c}D^{\alpha _1}_{a^+}y(t)dt\rightarrow \min , \end{aligned}$$
(12)
$$\begin{aligned} y(a)=y_a,&\ y(b)=y_b,\quad {^c}D^{\alpha _1}_{a^+}y(a)=y'_a,\ y'(b)=y'_b, \end{aligned}$$
(13)

where we assume \(0<\alpha _1,\alpha _2\le 1\) and \(1<\alpha _1+\alpha _2\le 2\) and, again, \(L(t,u,v_1,v_2):[a,b]\times \mathbb {R}^{3}\rightarrow \mathbb {R}\) together with its partial derivatives \(L_u\) and \(L_{v_i}\), \(i\in \{1,2\}\), are continuous functions. In such a problem we seek solutions in the space of functions \(\mathbb {F}=\{f\in C[a,b]:\{{^c}D^{\alpha _1}_{a^+}f,{^c}D^{\alpha _2}_{a^+}{^c}D^{\alpha _1}_{a^+}f\}\in C[a,b]\}\). We may then follow the same steps as in Theorem 3.6, taking smooth variations (so that \(^cD_{a^+}^{\alpha _2} {^cD}_{a^+}^{\alpha _1}\eta ={^cD}_{a^+}^{\alpha _2+\alpha _1}\eta \)), and deduce that if \(y\in \mathbb {F}\) satisfies (12)–(13), then

$$\begin{aligned}{} & {} (b-t)^{2-(\alpha _1+\alpha _2)}I_{b^-}^{\alpha _1+\alpha _2}[(b-\cdot )^{\alpha _1 +\alpha _2-2}L_{u}(\bar{\cdot })](t)\nonumber \\{} & {} \quad +(b-t)^{2-(\alpha _1+\alpha _2)}I_{b^-}^{\alpha _2}[(b-\cdot )^{\alpha _1+\alpha _2-2} L_{v_1}(\bar{\cdot })](t)+L_{v_2}(\bar{t})=c_0+c_1t,\quad t\in [a,b], \end{aligned}$$
(14)

where we use the notation \(\bar{t}=(t,y(t),{^c}D^{\alpha _1}_{a^+}y(t),{^c}D^{\alpha _2}_{a^+}{^c}D^{\alpha _1}_{a^+}y(t))\).

For example, if we consider the analogue problem to (11),

$$\begin{aligned} \mathcal {L}(y)=\int _0^1(1-t)^{\alpha _1+\alpha _2-2}({^c}D^{\alpha _2}_{0^+}{^c}D^{\alpha _1}_{0^+}y(t))^2dt\rightarrow \min ,\quad y(0)=y(1)=0,\ D^{\alpha _1}_{0^+}y(0)=y'(1)=1, \end{aligned}$$

then, using (14), we obtain

$$\begin{aligned} {^c}D^{\alpha _2}_{0^+}{^c}D^{\alpha _1}_{0^+}y(t)=c_0+c_1t,\quad t\in [0,1], \end{aligned}$$
(15)

for some constants \(c_0,c_1\in \mathbb {R}\). Applying Lemma 2.3 twice on (15), we finally deduce that

$$\begin{aligned} y(t)=\frac{t^{\alpha _1}}{\Gamma (\alpha _1+1)}+\tilde{c}_0t^{\alpha _1+\alpha _2}+\tilde{c}_1t^{\alpha _1+\alpha _2+1},\quad t\in [0,1]. \end{aligned}$$

Observe that since \((t^{\alpha _1})'\) is not defined at zero for \(\alpha _1<1\), then \({^cD}_{0^+}^{\alpha _1+\alpha _2}t^{\alpha _1}\) does not exist.

3.2 A sufficient condition

We now consider \(n=1\) and \(0<\alpha \le 1\). Then, the basic fractional variational problem is the following:

$$\begin{aligned} \mathcal {L}(y)=&\int _a^b(b-t)^{\alpha -1}L(t,y(t),{^c}D^\alpha _{a^+}y(t))dt, \end{aligned}$$
(16)
$$\begin{aligned}&y(a)=y_a,\quad y(b)=y_b,\quad y_a,\ y_b\in \mathbb {R}, \end{aligned}$$
(17)

The first- and second-order necessary optimality conditions for the problem (16)–(17) are given by (for L(tuv), we denote by \(L_u\), \(L_{uv}\) and \(L_{vv}\) the first- and second-order partial derivatives, which we assume from now on to exist and to be continuous),

$$\begin{aligned} (b-t)^{1-\alpha }I_{b^-}^\alpha g(t)+L_v(t,y(t),{^c}D^\alpha _{a^+}y(t))=k,\quad k\in \mathbb {R},\quad t\in [a,b], \end{aligned}$$
(18)

where \( g_y(s)=(b-s)^{\alpha -1} L_u(s,y(s),{^c}D^\alpha _{a^+}y(s))\) and

$$\begin{aligned} L_{vv}(t,y(t),{^c}D^\alpha _{a^+}y(t))\ge 0,\quad t\in [a,b], \end{aligned}$$
(19)

respectively (cf. [6, 12]).

Remark 3.12

Conditions (18) and (19) are called fractional Euler–Lagrange equation (in integral form) and fractional Legendre’s necessary condition, respectively.

It follows the main result of this section.

Theorem 3.13

Suppose that \(0<\alpha \le 1\) and let \(y\in \mathcal {F}_1\) be a solution of the Euler–Lagrange equation (18) and satisfy (17). Assume that

  1. (i)

    \(L_{uv}(\overline{t})\ge 0\) and \(L_{vv}(\overline{t})>0\), for all \(t\in [a,b]\),

  2. (ii)

    The function \((b-\cdot )^{\alpha -1}L_{uv}(\overline{\cdot })\in I_{b^-}^\alpha (L_1[a,b])=\{f:f=I_{b^-}^\alpha \phi ,\ \phi \in L_1[a,b]\}\) and

    $$\begin{aligned} L_{uu}(\overline{t})+(b-t)^{1-\alpha }D_{b^-}^\alpha [(b-\cdot )^{\alpha -1}L_{uv}(\overline{\cdot })](t)\ge c>0,\quad t\in [a,b]. \end{aligned}$$

Then, the problem given by (16)–(17) has a local minimum at y.

Proof

Let \(\eta \in \mathcal {V}_1\). We start by noticing that we may proceed as in [16, Section 25] to obtain

$$\begin{aligned}{} & {} \mathcal {L}(y+\eta )-\mathcal {L}(y) =\delta \mathcal {L}(y,\eta ) \nonumber \\{} & {} \quad +\frac{1}{2}\left( \int _a^b(b-t)^{\alpha -1}\left[ L_{uu}(\overline{t})\eta ^2(t)+2L_{uv}(\overline{t})\eta (t){^c}D^\alpha _{a^+}\eta (t)+L_{vv}(\overline{t})({^c}D^\alpha _{a^+}\eta )^2(t)\right] dt+\varepsilon \right) , \end{aligned}$$
(20)

where \(\delta \mathcal {L}(y,\eta )\) is the first variation, which is given by (cf. (1) in [6, Proposition 3.1])

$$\begin{aligned} \delta \mathcal {L}(y,\eta )=\frac{1}{\Gamma (\alpha )}\int _a^b(b-t)^{\alpha -1} [L_u(\overline{t})\eta (t)+L_v(\overline{t}){^cD}_{a^+}^{\alpha }\eta (t)]dt, \end{aligned}$$
(21)

and

$$\begin{aligned} \varepsilon =\int _a^b(b-t)^{\alpha -1}\left[ \varepsilon _1(t)\eta ^2(t)+\varepsilon _2(t)\eta (t){^c}D^\alpha _{a^+} \eta (t)+\varepsilon _3(t)({^c}D^\alpha _{a^+}\eta )^2(t)\right] dt. \end{aligned}$$

Here, \(\varepsilon _1,\varepsilon _2,\varepsilon _3\rightarrow 0\) as \(\Vert \eta \Vert _{\alpha }\rightarrow 0\), where

$$\begin{aligned} \Vert \eta \Vert _{\alpha }=\max _{t\in [a,b]}|\eta (t)|+\max _{t\in [a,b]}|{^c}D^\alpha _{a^+}\eta (t))|. \end{aligned}$$

Observe that \(\delta \mathcal {L}(y,\eta )=0\). Indeed, (21) transforms into (cf. the details within the proof of [12, Theorem 3.1])

$$\begin{aligned} \delta \mathcal {L}(y,\eta )=\frac{1}{\Gamma (\alpha )}\int _a^b[I_{b^-}^\alpha g_y(t)+(b-t)^{\alpha -1}L_v(\overline{t})]{^cD}_{a^+}^{\alpha }\eta (t)dt, \end{aligned}$$

or (recall (18))

$$\begin{aligned} \delta \mathcal {L}(y,\eta )=\frac{1}{\Gamma (\alpha )}\int _a^bk(b-t)^{\alpha -1}{^cD}_{a^+}^{\alpha }\eta (t)dt, \end{aligned}$$

which then equals to \(kI_{a^+}^{\alpha }{^cD}_{a^+}^{\alpha }\eta (b)\) and \(I_{a^+}^{\alpha }{^cD}_{a^+}^{\alpha }\eta (b)=0\) by Lemma 2.3.

Now, by [22, Theorem 2], we infer that \({^c}D^\alpha _{a^+}\eta ^2\in C[a,b]\) and

$$\begin{aligned} \eta (t){^c}D^\alpha _{a^+}\eta (t)\ge \frac{1}{2}{^c}D^\alpha _{a^+}\eta ^2(t),\quad t\in [a,b]. \end{aligned}$$

Hence,

$$\begin{aligned} 2L_{uv}(\overline{t})\eta (t){^c}D^\alpha _{a^+}\eta (t)\ge L_{uv}(\overline{t}){^c}D^\alpha _{a^+}\eta ^2(t). \end{aligned}$$

By [21, Corollary 2 p. 46], we obtain

$$\begin{aligned} \int _a^b(b-t)^{\alpha -1}2L_{uv}(\overline{t})\eta (t){^c}D^\alpha _{a^+}\eta (t)dt&\ge \int _a^b(b-t)^{\alpha -1}L_{uv}(\overline{t}){^c}D^\alpha _{a^+}\eta ^2(t)dt\\&=\int _a^bD_{b^-}^\alpha [(b-\cdot )^{\alpha -1}L_{uv}(\overline{\cdot })](t)\eta ^2(t)dt. \end{aligned}$$

Therefore,

$$\begin{aligned}{} & {} \int _a^b(b-t)^{\alpha -1}\left[ L_{uu}(\overline{t})\eta ^2(t)+2L_{uv}(\overline{t})\eta (t){^c}D^\alpha _{a^+}\eta (t)+L_{vv}(\overline{t})({^c}D^\alpha _{a^+}\eta )^2(t)\right] dt\nonumber \\{} & {} \quad \ge \int _a^b\left[ L_{uu}(\overline{t})+(b-t)^{1-\alpha }D_{b^-}^\alpha [(b-\cdot )^{\alpha -1}L_{uv}(\overline{\cdot })](t)\right] (b-t)^{\alpha -1}\eta ^2(t)+(b-t)^{\alpha -1}L_{vv}(\overline{t})({^c}D^\alpha _{a^+}\eta )^2(t)dt\nonumber \\ \end{aligned}$$
(22)

Let \(d=\min _{t\in [a,b]}L_{vv}(\overline{t})>0\) and define \(m=\min \{c,d\}\). Then, (22) is greater or equal than

$$\begin{aligned} m\int _a^b(b-t)^{\alpha -1}[\eta ^2(t)+({^c}D^\alpha _{a^+}\eta )^2(t)]dt. \end{aligned}$$

On the other hand, by applying Young’s inequality, we get

$$\begin{aligned} |\varepsilon |&\le \gamma \int _a^b(b-t)^{\alpha -1}\left[ \eta ^2(t)+\frac{\eta ^2(t)+({^c}D^\alpha _{a^+}\eta )^2(t)}{2}+({^c}D^\alpha _{a^+}\eta )^2(t)\right] dt\\&=\frac{3\gamma }{2}\int _a^b(b-t)^{\alpha -1}\left[ \eta ^2(t)+({^c}D^\alpha _{a^+}\eta )^2(t)\right] dt \end{aligned}$$

where \(|\varepsilon _1(t)|\le \gamma ,\ |\varepsilon _2(t)|\le \gamma ,\ |\varepsilon _3(t)|\le \gamma \). From (20), we conclude that

$$\begin{aligned} \mathcal {L}(y+\eta )-\mathcal {L}(y)\ge \left( m-\frac{3\gamma }{2}\right) \int _a^b(b-t)^{\alpha -1}\left[ \eta ^2(t)+({^c}D^\alpha _{a^+}\eta )^2(t)\right] dt\ge 0, \end{aligned}$$

because \(\gamma \) can be chosen arbitrarily small for all sufficiently small \(\Vert \eta \Vert _{\alpha }\). The proof is done. \(\square \)

Example 3.14

Let \(\alpha \in (0,1]\). Consider the Lagrangian given by \(L_{\alpha }(t,u,v)=v^2+(1-t)^\alpha uv\), for \((t,u,v)\in [0,1]\times \mathbb {R}^2\).

We have

$$\begin{aligned} L_u=(1-t)^\alpha v,\quad L_v=2v+(1-t)^\alpha u,\quad L_{uu}=0,\quad L_{uv}=(1-t)^\alpha ,\quad L_{vv}=2. \end{aligned}$$

Assume that \(y\in \mathcal {F}_1\) satisfies the Euler–Lagrange equation (18), i.e.,

$$\begin{aligned} (1-t)^{1-\alpha }I^\alpha _{1^-}[(1-\cdot )^{2\alpha -1}{^c}D^\alpha _{0^+}y](t)+2{^c}D^\alpha _{0^+}y(t)+(1-t)^\alpha y(t)=k. \end{aligned}$$
(23)

The conditions in i. of Theorem 3.13 are trivially satisfied. By Proposition 2.2, \((1-\cdot )^{\alpha -1}L_{uv}(\overline{\cdot })\in I_{1^-}^\alpha (L_1[a,b])\) and

$$\begin{aligned} L_{uu}(\overline{t})+(1-t)^{1-\alpha }D_{1^-}^\alpha [(1-\cdot )^{\alpha -1} L_{uv}(\overline{\cdot })](t)=\frac{\Gamma (2\alpha )}{\Gamma (\alpha )}>0, \end{aligned}$$

whence ii. of Theorem 3.13 is also satisfied.

Therefore, since \(y=0\) satisfies (23), then it furnishes a minimum to

$$\begin{aligned} \mathcal {L}(y)=&\int _0^1(1-t)^{\alpha -1} [({^c}D^\alpha _{0^+}y(t))^2+(1-t)^\alpha y(t){^c}D^\alpha _{0^+}y(t)]dt,\\&y(0)=0,\quad y(1)=0. \end{aligned}$$

We note that the function L defined above is not (jointly) convex (cf. [23, Theorem 10.7.2]) because \(L_{uu}L_{vv}-L^2_{uv}=-(1-t)^{2\alpha }<0\) for \(t<1\). Hence, one cannot rely on such convexity results to show that the problem has solutions, even when \(\alpha =1\).

4 Conclusions

In this work, we derived first-order optimality conditions for variational problems depending on higher order fractional derivatives. We considered formulations with fixed endpoint conditions. It is clear that using common techniques, we may obtain transversality conditions, deduce optimality conditions for isoperimetric problems (depending on higher order fractional derivatives), and so on (see, e.g., [3, 6]).

As mentioned in the Introduction, the problem (5)–(6) cannot be solved using the optimal control theory developed in Ref. [5]. It would definitely be interesting to prove a Pontryagin maximum principle that could be applied to derive optimality conditions for (5)–(6), in analogy with the classical case.

We also obtained a result containing a sufficient condition for the simplest fractional variational problem to have solutions. The result is pertinent because in the fractional setting, we are unaware of a Jacobi-type result analogous to the classical setting. However, we note that solving fractional Euler–Lagrange equations analytically is in most of the cases impossible, being a good research direction, the investigation of conditions ensuring existence of solutions to such type of equations.