Theorem (Parseval's identity for orthogonal polynomials)
Given a weighted inner product with $[a,b]$ finite, let $(Q_k)_{k=0}^n$ be the orthogonal polynomials.
Then for any $f\in C[a,b]$, $$ \begin{align*} \sum_{k=0}^{\infty} \frac{\langle f,Q_k\rangle^2}{\|Q_k\|^2} = \|f\|^2. \end{align*} $$
-
To find a polynomial $p$ such that $\|f-p\|\leq ε$, compute the partial sums $\sum_{k=0}^{N} \frac{\langle f,Q_k\rangle^2}{\|Q_k\|^2}$ until it is at least $\|f\|^2 - ε^2$.