I'm looking for the best possible inequality of the form $$\int_0^1 (1-x^2)\left(g(x)\right)^2 \, {\rm d}x \leq c \int_0^1 (g(x))^2 \, {\rm d}x$$ for some constant $c$. Cleary $c=1$ works, but I want better. By the intermediate value theorem we have $$\int_0^1 (1-x^2) (g(x))^2 \, {\rm d}x = (g(\xi))^2 \int_0^1 (1-x^2) \, {\rm d}x = (g(\xi))^2 \cdot \frac{2}{3}$$ for some $\xi \in (0,1)$, so maybe $c=2/3$ would be even possible.
I also tried using Lagrange-multipliers by going over to the normalized function $\int_0^1 (g(x))^2 = 1$. The Method of Lagrange would then give $$\int_0^1 (1-x^2) 2g(x)\delta g(x) \, {\rm d}x = \lambda \int_0^1 2g(x)\delta g(x) \, {\rm d}x$$ or $$\int_0^1 2g(x) \delta g(x) \left[1-x^2 - \lambda\right] {\rm d}x = 0$$ for arbitrary variations $\delta g(x)$, but this obviously doesn't work somehow... I don't know why.
Any ideas?
If you consider $g(x)=(1-x)^n$ you have
$$ \int_{0}^{1}(1-x^2)g(x)^2\,dx = \frac{n+2}{2n^2+5n+3}, \qquad \int_{0}^{1}g(x)^2\,dx = \frac{1}{2n+1} $$ hence you cannot replace $c$ with something less than one.
The idea was just to consider functions pretty much concentrated in a right neighbourhood of the origin.