I have been given a weight function $\displaystyle w = xe^{-x} $ and $\displaystyle u_n = x^n, n = 0,1,2,.. $. I don't exactly get what bit to use to integrate because in my definition it says:

$\displaystyle \displaystyle \varphi_i = \frac{\psi_i}{\left(\int \psi_{i}^{2}wdx\right)^{1/2}} $

where $\displaystyle \psi_i = u_i + a_{i,0}\varphi_0 + a_{i,1}\varphi_1 + ... $

But how can you work out $\displaystyle \psi_i $ if you need $\displaystyle \varphi_i $ and to work out $\displaystyle \varphi_i $ you need $\displaystyle \psi_i $?