Resonant sine modes of a quadratic variational integral (source code)

= Resonant sine modes of a quadratic variational integral
{title2=$J[y]=\int_0^\pi(y'^2-ky^2)\,dx,\quad y(0)=y(\pi)=0$}

The <Euler-Lagrange equation> is $y''+ky=0$. For positive $k$ a nonzero stationary <function> exists exactly when $\sqrt k$ is a positive integer $n$, and all such <functions> are $B\sin(nx)$. These values are the <Dirichlet eigenvalues> of $-d^2/dx^2$ on the interval. At $k=0$ the solutions are affine and the endpoint conditions leave only zero; negative $k$ likewise leaves only zero. Stationarity alone does not assert minimization of the <quadratic functional>.