Find the best approximation of the polynomial $$t^3+t^2+t+1$$ using polynomials of $M$ which is a subspace of $P_4$(unitary space of polynomials with $\deg{p}<4$) where $$M =\{p \in P_4: \deg{p}\leq2,p(t)=p(-t)\}$$
The scalar product is defined as: $<q,p>=\int_{-1}^{1}p(t)\cdot q(t)dt$
$\\$
My attempt: basis for M is obviously $\{1,t^2\}$. Now, the usual process for finding this approximation would be to find an orthonormal basis for $P_4$ e.g. $\{e_1,e_2,e_3,e_4\}$ where:$\\$
$M=[\{ e_1,e_2\}]$ and it's orthogonal complement is $M^\bot=[\{e_3,e_4\}]$
and then,for the given vector x, find it's unique decomposition $x=\alpha_1e_1+...+\alpha_4e_4$ and then the wanted approximation would be the part of that decomposition that lies in $M$, therefore $\alpha_1e_1+\alpha_2e_2$.
But here that doesn't make any sense, because it seems I can just say that the best approximation is $t^2+1$ because $M$ can only contain polynomials of $\deg{p}=0$ or $2$, and $M^\bot$ can contain only polynomials of $\deg{p}=1$ or $3$. So $\alpha_1e_1+\alpha_2e_2$ can never depend on $\alpha_3e_3+\alpha_4e_4$ because of the difference in the polynomial degrees.
So, I'm not sure what I'm supposed to do here really, is that just it?
An orthogonal base for $M$ is given by $\langle 1,3t^2-1\rangle$ and an orthonormal base is given by $\langle \frac{1}{\sqrt{2}},\sqrt{\frac{5}{8}(3t^2-1)} \rangle $, hence the wanted projection is given by
$$\small \frac{1}{2}\left(\int_{-1}^{1}(1+t+t^2+t^3)\,dt\right)+\frac{5}{8}\left(\int_{-1}^{1}(1+t+t^2+t^3)(3t^2-1)\,dt\right)(3t^2-1)$$ i.e. by $\frac{4}{3}+\frac{1}{3}(3t^2-1)=\color{red}{\large t^2+1}$, correct.