Hello I find this problem on a list of problems from my university but I am stuck.
$\textbf{Problem:}$ Let $L^2[0,1]$ and set $p_j(t)=t^j$ sucht that $U=span(p_1(t),p_2(t), p_3(t))$. Let $f(t)=t^3-t$. Find $u\in U$ such that $$\|f-u\|=\inf_{v\in U}\|f-v\|$$
My attempt was try to write $U$ as a span of a orthonormal basis through Gram-Schmidt algorithm (using $p_1(t),p_2(t), p_3(t)$) but the result was very messy.
In general I do not know how to start this kind of problems, any suggestion?