Show that the functions $x^n $ for $n ≥ 0$ span $L^2([−1, 1])$ (Hint: reduce to the properties of Fourier series in $L^2([0,1])$, which you can easily translate to $L^2([−1, 1])$.) By the Gram-Schmidt process, these functions determine an orthonormal basis $e_0(x),e_1(x), . . .$ for $L^2([−1, 1])$ (which are polynomials, clearly).
I am not sure what to do here. I am sure that the translation-dilation property of integrals takes care of the case of $L^2 ([0,1]) $. Does Stone-Weierstrass work here? Let $f \in L^2 ([0,1]) $. Given $\epsilon \geq 0$ we can pick a polynomial $p(x) $ such that $|f-p (x)| \leq \epsilon $. Thus for $\epsilon \leq 1$ we have that $|f-p (x)|^2 \leq \epsilon^2 < \epsilon $ and hence the integral of the aforementioned annuli gives us that the norm of $f-p $ is less than $\epsilon $. However, this argument does not consider anything about properties related to Fourier series or of Gram-Schmitt process. How can I get the first few terms $e_0, e_1,...$?
The Stone-Weierstrass theorem (or, in this case, the Weierstrass approximation theorem) is about continuous functions. So, take $f\in L^2\bigl([0,1]\bigr)$ and take $\varepsilon>0$. Then there is a continuous function $g\colon[0,1]\longrightarrow\mathbb R$ such that $\|f-g\|_2<\frac\varepsilon2$. Now, using your idea, you can prove that there is a polynomial function $p\colon[0,1]\longrightarrow\mathbb R$ such that $\|g-p\|_2<\frac\varepsilon2$. So, $\|f-p\|_2<\varepsilon$.