[guided]We need to differentiate $\phi(\varepsilon) = \int_a^b g(x, \varepsilon) \, d\mathcal{L}^1(x)$ with respect to $\varepsilon$. This requires justifying the interchange of derivative and integral — we cannot move $\frac{d}{d\varepsilon}$ under the integral sign without checking hypotheses.
Define the integrand as a function of two variables:
\begin{align*}
g: [a,b] \times \mathbb{R} &\to \mathbb{R} \\
(x, \varepsilon) &\mapsto L\bigl(x,\; y^*(x) + \varepsilon\, h(x),\; (y^*)'(x) + \varepsilon\, h'(x)\bigr).
\end{align*}
The Leibniz integral rule for parameter-dependent integrals requires two conditions: (i) $g(x, \varepsilon)$ is continuous on $[a,b] \times I$ for some interval $I$, and (ii) the partial derivative $\partial_\varepsilon g(x, \varepsilon)$ exists and is continuous on $[a,b] \times I$. We verify both with $I = \mathbb{R}$.
**(i) Continuity of $g$.** The map $(x, \varepsilon) \mapsto \bigl(x,\; y^*(x) + \varepsilon\, h(x),\; (y^*)'(x) + \varepsilon\, h'(x)\bigr)$ is continuous from $[a,b] \times \mathbb{R}$ into $[a,b] \times \mathbb{R}^2$, since each component is a polynomial in $\varepsilon$ with continuous coefficients in $x$. Since $L$ is $C^1$ (hence continuous), the composition $g$ is continuous on $[a,b] \times \mathbb{R}$.
**(ii) Existence and continuity of $\partial_\varepsilon g$.** The map $\varepsilon \mapsto \bigl(y^*(x) + \varepsilon\, h(x),\; (y^*)'(x) + \varepsilon\, h'(x)\bigr)$ is affine in $\varepsilon$ with derivative $\bigl(h(x),\, h'(x)\bigr)$. Since $L \in C^1$, the chain rule applies and yields
\begin{align*}
\partial_\varepsilon g(x, \varepsilon) &= \partial_y L\bigl(x,\; y^*(x) + \varepsilon\, h(x),\; (y^*)'(x) + \varepsilon\, h'(x)\bigr)\, h(x) \\
&\quad + \partial_p L\bigl(x,\; y^*(x) + \varepsilon\, h(x),\; (y^*)'(x) + \varepsilon\, h'(x)\bigr)\, h'(x),
\end{align*}
where $\partial_y L$ and $\partial_p L$ denote the partial derivatives of $L: [a,b] \times \mathbb{R} \times \mathbb{R} \to \mathbb{R}$ with respect to its second and third arguments, respectively. Since $L \in C^1$, both $\partial_y L$ and $\partial_p L$ are continuous. The functions $h, h' \in C^0([a,b])$, so each summand is a product of continuous functions of $(x, \varepsilon)$, hence continuous. Thus $\partial_\varepsilon g$ is continuous on $[a,b] \times \mathbb{R}$.
Both hypotheses of the Leibniz integral rule are satisfied. We conclude that $\phi$ is differentiable on $\mathbb{R}$ with
\begin{align*}
\phi'(\varepsilon) = \int_a^b \partial_\varepsilon g(x, \varepsilon) \, d\mathcal{L}^1(x).
\end{align*}
Evaluating at $\varepsilon = 0$:
\begin{align*}
\phi'(0) &= \int_a^b \Bigl[\partial_y L\bigl(x,\, y^*(x),\, (y^*)'(x)\bigr)\, h(x) \;+\; \partial_p L\bigl(x,\, y^*(x),\, (y^*)'(x)\bigr)\, h'(x)\Bigr] d\mathcal{L}^1(x) \\
&= \delta J[y^*;\, h],
\end{align*}
where the last equality is the definition of the first variation. This is where the $C^1$ regularity of $L$ is consumed: the chain rule requires the first-order partial derivatives $\partial_y L$ and $\partial_p L$ to exist, and the Leibniz rule requires them to be continuous. If $L$ were merely continuous, the derivative $\phi'(0)$ might not exist at all, and the reduction to Fermat's theorem would fail.[/guided]