1 Introduction

The generalized variational calculus proposed by Herglotz [7, 8] deals with an initial value problem

$$\begin{gathered} \dot{z}(t)=L \bigl(t,x(t),\dot{x}(t),z(t) \bigr), \quad t \in[a,b], \end{gathered}$$
(1)
$$\begin{gathered} z(a)=\gamma, \quad\gamma \in\mathbb{R}, \end{gathered}$$
(2)

and consists in determining trajectories x that extremize (minimize or maximize) the value z(b). Observe that (1) represents a family of differential equations: for each function x a different differential equation arises. Therefore, z depends on x, a fact that can be made explicit by writing \(z(t, x(t), \dot{x}(t))\) or z[x;t], but for brevity and convenience of notation it is usual to write simply z(t). The problem reduces to the classical fundamental problem of the calculus of variations (see, e.g., [1]) if the Lagrangian L does not depend on the variable z: if

$$\begin{gathered} \dot{z}(t)=L\bigl(t,x(t),\dot{x}(t)\bigr), \quad t \in[a,b], \\ z(a)=\gamma, \quad\gamma\in\mathbb{R}, \end{gathered}$$

then we obtain the classical variational problem

$$ z(b)=\int_a^b \tilde{L} \bigl(t,x(t),\dot{x}(t)\bigr)dt \longrightarrow \mathrm {extr}, $$
(3)

where

$$ \tilde{L}(t,x,\dot{x})=L(t,x,\dot{x})+\frac{\gamma}{b-a}. $$

Herglotz proved that a necessary condition for a trajectory x to be an extremizer of the generalized variational problem z(b)→extr subject to (1)–(2) is given by

$$ \begin{aligned}[b] &\frac{\partial L}{\partial x} \bigl(t,x(t),\dot{x}(t),z(t) \bigr)-\frac {d}{dt}\frac{\partial L}{\partial\dot{x}} \bigl(t,x(t),\dot {x}(t),z(t) \bigr) \\ &\quad{}+\frac{\partial L}{\partial z} \bigl(t,x(t),\dot{x}(t),z(t) \bigr)\frac{\partial L}{\partial\dot{x}} \bigl(t,x(t),\dot{x}(t),z(t) \bigr) = 0, \end{aligned} $$
(4)

t∈[a,b]. This equation is known as the generalized Euler–Lagrange equation [6, 7, 12]. Observe that for the classical problem of the calculus of variations (3) one has \(\frac{\partial L}{\partial z}=0\), and the differential equation (4) reduces to the classical Euler–Lagrange equation:

$$ \frac{\partial L}{\partial x} \bigl(t,x(t),\dot{x}(t) \bigr) -\frac {d}{dt} \frac{\partial L}{\partial\dot{x}} \bigl(t,x(t),\dot{x}(t) \bigr) =0. $$

The variational problem of Herglotz was the basis of the Ph.D. thesis [2]. The main goal of this thesis, done under supervision of Ronald B. Guenther, was to generalize the well known Noether’s theorems (see, e.g., [13]) to problems of Herglotz type [35]. As reported in [3, 4], unlike the classical variational principle, the variational principle of Herglotz gives a variational description of nonconservative processes, even when the Lagrangian is autonomous. For the importance to include nonconservativism in the calculus of variations, we refer the reader to the recent book [9].

In this paper we generalize Herglotz’s problem by considering the following higher-order variational problem.

Problem

(P)

Determine the trajectories \(x\in C^{2n}([a,b], \mathbb{R})\) that extremize the value of the functional z[x;b],

$$z(b) \longrightarrow \mathrm {extr}, $$

where z satisfies the differential equation

$$ \dot{z}(t)=L \bigl(t,x(t),\dot{x}(t), \ldots,x^{(n)}(t),z(t) \bigr), \quad t \in[a,b], $$
(5)

subject to the initial condition

$$ z(a)=\gamma, $$
(6)

where γ is a fixed real number. The Lagrangian L is assumed to satisfy the following hypotheses:

(H1):

L is a \(C^{1}(\mathbb{R}^{n+3}, \mathbb{R})\) function;

(H2):

functions \(t \mapsto\frac{\partial L}{\partial x^{(j)}}(t,x(t),\dot{x}(t),\ldots, x^{(n)}(t), z(t))\) and \(t \mapsto \frac{\partial L}{\partial z}(t, x(t),\dot{x}(t),\ldots , x^{(n)}(t),z(t))\), j=0,…,n, are differentiable up to order n for any admissible trajectory x.

Clearly, Problem (P) generalizes the classical higher-order variational problem: if the Lagrangian L is independent of z, then

$$\begin{gathered} \dot{z}(t)=L \bigl(t,x(t),\dot{x}(t),\ldots, x^{(n)}(t) \bigr), \quad t \in[a,b], \\ z(a)=\gamma, \quad\gamma\in\mathbb{R}, \end{gathered}$$

which implies that the problem under consideration is

$$ z(b)=\int_a^b \tilde{L} \bigl(t,x(t), \dot{x}(t),\ldots,x^{(n)}(t) \bigr)dt\longrightarrow \mathrm {extr}, $$

where

$$ \tilde{L} \bigl(t,x,\dot{x},\ldots,x^{(n)} \bigr)=L \bigl(t,x,\dot {x}, \ldots,x^{(n)} \bigr)+\frac{\gamma}{b-a}. $$

The paper is organized as follows. In Sect. 2 we recall the necessary results from the classical calculus of variations. Our results are then proved in Sect. 3: in Sect. 3.1 we obtain the generalized Euler–Lagrange equation for Problem (P) in the class of functions \(x \in C^{2n}([a,b],\mathbb {R})\) satisfying given boundary conditions

$$ \begin{aligned} x(a)&= \alpha_0,\ldots,x^{(n-1)}(a)=\alpha_{n-1}, \\ x(b)&=\beta_0,\ldots,x^{(n-1)}(b)=\beta_{n-1}, \end{aligned} $$
(7)

where α 0,…,α n−1, and β 0,…,β n−1 are given real numbers. The transversality conditions (or natural boundary conditions) for Problem (P) are obtained in Sect. 3.2. We end with Sect. 4, presenting some illustrative examples of application of the new results.

The results of the paper are trivially generalized for the case of vector functions \(x: [a,b] \rightarrow\mathbb{R}^{m}\), \(m \in\mathbb {N}\), but for simplicity of presentation we restrict ourselves to the scalar case. Along the text, we use the standard conventions \(x^{(0)} = \frac{d^{0} x}{dt^{0}} = x\) and \(\sum_{k=1}^{j}\varUpsilon(k)=0\) whenever j=0.

2 Preliminary Results

We recall some results of the classical calculus of variations that are useful in the sequel.

Definition 1

We say that \(\eta\in C^{2n} ([a,b], \mathbb{R} )\) is an admissible variation for Problem (P) subject to boundary conditions (7) if, and only if, η(a)=η(b)=⋯=η (n−1)(a)=η (n−1)(b)=0.

Lemma 1

(Higher-order fundamental lemma of the calculus of variations—cf. [10])

Let f 0, …, \(f_{n} \in C([a,b], \mathbb{R})\). If

$$ \int_{a}^{b} \Biggl(\sum _{i=0}^{n}f_i(t) \eta^{(i)}(t) \Biggr) dt=0 $$

for all admissible variations η of Problem (P) subject to boundary conditions (7), then

$$ \sum_{i=0}^{n} (-1)^i f_i^{(i)}(t) =0,\quad t \in[a,b]. $$

Lemma 2

(Higher-order integration by parts formulas—cf. [11])

Let \(n \in\mathbb{N}\), \(a,b \in\mathbb{R}\), a<b, and \(f,g \in C^{n} ([a,b], \mathbb{R} )\). The following n equalities hold:

$$\int^b_af(t)g^{(i)}(t)dt= \Biggl[ \sum^{i-1}_{k=0}(-1)^kf^{(k)}(t)g^{(i-1-k)}(t) \Biggr]^b_a + (-1)^i\int ^b_af^{(i)}(t)g(t)dt, $$

i=1,…,n.

3 Main Results

For simplicity of notation, we introduce the operator 〈⋅,⋅〉 n , \(n \in\mathbb{N}\), defined by

$$ \langle x, z \rangle_n (t):= \bigl(t,x(t),\dot{x}(t), \ldots, x^{(n)}(t),z(t) \bigr). $$

3.1 Generalized Euler–Lagrange Equation

The following result gives a necessary condition of Euler–Lagrange type for an admissible function x to be an extremizer of the functional z[x;b], where z is defined by (5), (6) and (7).

Theorem 1

(Generalized higher-order Euler–Lagrange equation)

If x is a solution to Problem (P) subject to the boundary conditions (7), then x satisfies the generalized Euler–Lagrange equation

$$ \sum ^{n}_{j=0}(-1)^j \frac{d^j}{dt^j} \biggl(\lambda(t)\frac{\partial L}{\partial x^{(j)}} \langle x, z \rangle_n (t) \biggr)=0,\quad t \in[a,b], $$
(8)

where \(\displaystyle\lambda(t):=e^{-\int^t_a\frac{\partial L}{\partial z}\langle x, z \rangle_n(\theta)d\theta}\).

Proof

Suppose that x is a solution of (P) subject to (7), and let \(\eta\in C^{2n}([a,b], \mathbb{R})\) be an admissible variation such that η (n)(a)=0. Let ϵ be an arbitrary real number. Define \(\zeta:[a,b] \rightarrow\mathbb{R}\) by

$$\begin{aligned} \zeta(t) :=&\frac{d}{d\epsilon}z[x+\epsilon\eta; t]\biggm\vert _{\epsilon=0} \\ =&\frac{d}{d\epsilon}z \bigl(t, x(t)+\epsilon\eta(t), \dot {x}(t)+\epsilon\dot{ \eta}(t),\ldots,x^{(n)}(t)+\epsilon\eta ^{(n)}(t) \bigr)\biggm\vert _{\epsilon=0}. \end{aligned}$$

Obviously, ζ(a)=0. Since x is a minimizer (resp., maximizer), we have

$$\begin{aligned} &z \bigl(b, x(b) +\epsilon\eta(b), \dot{x}(b) + \epsilon\dot{\eta}(b), \ldots,x^{(n)}(b) + \epsilon\eta^{(n)}(b) \bigr) \\ &\quad{}\geq(\text{resp. } \leq) \, z \bigl(b, x(b), \dot{x}(b), \ldots, x^{(n)}(b) \bigr). \end{aligned}$$

Hence, \(\zeta(b)=\frac{d}{d\epsilon} z[ x+\epsilon\eta;b]\vert _{\epsilon=0}=0\). Because

$$ \begin{aligned} \dot{\zeta}(t)&=\frac{d}{dt}\frac{d}{d\epsilon}z \bigl(t, x(t)+\epsilon \eta(t), \dot{x}(t)+\epsilon\dot{\eta}(t), \ldots,x^{(n)}(t)+\epsilon\eta ^{(n)}(t) \bigr)\biggm\vert _{\epsilon=0} \\ &=\frac{d}{d\epsilon}\frac{d}{dt}z \bigl(t, x(t)+\epsilon\eta(t), \dot{x}(t) +\epsilon\dot{\eta}(t),\ldots,x^{(n)}(t)+\epsilon \eta^{(n)}(t) \bigr)\biggm\vert _{\epsilon=0} \\ &=\frac{d}{d\epsilon} L\langle x+\epsilon\eta, z \rangle_n (t)\biggm\vert _{\epsilon=0}, \end{aligned} $$

we conclude that

$$ \begin{aligned} \dot{\zeta}(t)&= \sum_{k=0}^{n} \biggl(\frac{\partial L}{\partial x^{(k)}}\langle x, z \rangle_n (t) \eta^{(k)}(t) \biggr)+\frac{\partial L}{\partial z}\langle x, z \rangle_n(t)\frac{d}{d\epsilon}z[x+\epsilon \eta;t] \biggm\vert _{\epsilon=0} \\ &= \sum_{k=0}^{n} \biggl( \frac{\partial L}{\partial x^{(k)}}\langle x, z \rangle_n (t)\eta^{(k)}(t) \biggr)+\frac{\partial L}{\partial z}\langle x, z \rangle_n (t)\zeta(t). \end{aligned} $$

Thus, ζ satisfies a first order linear differential equation whose solution is found according to

$$ \dot{y}+Py=Q\quad \Longleftrightarrow\quad e^{-\int_a^t P(\theta) d\theta }y(t)-y(a) =\int _a^t{e^{-{\int_a^{\tau}{P(\theta)}d\theta}}Q(\tau) d\tau}. $$

Therefore,

$$\begin{aligned} e^{-\int^t_a{\frac{\partial L}{\partial z}}\langle x, z \rangle_n (\theta) d\theta}\zeta(t) - \zeta(a) =\int^t_a e^{-\int^{\tau}_a{\frac{\partial L}{\partial z}\langle x, z \rangle_n (\theta)}d\theta} \Biggl( \sum_{j = 0}^{n}\frac {\partial L}{\partial x^{(j)}}\langle x, z \rangle_n (\tau)\, \eta ^{(j)}(\tau) \Biggr)d\tau. \end{aligned}$$

Denoting \(\lambda(t):=e^{ -\int^{t}_{a}\frac{\partial L}{\partial z}\langle x, z \rangle_{n} (\theta)d\theta}\), we get

$$ \lambda(t)\zeta(t)-\zeta(a) =\int^t_a \lambda(\tau) \Biggl(\sum^n_{j=0} \frac{\partial L}{\partial x^{(j)}}\langle x, z \rangle_n (\tau )\eta^{(j)}( \tau) \Biggr) d\tau. $$

In particular, for t=b, we have

$$ \lambda(b)\zeta(b)-\zeta(a)=\int^b_a \lambda( \tau) \Biggl(\sum^n_{j=0}\frac{\partial L}{\partial x^{(j)}} \langle x, z \rangle_n (\tau )\eta^{(j)}(\tau) \Biggr) d\tau. $$

Since ζ(t)=0, t∈{a,b}, the left-hand side of the previous equation vanishes and we get

$$ 0=\int^b_a\sum^n_{j=0} \lambda(\tau)\frac{\partial L}{\partial x^{(j)}}\langle x, z \rangle_n (\tau) \eta^{(j)}(\tau)d\tau. $$

Using the higher-order fundamental lemma of the calculus of variations (Lemma 1), we obtain the generalized Euler–Lagrange equation

$$ \sum^{n}_{j=0}(-1)^j \biggl( \lambda(t) \frac{\partial L}{\partial x^{(j)}}\langle x, z \rangle_n (t) \biggr)^{(j)}=0,\quad t \in[a,b], $$

proving the intended result. □

In order to simplify expressions, and in agreement with Theorem 1, from now on we use the notation \(\lambda(t):=e^{-\int ^{t}_{a}\frac{\partial L}{\partial z}\langle x, z \rangle_{n} (\theta)d\theta }\). If n=1, then the differential equation of Problem (P) reduces to \(\dot{z}(t)=L(t,x(t),\dot{x}(t),z(t))\), which defines the functional z of Herglotz’s variational principle. This principle is a particular case of our Theorem 1 and is given in Corollary 1.

Corollary 1

(See [7, 8])

Let z be a solution of \(\dot{z}(t)=L (t,x(t),\dot{x}(t),z(t) )\), t∈[a,b], subject to the boundary conditions z(a)=γ, x(a)=α and x(b)=β, where γ, α, and β are given real numbers. If x is an extremizer of functional z[x;b], then x satisfies the differential equation

$$\begin{aligned} &\frac{\partial L}{\partial x} \bigl(t, x(t),\dot{x}(t), z(t) \bigr)+\frac{\partial L}{\partial z} \bigl(t, x(t),\dot{x}(t), z(t) \bigr)\frac{\partial L}{\partial\dot{x}} \bigl(t, x(t),\dot{x}(t), z(t) \bigr) \\ &\quad{}-\frac{d}{dt}\frac{\partial L}{\partial\dot{x}} \bigl(t, x(t),\dot {x}(t), z(t) \bigr) = 0,\quad t\in[a,b]. \end{aligned}$$

Our Euler–Lagrange equation (8) is also a generalization of the classical Euler–Lagrange equation for higher-order variational problems.

Corollary 2

(See, e.g., [1])

Suppose that x is a solution of Problem (P) subject to (7), and that the Lagrangian L is independent of z. Then x satisfies the classical higher-order Euler–Lagrange differential equation

$$ \sum^{n}_{j=0}(-1)^j \frac{d^j}{dt^j} \biggl(\frac{\partial L}{\partial x^{(j)}} \bigl(t, x(t),\ldots, x^{(n)}(t) \bigr) \biggr) =0,\quad t\in[a,b]. $$
(9)

3.2 Generalized Natural Boundary Conditions

We now consider the case when the values of x(a), …, x (n−1)(a), x(b), …, x (n−1)(b), are not necessarily specified.

Theorem 2

(Generalized natural boundary conditions)

Suppose that x is a solution to Problem (P). Then x satisfies the generalized Euler–Lagrange equation (8). Moreover,

  1. 1.

    If x (k)(b), k∈{0,…,n−1}, is free, then the natural boundary condition

    $$ \sum_{j=1}^{n-k}(-1)^{j-1} \frac{d^{j-1}}{dt^{j-1}} \biggl(\lambda (t)\frac{\partial L}{\partial x^{(k+j)}}\langle x,z \rangle_n (t) \biggr) \bigg\vert _{t=b}=0 $$
    (10)

    holds.

  2. 2.

    If x (k)(a), k∈{0,…,n−1}, is free, then the natural boundary condition

    $$ \sum_{j=1}^{n-k}(-1)^{j-1} \frac{d^{j-1}}{dt^{j-1}} \biggl( \lambda (t)\frac{\partial L}{\partial x^{(k+j)}}\langle x, z \rangle_n (t) \biggr) \bigg\vert _{t=a}=0 $$
    (11)

    holds.

Proof

Suppose that x is a solution to Problem (P). Let \(\eta\in C^{2n}([a,b], \mathbb{R})\) and define the function ζ just like in the proof of Theorem 1. From the arbitrariness of η, and using similar arguments as the ones in the proof of Theorem 1, we conclude that x satisfies the generalized Euler–Lagrange equation (8). We now prove (10) (the proof of (11) follows exactly the same arguments). Suppose that x (k)(b), k∈{0,…,n−1}, is free. Define the function \(\zeta(t):=\frac{d}{d\epsilon}z[x+\epsilon \eta; t]\vert_{\epsilon=0}\). Let J:={j∈{0,…,n−1}:x (j)(a) is given}. For any j∈{0,…,n−1}, if jJ, then η (j)(a)=0; otherwise, we restrict ourselves to those functions η such that η (j)(a)=0. For convenience, we also suppose that η (n)(a)=0. Using the same arguments as the ones used in the proof of Theorem 1, we find that ζ satisfies the first order linear differential equation

$$\begin{aligned} \dot{\zeta}(t) =& \frac{\partial L}{\partial x}\langle x, z \rangle_n (t) \eta(t)+\frac{\partial L}{\partial\dot{x}}\langle x, z \rangle_n (t)\dot{\eta}(t)+ \cdots+\frac{\partial L}{\partial x^{(n)}}\langle x, z \rangle_n (t) \eta^{(n)}(t) \\ &{}+\frac{\partial L}{\partial z}\langle x, z \rangle_n (t)\zeta(t), \end{aligned}$$

whose solution is found by

$$\begin{aligned} \lambda(t)\zeta(t)-\zeta(a)=\int^t_a\sum ^n_{j=0}\lambda(\tau)\frac {\partial L}{\partial x^{(j)}} \langle x, z \rangle_n (\tau)\eta ^{(j)}(\tau)d\tau. \end{aligned}$$

Again, since ζ(t)=0, for t∈{a,b}, we get

$$\begin{aligned} \int^b_a\sum^n_{j=0} \lambda(\tau)\frac{\partial L}{\partial x^{(j)}}\langle x, z \rangle_n (\tau) \eta^{(j)}(\tau)d\tau=0 \end{aligned}$$

and, therefore,

$$\begin{aligned} \int^b_a\lambda(\tau)\frac{\partial L}{\partial x}\langle x, z \rangle _n (\tau)\eta(\tau)d\tau+ \sum ^n_{j=1}\int^b_a \lambda(\tau) \frac {\partial L}{\partial x^{(j)}}\langle x, z \rangle_n (\tau)\eta ^{(j)}(\tau)d\tau=0. \end{aligned}$$

Using the higher-order integration by parts formula (Lemma 2) in the second parcel we get

$$\begin{aligned} &\int^b_a\lambda(\tau)\frac{\partial L}{\partial x} \langle x, z \rangle _n (\tau)\eta(\tau)d\tau+\sum ^{n}_{j=1} \Biggl( \Biggl[\lambda(\tau) \frac {\partial L}{\partial x^{(j)}}\langle x, z \rangle_n (\tau)\eta ^{(j-1)}( \tau) \\ &\quad{}+ \sum^{j-1}_{i=1}(-1)^i \biggl(\lambda(\tau)\frac{\partial L}{\partial x^{(j)}}\langle x, z \rangle_n (\tau) \biggr)^{(i)}\eta ^{(j-1-i)}(\tau) \Biggr]^b_a \\ &\quad{}+(-1)^j \int^b_a \biggl( \lambda(\tau) \frac{\partial L}{\partial x^{(j)}}\langle x, z \rangle_n (\tau) \biggr)^{(j)}\eta(\tau ) d\tau \Biggr) =0, \end{aligned}$$

which is equivalent to

$$\begin{aligned} &\int^b_a \sum_{j=0}^{n}(-1)^j \biggl(\lambda(\tau)\frac{\partial L}{\partial x^{(j)}}\langle x, z \rangle_n (\tau) \biggr)^{(j)}\eta(\tau ) d\tau \\ &\quad{}+ \sum^{n}_{j=1} \Biggl[\lambda( \tau) \frac{\partial L}{\partial x^{(j)}}\langle x,z \rangle_n (\tau) \eta^{(j-1)}(\tau) \\ &\quad{} + \sum^{j-1}_{i=1}(-1)^i \biggl(\lambda(\tau)\frac {\partial L}{\partial x^{(j)}}\langle x, z \rangle_n (\tau) \biggr)^{(i)}\eta^{(j-1-i)}(\tau) \Biggr]^b_a=0. \end{aligned}$$

Using the generalized Euler–Lagrange equation (8) into the last equation we get

$$\begin{aligned} &\sum^{n}_{j=1} \Biggl[\lambda(\tau) \frac{\partial L}{\partial x^{(j)}}\langle x, z \rangle_n (\tau)\eta^{(j-1)}( \tau) \\ &\quad{}+ \sum^{j-1}_{i=1}(-1)^i \biggl(\lambda(\tau)\frac{\partial L}{\partial x^{(j)}}\langle x,z \rangle_n (\tau) \biggr)^{(i)}\eta ^{(j-1-i)}(\tau) \Biggr]^b_a=0 \end{aligned}$$

and since \(\eta(a)=\dot{\eta}(a)=\cdots=\eta^{(n-1)}(a)=0\), we conclude that

$$\begin{aligned} &\sum^{n}_{j=1} \Biggl(\lambda(\tau) \frac{\partial L}{\partial x^{(j)}}\langle x, z \rangle_n (\tau)\eta^{(j-1)}( \tau) \\ &\quad{}+\sum^{j-1}_{i=1}(-1)^i \biggl(\lambda(\tau) \frac{\partial L}{\partial x^{(j)}}\langle x,z \rangle_n (\tau) \biggr)^{(i)}\eta ^{(j-1-i)}(\tau) \Biggr) \Bigg\vert _{\tau=b} =0. \end{aligned}$$

This equation is equivalent to

$$\begin{aligned} \sum_{i=0}^{n-1} \Biggl( \sum _{j=1}^{n-i}(-1)^{j-1} \biggl( \lambda(\tau ) \frac{\partial L}{\partial x^{(i+j)}}\langle x, z \rangle_n (\tau ) \biggr)^{(j-1)} \eta^{(i)}(\tau) \Biggr) \Bigg\vert _{\tau=b}=0. \end{aligned}$$

Let I:={i∈{0,…,n−1}:x (i)(b) is given}. Note that kI. For any i∈{0,…,n−1}, if iI, then η (i)(b)=0; otherwise, for ik, we restrict ourselves to those functions η such that η (i)(b)=0. From the arbitrariness of η (k)(b), it follows that

$$\begin{aligned} \sum_{j=1}^{n-k}(-1)^{j-1} \biggl( \lambda(\tau)\frac{\partial L}{\partial x^{(k+j)}}\langle x, z \rangle_n (\tau) \biggr)^{(j-1)} \bigg\vert _{\tau=b}=0. \end{aligned}$$

This concludes the proof. □

Remark 1

If x is a solution to Problem (P) without any of the 2n boundary conditions (7), then x satisfies the generalized higher-order Euler–Lagrange equation (8) and n transversality conditions (10) and n transversality conditions (11). In general, for each boundary condition missing in (7), there is a corresponding natural boundary condition, as given by Theorem 2.

Next we remark that our generalized transversality conditions (10) and (11) are generalizations of the classical transversality conditions for higher-order variational problems (cf. ψ k=0, k=0,…,n−1, with ψ k given as in [13, Sect. 5]).

Corollary 3

Suppose that x is a solution of Problem (P) with L independent of z. Then x satisfies the classical Euler–Lagrange equation (9). Moreover,

  1. 1.

    If x (k)(b), k∈{0,…,n−1}, is free, then the natural boundary condition

    $$ \sum_{j=1}^{n-k}(-1)^{j-1} \frac{d^{j-1}}{dt^{j-1}} \biggl(\frac {\partial L}{\partial x^{(k+j)}} \biggr) \bigl(b, \dot{x}(b), \ldots, x^{(n)}(b) \bigr)=0 $$

    holds.

  2. 2.

    If x (k)(a) is free, k∈{0,…,n−1}, then the natural boundary condition

    $$ \sum_{j=1}^{n-k}(-1)^{j-1} \frac{d^{j-1}}{dt^{j-1}} \biggl(\frac {\partial L}{\partial x^{(k+j)}} \biggr) \bigl(a, \dot{x}(a), \ldots, x^{(n)}(a) \bigr)=0 $$

    holds.

4 Illustrative Examples

We illustrate the usefulness of our results with some examples that are not covered by previous available results in the literature. Let us consider the particular case of Theorem 1 with n=2.

Corollary 4

Let z be a solution of \(\dot{z}(t)=L (t,x(t),\dot{x}(t),\ddot {x}(t),z(t) )\), t∈[a,b], subject to the boundary conditions z(a)=γ, x(a)=α 0, \(\dot{x}(a)=\alpha_{1}\), x(b)=β 0, and \(\dot{x}(b)=\beta_{1}\), where γ, α 0, α 1, β 0, and β 1, are given real numbers. If x is an extremizer of functional z[x;b], then x satisfies the differential equation

$$ \begin{aligned}[b] &\frac{\partial L}{\partial x}\langle x, z \rangle_2(t) +\frac{\partial L}{\partial z}\langle x, z \rangle_2(t) \frac{\partial L}{\partial\dot {x}}\langle x, z \rangle_2(t)-\frac{d}{dt} \frac{\partial L}{\partial \dot{x}}\langle x, z \rangle_2 (t) \\ &\quad{}+ \biggl( \frac{\partial L}{\partial z}\langle x, z \rangle_2(t) \biggr)^2\frac{\partial L}{\partial\ddot{x}}\langle x, z \rangle_2 (t)-2 \frac {\partial L}{\partial z}\langle x, z \rangle_2 (t)\frac{d}{dt} \frac {\partial L}{\partial\ddot{x}}\langle x, z \rangle_2(t) \\ &\quad{}- \biggl(\frac{d}{dt}\frac{\partial L}{\partial z}\langle x, z \rangle _2(t) \biggr)\frac{\partial L}{\partial\ddot{x}}\langle x, z \rangle_2 (t)+ \frac{d^2}{dt^2}\frac{\partial L}{\partial\ddot{x}}\langle x, z \rangle_{2}(t) = 0,\quad t\in[a,b], \end{aligned} $$
(12)

where \(\langle x, z \rangle_{2}(t) = (t,x(t),\dot{x}(t),\ddot{x}(t),z(t) )\).

We now apply Corollary 4 to concrete situations.

Example 1

Let us consider the following Herglotz’s higher-order variational problem:

$$ \begin{gathered} z(1) \longrightarrow\min, \\ \dot{z}(t) = \ddot{x}^2(t) + z^2(t), \quad t \in[0,1], \qquad z(0) = \frac{1}{2}, \\ x(0) = 0, \qquad\dot{x}(0) = 1, \qquad x(1) = 1, \qquad\dot{x}(1) = 1. \end{gathered} $$
(13)

For this problem, the necessary optimality condition (12) asserts that

$$ x^{(4)}(t) - 4 z(t) x^{(3)}(t) + \bigl(4 z^2(t) - 2 \dot{z}(t) \bigr) x^{(2)}(t) = 0. $$
(14)

Solving the system formed by (14) and \(\dot{z}(t) = \ddot {x}^{2}(t) + z^{2}(t)\), subject to the given boundary conditions, gives the extremal

$$ x(t) = t, \quad z(t) = \frac{1}{2-t}, $$

for which z(1)=1.

Example 2

Consider problem (13) with z(0)=z 0 free. We show that such problem is not well defined. Indeed, if a solution exists, we obtain the optimality system

$$ \begin{cases} x^{(4)}(t) - 4 z(t) x^{(3)}(t) + (4 z^2(t) - 2 \dot{z}(t) ) x^{(2)}(t) = 0,\\ \dot{z}(t) = \ddot{x}^2(t) + z^2(t) \end{cases} $$

subject to x(0)=0 and \(\dot{x}(0) = x(1) = \dot{x}(1) = 1\). It follows that

$$ x(t) = t, \qquad z(t) = \frac{z_0}{1-z_0t}, $$

and we conclude that the problem has no solution: the infimum is −∞ obtained when z 0→1+.

Example 3

Consider now the following problem:

$$ \begin{gathered} z(1) \longrightarrow\min, \\ \dot{z}(t) = \ddot{x}^2(t) + z(t), \quad t \in[0,1], \qquad z(0) = 1, \\ x(0) = 0, \qquad\dot{x}(0) = 1, \qquad x(1) = 1, \qquad\dot{x}(1) = 0. \end{gathered} $$
(15)

For problem (15), the necessary optimality condition (12) asserts that

$$ x^{(4)}(t) - 2 x^{(3)}(t) + x^{(2)}(t) = 0. $$
(16)

Solving the system formed by (16) and \(\dot{z}(t) = \ddot {x}^{2}(t) + z(t)\), subject to the given boundary conditions, gives the extremal

$$\begin{gathered} x(t) = \frac{(1-t) e^{t+1} + (2t - 1) e^t + (e - 3) e t - e + 1}{e^2 - 3 e + 1}, \\ z(t) = \frac{ [ (1 + t^{2}) e^{t+2} - 2 (2 t^{2}+t + 2) e^{t+1} + (4 t^{2} +4 t + 5) e^{t} +e^{4} -6e^{3}+ 10e^{2}-2e-4 ]e^{t}}{ (e^{2}-3e+1 )^{2}}, \end{gathered}$$

for which \(z(1) = \frac{ (e^{2} - e - 4 ) e}{e^{2} - 3 e + 1} \gtrsim7,78\).

Our last example shows the usefulness of Theorem 2.

Example 4

We now consider problem (15) with \(\dot{x}(1)\) free. In this case, solving

$$ \begin{cases} x^{(4)}(t) - 2 x^{(3)}(t) + x^{(2)}(t) = 0,\\ \dot{z}(t) = \ddot{x}^2(t) + z(t) \end{cases} $$

subject to the boundary conditions z(0)=1, x(0)=0, \(\dot{x}(0) = 1\), x(1)=1, and the natural boundary condition (10) for n=2 and k=1, which in the present situation simplifies to \(\ddot {x}(1) = 0\), gives the extremal

$$ x(t) = t, \qquad z(t) = e^t, $$

for which \(\dot{x}(1) = 1\) and z(1)=e≲2,72.