Solution (source code)

= Solution

The integrand
$$
\frac12y'^2+\frac12U(y)^2
$$
is nonnegative, so $I[y]\geq0$. If $I[y]=0$, both continuous summands vanish everywhere. Hence $y'=0$, so $y$ is constant; the common boundary value forces $y(x)=a$. Conversely, $y\equiv a$ has $y'=0$ and $U(a)=0$, so $I[y]=0$. Therefore
$$
\boxed{I[y]=0\iff y(x)=a\text{ for every }x}.
$$

This agrees with part (a): at $y=a$, the first variation vanishes because $y''=U(a)=0$, and
$$
\delta^2I[a;\eta]
=\int_{-\infty}^{\infty}\left[(\eta')^2+U'(a)^2\eta^2\right]dx\geq0.
$$
\b[Thus the constant configuration is a stationary local minimum as well as the global minimum identified directly.]