The Question:Let $f:[0,1] \rightarrow \mathbb{R}$ be continuous. Let $p:[0,1] \rightarrow \mathbb{R}$ be the $L^2$-closest degree $n$ polynomial to $f$. That is, $p$ minimizes $\int_0^1|f(x) - p(x)|^2 dx$. Is $p$ an interpolating polynomial of $f$? That is, are there at least $n+1$ distinct points at which $p(x) = f(x)$?
Extended Question:Assume the answer to the previous question is true. Is there a way to “extend” this result to a larger class of functions in the Hilbert space $L^2[0,1]$? In a sense, the answer is no. Since functions in $L^2[0,1]$ are only defined up to measure zero sets, you can trivially make $p$ an interpolating polynomial by redefining $f$ at a handful of points. Alternatively, you can make $p$ fail to be an interpolating polynomial for a similar small redefinition. However, looking at some simple examples of discontinuous seems to suggest it would work, if you’re careful about how $f$ is defined at its discontinuities.
Thoughts: I think this should be true. Intuitively, since larger gaps between $f$ and $p$ are penalized more by the $L^2$-norm, it seems like you’d want $f$ and $p$ to cross as many times as possible. Plus I’ve looked at a few examples, and it seems to be true. Further, you can show that if $p(x) = b_0 + b_1x + \cdots + b_n x^n$, the coefficients of $p$ are given by the formula:$$\begin{bmatrix} b_0 \\ b_1 \\\vdots \\ b_n \end{bmatrix} = H^{-1} \begin{bmatrix} \int_0^1 f(x) dx \\ \int_0^1 x f(x) dx \\ \vdots \\ \int_0^1 x^n f(x) dx \end{bmatrix} $$
Where $H$ is the $(n+1) \times (n+1)$ Hilbert matrix with entries $H_{ij} = \frac{1}{i + j -1}$. Using this identity, we can write $H^{-1}$ in terms a Vandermonde matrix and an inverse Vandermonde matrix, which are closely related to polynomial interpolation. However, I just can’t seem to get it work out, nor can I find an argument online!
If you have any thoughts or a literature reference, I’d appreciate it!