Solution.
Viewing this problem in L2([−1,1]), we see that we need to orthogonally project ∣x∣ onto the subspace spanned by {1,x,x2,x3}. By Gram-Schmidt, we see that
e0(x)e1(x)e2(x)e3(x)=1=x=x2−31=x3−53x
are orthogonal. By calculation, we also have
∥ek∥L22=2k+12.
Thus, the orthogonal projection is given by
P(x)=k=0∑3⟨∣x∣,ek⟩ek.