Prove (or disprove) that $$\int_{0}^{1}\left(\int_0^x g(t)\ dt\right)^2dx\leq\frac{1}{2}\int_0^1 (1-x^2)(g(x))^2 dx$$ for any $g(x)$ continuous on $[0,1]$.
I have verified the cases of $g(x)$ being monomials like $x^k (k\in \mathbb{N})$ and found the equality holds iff $k=0$, namely, $g(x)\equiv 1$.