I have a vector space of polynomials at most second degree with basis with the inner product defined as

and I want to find an orthonormal basis using the Gram-Schmidt process.

I've found that

For I have

However when I take the inner product between and the result is not zero, but it should be since they're orthogonal. However if I take the inner product with the upper limit at 1 they are zero.

I'm pretty sure I've been applying the Gram-Schmidt process using the inner product I defined above. Does anyone know what I did wrong?