Generalized Fourier Coefficients
Assume we have an ON basis \(\{|e_i\rangle\}\) for \(L_2^w(a,b)\). We can write, \(|f\rangle = \sum_i f^i|e_i\rangle = \sum_i |e_i\rangle\langle e^i|f\rangle\). Then, \(f(x)=\langle x|f\rangle = \sum_i \langle x|e_i\rangle \langle e^i|f\rangle = \sum_i f^i e_i(x)\). \(f^i = \int_a^b dxw(x)e_i^*(x)f(x)\).
\(f^i\) are called fourier coefficients or generalized fourier coefficients.
Thus, \(\ell_2\) and \(L_2^w(a,b)\) are isomorphics, i.e. the same.
Hence, given an orthonormal basis, a vector in \(L_2^w\) is characterized by an infinite sequence \((f^1,f^2,\cdots)\), i.e. a vector in \(\ell_2\), for which their sum of swaures converges to a finite value.
Therefore, all Hilbert spaces are isomorphic to \(\ell_2\).
(A bit handwavy since we have infinite dimensional vector spaces).
Identity from Generalized Fourier Coefficients
\(\mathbb{I} = \sum_i |e_i\rangle\langle e_i|\).
\(\langle x|\mathbb{I}|x'\rangle = \sum_i e_i^*(x)e_i(x') = \delta(x-x')/w(x)\).