[proofplan]
The proof has three stages. First, we use the stationarity condition $\delta J[y; h] = 0$ for all $h \in C_0^1$ together with the [Formula for the First Variation](/theorems/3519) to write $\int_a^b \left[\frac{\partial L}{\partial u} \cdot h + \frac{\partial L}{\partial p} \cdot h'\right] d\mathcal{L}^1 = 0$. Second, integration by parts transfers the derivative from $h'$ to $\frac{\partial L}{\partial p}$, reducing the integral to $\int_a^b f \cdot h\, d\mathcal{L}^1 = 0$ where $f_i = \frac{\partial L}{\partial u_i} - \frac{d}{dx}\frac{\partial L}{\partial p_i}$, using the $C^2$ regularity of $y$ and $L$ to ensure $f$ is continuous. Third, the [Fundamental Lemma of the Calculus of Variations](/theorems/45) forces $f = 0$ pointwise.
[/proofplan]
[step:Write out the stationarity condition using the first-variation formula]
Since $y$ is a stationary point of $J$ in $\mathcal{A}$, we have $\delta J[y; h] = 0$ for all $h \in C_0^1([a,b], \mathbb{R}^n)$. By the [Formula for the First Variation](/theorems/3519), this reads
\begin{align*}
\int_a^b \left[\frac{\partial L}{\partial u}(x, y, y') \cdot h + \frac{\partial L}{\partial p}(x, y, y') \cdot h'\right] d\mathcal{L}^1(x) &= 0
\end{align*}
for all $h \in C_0^1([a,b], \mathbb{R}^n)$ with $h(a) = h(b) = 0$.
[/step]
[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)$.
[guided]
The stationarity condition involves two terms: one with $h$ and one with $h'$. These are not directly comparable, so we need to express everything in terms of $h$ alone. The tool is integration by parts, applied to the $h'$ term.
The integration by parts formula $\int u\, dv = [uv] - \int v\, du$ is applied with $u = \frac{\partial L}{\partial p_i}(x, y, y')$ and $dv = h_i'(x)\, dx$. For this to be valid, $u$ must be differentiable. Is it? We need $x \mapsto \frac{\partial L}{\partial p_i}(x, y(x), y'(x))$ to be $C^1$. This function is the composition of the $C^1$ map $\frac{\partial L}{\partial p_i}: [a,b] \times \mathbb{R}^n \times \mathbb{R}^n \to \mathbb{R}$ (which is $C^1$ because $L$ is $C^2$) with the $C^1$ map $x \mapsto (x, y(x), y'(x))$ (which is $C^1$ because $y \in C^2$ implies $y' \in C^1$). The composition of $C^1$ maps is $C^1$, so the integration by parts is justified.
The boundary term $\left[\frac{\partial L}{\partial p_i} \cdot h_i\right]_a^b$ vanishes because $h(a) = h(b) = 0$. This is precisely where the fixed-endpoint boundary condition enters the argument: it kills the boundary contribution and leaves a clean integral condition.
After integration by parts and summing over components, the stationarity condition becomes
\begin{align*}
\int_a^b f(x) \cdot h(x)\, d\mathcal{L}^1(x) &= 0 \quad \text{for all } h \in C_0^1([a,b], \mathbb{R}^n),
\end{align*}
where $f_i = \frac{\partial L}{\partial u_i} - \frac{d}{dx}\frac{\partial L}{\partial p_i}$. This is an integral condition on $f$ against arbitrary test functions $h$.
[/guided]
[/step]
[step:Apply the fundamental lemma to conclude $f = 0$ pointwise]
The function $f: [a,b] \to \mathbb{R}^n$ is continuous: each component $f_i = \frac{\partial L}{\partial u_i}(x, y, y') - \frac{d}{dx}\frac{\partial L}{\partial p_i}(x, y, y')$ is continuous because $\frac{\partial L}{\partial u_i}(x, y, y')$ is continuous ($L \in C^2$ composed with $C^1$ maps) and $\frac{d}{dx}\frac{\partial L}{\partial p_i}(x, y, y')$ is continuous (as established in the previous step, $x \mapsto \frac{\partial L}{\partial p_i}(x, y, y')$ is $C^1$, so its derivative is $C^0$).
We have shown that $\int_a^b f \cdot h\, d\mathcal{L}^1 = 0$ for all $h \in C_0^1([a,b], \mathbb{R}^n)$, and $f$ is continuous. The [Fundamental Lemma of the Calculus of Variations](/theorems/45) therefore gives $f(x) = 0$ for all $x \in [a,b]$, i.e.,
\begin{align*}
\frac{\partial L}{\partial u_i}(x, y, y') - \frac{d}{dx}\frac{\partial L}{\partial p_i}(x, y, y') &= 0 \quad \text{for all } x \in [a,b], \quad i = 1, \dots, n.
\end{align*}
This is the Euler--Lagrange equation.
[guided]
The integral condition $\int_a^b f \cdot h\, d\mathcal{L}^1 = 0$ for all $h \in C_0^1$ does not by itself force $f = 0$: if $f$ were merely integrable, it could be nonzero on a set of measure zero without being detected by any test function. The crucial additional hypothesis is that $f$ is *continuous*. The [Fundamental Lemma of the Calculus of Variations](/theorems/45) states: if $f: [a,b] \to \mathbb{R}^n$ is continuous and $\int_a^b f \cdot h\, d\mathcal{L}^1 = 0$ for all $h \in C_0^1([a,b], \mathbb{R}^n)$, then $f \equiv 0$.
We verify the hypothesis: $f$ is continuous because both terms in $f_i = \frac{\partial L}{\partial u_i} - \frac{d}{dx}\frac{\partial L}{\partial p_i}$ are continuous functions of $x$. The first term $\frac{\partial L}{\partial u_i}(x, y(x), y'(x))$ is continuous as a $C^1$ function ($L \in C^2$) composed with continuous maps. The second term $\frac{d}{dx}\frac{\partial L}{\partial p_i}(x, y(x), y'(x))$ is continuous because $\frac{\partial L}{\partial p_i}(x, y(x), y'(x))$ is $C^1$ (as verified in the integration-by-parts step).
The fundamental lemma therefore applies and gives $f \equiv 0$, which is the Euler--Lagrange equation
\begin{align*}
\frac{\partial L}{\partial u_i}(x, y, y') - \frac{d}{dx}\frac{\partial L}{\partial p_i}(x, y, y') &= 0, \quad i = 1, \dots, n.
\end{align*}
This completes the derivation. The logical structure is: stationarity (an infinite-dimensional condition on $J$) $\implies$ integral condition ($\int f \cdot h = 0$ for all test $h$) $\implies$ pointwise ODE ($f = 0$), with the fundamental lemma providing the second implication.
[/guided]
[/step]