Gram Schmidt Process involving integrals Apply the Gram Schmidt Process to basis $B = \{1,x,x^2\}$ of all polynomials of degree at most $2$ with respect to the following inner product space to obtain an orthonormal basis: 
$$\langle p(x), q(x) \rangle = \int_{-1}^{1} p(x)q(x)dx$$ 


*

*I've been doing problems like this but I never realized that the process was being applied to specific inner product spaces and this confused me. 

*Does this question alter the Gram Schmidt process from the general algorithim on: https://www.wikiwand.com/en/Gram%E2%80%93Schmidt_process ?

Start with $1$, and normalized it so that $\|\alpha 1\|=1$. So,
$$
        p_0 = \left(\frac{1}{\sqrt{2}}\right)1.
$$
Next, take $x$ and subtract the projection of $x$ onto $p_0$:
$$
       x - (x,p_0)p_0 = x -\left(\frac{1}{2}\int_{-1}^{1}xdx\right)1 = x.
$$
Then normalize to obtain
$$
           p_1 = \frac{1}{(x,x)^{1/2}}x=\frac{1}{\left(\frac{x^3}{3}|_{x=-1}^{x=1}\right)^{1/2}}x=\sqrt{\frac{3}{2}}x
$$
Finally, start with $x^2$ and subtract the components along $p_0$ and $p_1$:
$$
      x^2 - (x^2,p_1)p_1 - (x^2,p_0)p_0 \\
     = x^2 - \left(\int_{-1}^{1}t^2 \sqrt{\frac{3}{2}}tdt\right)\sqrt{\frac{3}{2}}x - \left(\int_{-1}^{1}t^2\frac{1}{\sqrt{2}}dt\right)\frac{1}{\sqrt{2}} \\
   = x^2 - \left(\left.\frac{3}{2}\frac{t^4}{4}\right|_{t=-1}^{1}\right)x-\left(\left.\frac{1}{2}\frac{t^3}{3}\right|_{t=-1}^{1}\right)1 = x^2 - \frac{1}{3}
$$
Then normalize
\begin{align}
       p_2 & = \frac{1}{(x^2-1/3,x^2-1/3)^{1/2}}(x^2-1/3) \\
           & = \frac{1}{\left(\int_{-1}^{1}(t^2-1/3)^2dt\right)^{1/2}}(x^2-1/3)
\end{align}
