Solution (source code)

= Solution

Projecting the <Sturm-Liouville eigenfunction expansion> onto $y_m$ using the <weighted inner product> gives
$$
a_m=\langle f,y_m\rangle_w=\int_0^1w(x)f(x)y_m(x)\,dx.
$$
For the partial sum $f_N=\sum_{n=0}^Na_ny_n$, <orthonormality> therefore gives
$$
\|f_N\|_w^2=\sum_{n,m=0}^Na_na_m\langle y_n,y_m\rangle_w=\sum_{n=0}^Na_n^2.
$$
For $f$ of finite <weighted norm>, the given completeness means that $f_N\to f$ in that norm. The <triangle inequality> implies $|\|f_N\|_w-\|f\|_w|\leq\|f_N-f\|_w\to0$. Taking the limit of the finite identity proves <Parseval's identity>:
$$
\boxed{\int_0^1w(x)f(x)^2\,dx=\sum_{n=0}^\infty a_n^2.}
$$
This argument justifies the limiting step without assuming that a double infinite series can be integrated term by term. As usual, the expansion is understood for <square-integrable functions> with respect to the weighted measure; the boundary and smoothness assumptions of the regular <Sturm-Liouville problem> provide the usual stronger interpretations when needed.