Natural Boundary Condition

For $f \in C^2 ([a,b] \times \mathbb{R} \times \mathbb{R})$ we consider the minimization problem

$$\inf_{u \in X}J[u],\,\, J[u] = \int_a^b f(x,u(x),u'(x)) dx,\,\,\, X=\{ u \in C^1([a,b]); u(a)=\alpha \}.$$

Assume that a minimizer $\overline{u} \in C^2([a,b]) \cap X$ attaining the infimum of the problem exists, find the condition that the minimizer $\overline{u}$ fulfills at the right endpoint $x=b$ of the interval $[a,b]$ (i.e. find the relation satisfied by $\overline{u}(b)$, $\overline{u}'(b)$).

I found this question, i think it already contains the conditions I need in my question. Could you please tell me how to get these conditions? any comment or hint will be helpful.


Assume that a minimizer $\overline{u} \in C^2([a,b]) \cap X$ attaining the infimum of the problem exists, find the condition that the minimizer $\overline{u}$ fulfills at the right endpoint $x=b$ of the interval $[a,b]$ (i.e. find the relation satisfied by $\overline{u}(b)$, $\overline{u}'(b)$).
\end{problem} \begin{proof}

Accordingly, the class of admissible perturbations is restricted to those vanishing at the endpoints. This fact, reflected in $\eta(a)=\eta(b)=0$ was explicitly used in the derivation of the Euler-Lagrange equation $\frac{\partial f}{\partial \overline{u}} = \frac{d}{dx} \frac{\partial f}{\partial \overline{u}' }$. Indeed, the first-order necessary condition $\delta J \big|_{\overline{u}^*}(\eta) =0$, which serves as the basis for the Euler-Lagrange equation, need only hold for admissible perturbations. If we change the boundary conditions for the curves of interest, then the class of admissible perturbations will also change, and in general the necessary condition for optimally will be different. To give an example of such a situation, we now consider a simple variable-endpoint problem. Suppose that the cost functional takes the same form

$$J(\overline{u}):= \int_a^b f(x, \overline{u}(x), \overline{u}'(x)) dx$$ as before, the initial point of the curve is still fixed by the boundary condition $\overline{u}(a)=\alpha$, but the terminal point $\overline{u}$ is free.

Suppose that $\overline{u} \in C^2([a,b]) \cap X$. An admissible variation is $\eta \in C^2[a,b]$ with $\eta(a)=0$. Consider the first variation $J$ at $\overline{u}$ in the direction $\eta$ is

\begin{align*} 0&=\delta J [\overline{u}(x),\eta(x)] \\ &= \frac{\partial}{\partial \epsilon} \int_a^b f(x, \overline{u}(x) + \epsilon \eta(x), \overline{u}'(x) + \epsilon \eta'(x)) dx\big|_{\epsilon=0}\\ &= \int_a^b \left( \frac{\partial}{\partial \overline{u}} f(x, \overline{u}(x), \overline{u}'(x)) \eta(x) + \frac{\partial }{\partial \overline{u}'} f( x, \overline{u}(x), \overline{u}'(x) \eta'(x) \right) dx.\\ & \text{integrating by parts}\\ &= \frac{\partial}{\partial \overline{u}'} f(x,\overline{u}(x),\overline{u}'(x)) \eta(x) \Big|_{x=a}^{x=b} + \int_a^b \left( \frac{\partial f}{\partial \overline{u}} - \frac{d}{dx} \frac{\partial f}{\partial \overline{u}'} \right) \eta(x) dx.\\ &= \frac{\partial}{\partial \overline{u}'} f(b,\overline{u}(b),\overline{u}'(b)) \eta(b) - \frac{\partial}{\partial \overline{u}'} f(a,\overline{u}(a),\overline{u}'(a)) \eta(a) + \int_a^b \left( \frac{\partial f}{\partial \overline{u}} - \frac{d}{dx} \frac{\partial f}{\partial \overline{u}'} \right) \eta(x) dx.\\ &=\frac{\partial}{\partial \overline{u}'} f(b,\overline{u}(b),\overline{u}'(b)) \eta(b) + \int_a^b \left( \frac{\partial f}{\partial \overline{u}} - \frac{d}{dx} \frac{\partial f}{\partial \overline{u}'} \right) \eta(x) dx. \end{align*}

Since $\overline{u}$ satisfies the Euler-Lagrange equation, so we always have

$$\frac{\partial f}{\partial \overline{u}} - \frac{d}{dx} \frac{\partial f}{\partial \overline{u}'} =0 \Rightarrow \int_a^b \left( \frac{\partial f}{\partial \overline{u}} - \frac{d}{dx} \frac{\partial f}{\partial \overline{u}'} \right) \eta(x) dx=0.$$

Then $\frac{\partial}{\partial \overline{u}'} f(b,\overline{u}(b),\overline{u}'(b)) \eta(b)$ must be always zero. Since $\eta(x)$ is arbitrary, then the condition that must be satisfied is;

$$\frac{\partial}{\partial \overline{u}'} f(b,\overline{u}(b),\overline{u}'(b)) =0$$