# Are there guarantees on the $L^2$ error of the best polynomial approximation (or pessimistic theorems)?

Given a function with nice properties, e.g. $f \in \mathcal{C}^k([a,b])$, are there any guarantees, i.e. upper bounds, on the $L^2$ error

$$min_{g \in \Pi_n} \|f-g\|_{L^2}$$

for the optimal approximation with a polynomial of fixed degree $n$? If there are no such guarantees, is there a result that proves the existence of functions with arbitrarily bad approximations?

I am aware of the theorem by Bernstein which establishes the existence of arbitrarily bad functions to approximate with regards to the $L^{\infty}$ norm.

We can construct one explicitly. We use the interval $[-1,1]$ to be specific. Let $P_i$ be the $i^{th}$ degree Legendre polynomial. Because they are orthonormal with weight $1$ the best $n$th degree fit to $f$ is $\sum_{i=0}^n \left(\int_{-1}^1 f(x)P_i(x)dx\right)P_i(x)$ Now let $f(x)=kP_{n+1}(x)$. As the polynomials are orthornormal, the best $n$th degree approximation to $f$ is the zero polynomial. As $f$ has non-zero norm, we can choose $k$ large enough to make the error of the approximation as large as we want.