= Solution
The <orthogonal projection> is $p_n=\sum_{r=0}^n(u,\phi_r)\phi_r$. Subtract it from $u$ and use the <orthonormal basis> relations to obtain
$$
0\leq\|u-p_n\|_2^2=\|u\|_2^2-\sum_{r=0}^n(u,\phi_r)^2.
$$
This is the requested <Bessel inequality>.
For the infinite tail, use completeness of the orthonormal <polynomial> family in the usual weighted <L2 space>. The relevant density facts are that continuous functions are dense for the finite measure $w(x)\,dx$, and the <Weierstrass approximation theorem> makes <polynomials> uniformly dense in continuous functions on the compact interval. Since $\int w<\infty$, uniform approximation also gives weighted <L2 norm> approximation. <Parseval's identity> therefore gives
$$
\boxed{\|u-p_n\|_2^2=\sum_{r=n+1}^\infty(u,\phi_r)^2.}
$$
Here finiteness of the weight integral is also necessary for the constant <polynomial> to belong to the stated Hilbert space. Without completeness of the polynomial family, an additional squared component orthogonal to every <polynomial> would remain; <Bessel inequality> alone does not justify equality.
Back to article page