I'm wondering if there exists some inner product $\langle \cdot,\cdot \rangle$ defined on all real infinitely differentiable functions such that $$1, x, x^2, x^3, \ldots$$ are orthonormal w.r.t this inner product?
If there does exist such an inner product, denote $$U_j=\text{span}(1,x,\ldots,x^j).$$ Then, is it true that, for an arbitrary infinitely differentiable function $f$, $P_{U_j}(f)$ is $f$'s $j$th order taylor expansion at $x=0$?
It's easy to be explicit about an inner product making the monomials orthonormal:
Proof: Suppose $|x|<1$. Then $\sum(|x|^n)^2<\infty$, hence $\sum c_nx^n$ converges, by Cauchy-Schwarz.
So we can let $H$ be the space of power series $\sum c_nx^n$ with $\sum|c_n|^2<\infty$ and define $$\left\langle\sum c_nx^n,\sum b_nx^n\right\rangle=\sum c_n\overline{b_n}.$$
And now it follows that the orthogonal projection onto the span of the first $n$ monomials is given by the $n$th partial sum.