Solution (source code)

= Solution

The defining relation for $P_{\mathcal U}$ gives
$$
(f-P_{\mathcal U}f,v)=0
\qquad\forall v\in\mathcal U_n.
$$
Part (a) therefore shows that $P_{\mathcal U}f$ is the best approximation. Moreover, $P_{\mathcal U}f$ and $f-P_{\mathcal U}f$ are orthogonal, so
$$
\|f\|^2=\|P_{\mathcal U}f\|^2
+\|f-P_{\mathcal U}f\|^2.
$$
Thus <orthogonal projection> is a contraction:
$$
\boxed{\|P_{\mathcal U}f\|\leq\|f\|}.
$$