I've been constructing an orthonormal basis of $\mathcal{P}_2(\mathbb{R})$ with respect to the inner product $$\langle p,q \rangle = \int_0^1p(x)q(x)dx.$$ Starting with the standard basis $\{1,x,x^2\}$ and using the Gram-Schmidt Procedure I have come up with the basis $$e_1 = 1,\;\; e_2 = 2\sqrt{3}(x - \tfrac{1}{2}),\;\; e_3=\tfrac{5}{6} +x - x^2.$$
However I am struggling with the condition that for an orthonormal basis $\langle e_j , e_k\rangle = 1$ if $j=k$ or else $\langle e_j ,e_k\rangle = 0$ for $j\neq k$.
Given the above inner product my defined $\Vert e_3\Vert = 1$ but $\langle e_1, e_3 \rangle = 1$.
I'm not quite sure how to resolve this. It seems like a contradiction.
edit: I am definitely wrong. $\Vert e_3\Vert \neq 1.$ Thank you for pointing out my error!
The mistake in two places. First the calculation is wrong. $e_3 = 6\sqrt{5}(x^2 -x +\frac{1}{6}).$
Second my logic was incorrect. I kept looking for something that would have $\int_0^1 e_3 dx = 1$ which is incorrect. I need to find $\langle e_3, 1 \rangle = \int_0^1 e_3 dx = 0$ and $\langle e_3, e_3\rangle = \int_0^1 e_3^2dx =1.$