[step:Integrate the $\frac{\partial L}{\partial p} \cdot h'$ term by parts to transfer the derivative onto $\frac{\partial L}{\partial p}$]Since $y \in C^2([a,b], \mathbb{R}^n)$ and $L \in C^2([a,b] \times \mathbb{R}^n \times \mathbb{R}^n)$, the composite function $x \mapsto \frac{\partial L}{\partial p_i}(x, y(x), y'(x))$ is $C^1$ on $[a,b]$ for each $i = 1, \dots, n$ (the chain rule applied to the $C^2$ composition yields a $C^1$ result because $y' \in C^1$ and $L \in C^2$). Integration by parts on each component gives
\begin{align*}
\int_a^b \frac{\partial L}{\partial p_i}(x, y, y') \cdot h_i'(x)\, d\mathcal{L}^1(x) &= \left[\frac{\partial L}{\partial p_i}(x, y, y') \cdot h_i(x)\right]_a^b - \int_a^b \frac{d}{dx}\!\left[\frac{\partial L}{\partial p_i}(x, y, y')\right] h_i(x)\, d\mathcal{L}^1(x).
\end{align*}
The boundary term vanishes because $h(a) = h(b) = 0$:
\begin{align*}
\left[\frac{\partial L}{\partial p_i} \cdot h_i\right]_a^b &= \frac{\partial L}{\partial p_i}(b, y(b), y'(b)) \cdot h_i(b) - \frac{\partial L}{\partial p_i}(a, y(a), y'(a)) \cdot h_i(a) = 0.
\end{align*}
Summing over $i$ and substituting back into the stationarity condition:
\begin{align*}
\int_a^b \sum_{i=1}^n \left[\frac{\partial L}{\partial u_i}(x, y, y') - \frac{d}{dx}\frac{\partial L}{\partial p_i}(x, y, y')\right] h_i(x)\, d\mathcal{L}^1(x) &= 0
\end{align*}
for all $h \in C_0^1([a,b], \mathbb{R}^n)$. In vector notation, writing $f: [a,b] \to \mathbb{R}^n$ for the function with components
\begin{align*}
f_i(x) &= \frac{\partial L}{\partial u_i}(x, y(x), y'(x)) - \frac{d}{dx}\frac{\partial L}{\partial p_i}(x, y(x), y'(x)), \quad i = 1, \dots, n,
\end{align*}
the integral condition becomes $\int_a^b f \cdot h\, d\mathcal{L}^1 = 0$ for all $h \in C_0^1([a,b], \mathbb{R}^n)$.[/step]