# If $\int_{[0,1]} x^k f(x) dx =1$ then $\int_{[0,1]} (f(x))^2 dx \ge n^2$

Let $k \in \{0,1,...,n-1 \}$ and $f:[0,1] \to \mathbb{R}$ be a continous function. If $\int_{[0,1]} x^k f(x) dx =1$ for all such $k$ then show that $\int_{[0,1]} (f(x))^2 dx \ge n^2$.

Let $\{A_n(x)\}_{n\in\mathbb{N}}$ be the sequence of the shifted Legendre polynomials, $A_n(x)=P_n(2x-1)$.
This sequence gives an orthogonal base of $L^2([0,1])$ with respect to the dot product $\langle f,g\rangle = \int_{0}^{1} f(x)g(x)\,dx$:
$$\int_{0}^{1} A_n(x)\,A_m(x)\,dx = \frac{\delta_{n,m}}{2n+1}\tag{1}$$ and for every $n\in\mathbb{N}$ we have that $A_n(x)$ is a degree-$n$ polynomial such that $A_n(1)=1$.
By orthogonality, for every $k\leq n-1$: $$\int_{0}^{1} f(x)\, A_k(x)\,dx = A_k(1) = 1 \tag{2}$$ hence if we decompose $f(x)$ as: $$f(x) = \sum_{h\geq 0} a_h A_h(x) \tag{3}$$ we have $a_h=2h+1$ for every $h\leq n-1$ and: $$\int_{0}^{1}f(x)^2\,dx \geq \sum_{h=0}^{n-1}\frac{a_h^2}{2h+1} = \sum_{h=0}^{n-1}(2h+1)=\color{red}{n^2}\tag{4}$$ as wanted.