While learning the Gram-Schmidt orthonormalization process, my text would discuss orthonormalizing the standard basis for a subspace of $C[0,1]$, which is the space of continuous differentiable functions on $[0,1]$ with the inner product $\langle f, g \rangle = \displaystyle\int_0^1 f(x) g(x) dx$.
I know that orthonormalizing the standard basis of the subspace of, say, quadratics (that is, ${1,x,x^2}$) requires setting $w_1 = 1$, then taking $w_2=v_2-\displaystyle\frac{\langle v_2,w_1\rangle}{\langle w_1,w_1 \rangle} w_1$, etc. as per the normal process, and then making a unit vector out of it.
My first question is, is it correct to say that, given $w_1 = v_1$, $w_i = v_i-\displaystyle\sum_{j=2}^i \frac{\langle v_j,w_{j-1}\rangle}{\langle w_{j-1},w_{j-1} \rangle} w_{j-1}$, before normalizing?
Is there a way to find a closed formula for the $i$th vector in the orthonormal basis of $n$th degree polynomials in $C[0,1]$? Even better, is there a way to generalize this to $C[a,b]$, where $\langle f, g \rangle = \displaystyle\int_a^b f(x) g(x) dx$?