I am trying to find an orthonormal basis of the vector space $P^{3}(t)$ with an inner product defined by
$$\langle f, g \rangle = \int_0^1f(t)g(t)dt$$
by applying the gram schmit alogorotin to ${(1,1+t,t+t^2,t^3)}$=$(v_1,v_2,v_3,v_4)$
Here is what I have done so far;
Suppose first we just look for an orthogonal basis, say $(w_1,w_2,w_3,w_4)$
Set $ w_1=v_1, ie , w_1=1$
Then $w_2= v_2 - \lt \frac{v_2, w_1}{w_1,w_1} \gt w_1$
$$w_2= (1+t)- \frac{\int_0^1 1+t dt}{\int_0^1 1 dt}(1)$$
$w_2=t-\frac{1}{2}$
$$w_3= (t+t^2)-\frac{\int_0^1 t+t^2 dt}{\int_0^1 1 dt}(1)-\frac{\int_0^1 t^3+t^2/2-t/2 dt}{\int_0^1(t-1/2)^2dt}(t-\frac{1}{2})$$
$w_3=(t+t^2)-\frac{5}{6}-2t+1=t^2-t+\frac{1}{6}$
$$w_4= t^3-\frac{1}{4}-\frac{\int_0^1 t^4-\frac{t^3}{2} dt}{\int_0^1 (t-\frac{1}{2})^2dt}(t-\frac{1}{2})-\frac{\int_0^1 t^5-t^4+t^3/6 dt}{\int_0^1(t^2-t+1/6)^2dt}(t^2-t+1/6)$$
Which I seem to evaluate to be $t^3-3t^2/2-12t/5+39/20$
I keep seeming to get issues with finding $w_4$ though.I don't know if it just arithmetic errors or what. I get something new or huge fractions and I don't know it that would make sense. I set it up the same way as I would any of the others, but I use $v_4.$ Anyways, if someone could show me that and the normalization that'd be great. ( I know to normalize we divide just by the length of the vector). Plus, is what I have so far valid? Anything I'm missing or any tips/tricks?