Hi guys.

I have the following base for $\displaystyle \mathbb{R}_2[x]$: $\displaystyle \left \{ 1,x,x^2 \right \}$

I want to orthogonalize this base with respect to the inner product:

$\displaystyle <p(x),q(x)>=\int_{0}^{1}p(x)q(x)dx$

somthing doesn't add up, and I suspect that I have made some calculation error, even though I checked several times.

so let's say the new orthogonal base will be $\displaystyle \left \{ \tilde{v}_1, \tilde{v}_2, \tilde{v}_3 \right \}$

I first set $\displaystyle \tilde{v}_1=v_1=1$.

then:

$\displaystyle \tilde{v}_2=v_2-\frac{v_2\cdot v_1}{v_1\cdot v_1}v_1=x-\frac{1}{2}$ (I checked it - it is correct, since it's orthogonal to $\displaystyle v_1$, which is 1)

but when I try to find $\displaystyle \tilde{v}_3$, I get:

$\displaystyle \tilde{v}_3=v_3-\frac{v_3\cdot v_1}{v_1\cdot v_1}v_1-\frac{v_3\cdot v_2}{v_2\cdot v_2}v_2$

$\displaystyle \tilde{v}_3=x^2-\frac{\int_{0}^{1}x^2}{\int_{0}^{1}1}1-\frac{\int_{0}^{1}x^3}{\int_{0}^{1}x^2}x$

$\displaystyle \tilde{v}_3=x^2-\frac{1}{3}-\frac{3}{4}x$

so this is what I get, but $\displaystyle \tilde{v}_3$ is NOT orthogonal to neither $\displaystyle \tilde{v}_1$ or $\displaystyle \tilde{v}_2$!

any help would be greatly appreciated!