= Solution
{c}
For any $q\in\Pi_n$, the difference $p-q$ lies in $\Pi_n$ and is orthogonal to $f-p$. The <Pythagorean theorem for inner product spaces> gives
$$
\|f-q\|^2=\|(f-p)+(p-q)\|^2=\|f-p\|^2+\|p-q\|^2\geq\|f-p\|^2.
$$
Thus the <orthogonality> condition proves minimality, and equality forces $q=p$.
Write the requested linear <polynomial> as $p=a+bx$. Orthogonality to one and $x$ gives
$$
\int_{-1}^1x^2(x^2-a-bx)dx=0,\qquad
\int_{-1}^1x^3(x^2-a-bx)dx=0.
$$
Odd integrals vanish, leaving $2/5-2a/3=0$ and $-2b/5=0$. Consequently
$$
\boxed{p(x)=3/5.}
$$
The weight's single zero does not destroy positive definiteness on continuous functions: a nonzero continuous function is nonzero on an interval containing points where $x^2>0$. The preceding projection argument therefore applies to this <inner product>.
Back to article page