= Solution
For $y=\pm\sqrt{2/\pi}\sin x$, both the constraint and endpoint values hold, the extremal equation has $\lambda=1$, and direct integration gives $J[y]=1$.
For any admissible function, its derivative has <Fourier cosine series> coefficients $na_n$ and zero constant coefficient. This follows by <integration by parts>: $\int_0^\pi y'\cos(nx)dx=n\int_0^\pi y\sin(nx)dx$, and $\int_0^\pi y'=0$. Thus the <Parseval identity> gives
$$
J[y]=\frac\pi2\sum_{n\geq1}n^2a_n^2
\geq\frac\pi2\sum_{n\geq1}a_n^2=1.
$$
For finite sums the same identity follows directly from the cosine product formula in the hint; the $L^2$ identity justifies the general case. Equality holds only if $a_n=0$ for all $n\geq2$, and normalization then fixes $a_1=\pm\sqrt{2/\pi}$. Therefore
$$
\boxed{J_{\min}=1,\qquad y_{\min}(x)=\pm\sqrt{\frac2\pi}\sin x.}
$$
This is the <minimum Dirichlet energy at fixed L2 norm on an interval>, equivalently the sharp <Wirtinger inequality> for this interval.
Back to article page