Let $$D = \{y \in C^1(0,1) : y(0) = y(1) = 0\}$$
Suppose there exists a $C_0$ such that $$\int_{0}^{1} y^2 \ dx \leq C_0 \int_{0}^{1} (y')^2 \ dx$$ for all $y \in D$, and for all $C < C_0$ there exists a $y \in D$ such that the inequality is false.
How do I show that $\frac{1}{C_0} = \min \frac{\int_{0}^{1}y'(x)^2dx}{\int_{0}^{1}y(x)^2dx}$ in D = $\min {\int_{0}^{1}y'(x)^2dx}$ in D such that $\int_{0}^{1}y(x)^2dx$ = 1 ?
Why is $\min \frac{\int_{0}^{1}y'(x)^2dx}{\int_{0}^{1}y(x)^2dx}$ in D = $\min {\int_{0}^{1}y'(x)^2dx}$ in D such that $\int_{0}^{1}y(x)^2dx$ = 1 ?
The inequality with $C_0$ yields $$\frac{\int (y')^2 \, dx}{\int y^2 \, dx} \ge \frac{1}{C_0}.$$ It remains to show that there is a sequence $y_n$ with $$\frac{\int (y_n')^2 \, dx}{\int y_n^2 \, dx} \to \frac{1}{C_0}.$$ But for any $C$ with $1/C > 1/C_0$, there is a $y_C$ with $$\frac1{C_0} \le \frac{\int (y_C')^2 \, dx}{\int y_C^2 \, dx} < \frac{1}{C}.$$ This shows your desired equation.