Is the set of polynomials of degree $\le n$ closed in $L^2(a,b)$?

60 Views Asked by At

Let $a<b$ be real numbers. I'm asked to prove that for every $f\in L^2(a,b)$ there exists a unique polynomial $p_n$ of degree less than or equal to $n$ such that $$\|f-p\|_2\ge\|f-p_n\|_2,$$ for every polynomial $p$, $\text{deg}\,p\leq n$. My idea is to use that the set $$S:=\{p:p\text{ polynomial, }\deg p\leq n\}$$ is a closed subspace of $L^2(a,b)$. The result will follow by the theorem of minimizing distance in Hilbert spaces. However I don't know how to prove $S$ is closed. That is, how can one show that $f\in S$ whenever $$\lim_{k\to \infty}\int_a^b (f-p_k)^2=0,$$ for a sequence $\{p_k\}_{k=1}^\infty\subseteq S$?