Let $L \in C^2([a,b] \times \mathbb{R} \times \mathbb{R})$. If $y \in C^2([a,b], \mathbb{R})$ minimises $J[y]$ over the admissible class with $y(a) = y_a$ and $y(b)$ free, then $y$ satisfies:
1. the Euler–Lagrange equation on $(a, b)$:
\begin{align*}
\frac{\partial L}{\partial y}(x, y, y') - \frac{d}{dx}\frac{\partial L}{\partial y'}(x, y, y') = 0,
\end{align*}
2. the natural boundary condition at $x = b$:
\begin{align*}
\frac{\partial L}{\partial y'}(b, y(b), y'(b)) = 0.
\end{align*}