Use the orthogonality relation to find expressions for the coefficients $\displaystyle c_n$ in the eigenfunction expansion of a function f(x):
$\displaystyle f(x) \approx \sum_{n=1}^{\infty} c_n\phi_n$
Ok... So... We get:
$\displaystyle <f,\phi_n(x)> = \sum_{n=1}^{\infty}c_n \int_a^b w(x)\phi_n(x)^2~dx = \sum_{n=1}^{\infty}c_n <\phi_n,\phi_n>$
Which means that:
$\displaystyle \frac{<f,\phi_n(x)>}{<\phi_n,\phi_n>} = \sum_{n=1}^{\infty} c_n$
Is that along the right lines?