The first equation defines the inner product (f,g) but the sentence following fixes the integration domain of f and \psi_i; the latter should be "g".