The question is:
Find all the curves $y(x)$ with $y(−1) = y(1) = 0$ that extremise the functional $\int_{-1}^1 x^2 + (y′)^2 dx$, subject to the constraint $\int_{-1}^1y^2 dx = 1$.
I've used a Lagrangian multiplier and found the Euler-Lagrange equation which reduces to $$y'' - \lambda y = 0$$
And then that gives three different solutions for $y$ depending on the sign of $\lambda$. The problem is that when I try to solve for the coefficients using the constraint and the boundary conditions, it keeps reducing to the trivial $y=0$, which makes me think I'm going wrong somewhere. Any ideas?
Hints:
Note that $x^2$ term plays no role in the extremization process, so we'll drop it from now on. Also for later convenience, let us shift the interval from $[-1,1]$ to $[0,2]$. Moreover, compared to OP, we take the opposite sign convention for the Lagrange multiplier $\lambda$.
The constraint $$\int_0^2 \! dx~ y^2~=~1\tag{1}$$ can be viewed as wave function normalization in quantum mechanics.
The Dirichlet boundary conditions (BC) $$ y(0)~=~0~=~y(2) \tag{2} $$ corresponds to the infinite potential well/particle in a box.
OP's functional becomes the energy functional $$E[y,\lambda]~:=~\int_0^2 \! dx ~y^{\prime 2} +\lambda\left( 1-\int_0^2 \! dx~y^2\right) ~=~\lambda + \int_0^2 \! dx \underbrace{\left(y^{\prime 2} -\lambda y^2\right)}_{=:~L} . \tag{3}$$
The Euler-Lagrange (EL) equation becomes the TISE $$ -y^{\prime\prime}~=~\lambda y.\tag{4} $$
All the solutions to the EL eq. (4), BCs (2) & constraint (1) are the energy eigenstates $$y_n(x)~=~\sin\frac{n\pi x}{2}, \qquad \lambda_n~=~\left(\frac{n\pi}{2}\right)^2,\qquad n~\in\mathbb{N}.\tag{5} $$
The value of the functional at the stationary points are the energy $$ S[y_n,\lambda_n]~=~\ldots~=~\lambda_n .\tag{6}$$
The minimum/ground state energy is given by the $n=1$ solution. There is no maximum energy.