Q:

Find polynomial of smallest norm and of degree $\le 3$ for which $p(0) = 2$

Consider the space of polynomials of degree less than or equal to $3$, whose value at $0$ is equal to $2$, i.e., $\{p \in P_3 : p(0)
 = 2\}$). Find which element of this space has the smallest length using the norm $$\|q\| = \int_{-1}^1 q^2(x) \,\mathrm d x$$

I truly have no idea on how to solve this problem. I am studying numerical analysis in the context of polynomials and orthogonal projections

A:

A generic polynomial in your space is of the form
$$p(x)= a + bx + cx^2+dx^3$$
You can then impose the condition $p(0)=2$ and explicitly compute the norm. Can you take it from here?

A:

Every polynomial $q(x)$ of the order $3$ or less can be presented in the form of
$$q(x) = c_0P_0(x) + c_1P_1(x)_+c_2P_2(x)+c_3P_3(x),\tag1$$
where
$$P_0(x)=1,\quad P_1(x) = x,\quad P_2(x) = \frac12(3x^2-1),\quad P_3(x)=\frac12(5x^3-3x)\tag2$$
are the Legendre polynomials.
Easy to see that the condition $q(0)=2$ means
$$c_0-\frac12c_2 = 2,$$
or
$$c_2 =2(c_0--2).\tag3$$
Legendre polynomials are orthogonal:
$$\int\limits_{-1}^1P_n(x)P_m(x) = \frac2{2n+1}\delta_{mn},\tag4$$
where  $\delta_{mn}$ is the Kronekker symbol.
From $(1),(4)$ should
$$\|q\|^2 = \sum\limits_{k=0}^3 c_k^2\int\limits_{-1}^1 P_k^2(x)\,dx + 2\sum\limits_{0\le i<j} c_k^2\int\limits_{-1}^1 P_i(x)P_j(x)\,dx,$$
$$\|q\|^2 \ge 2c_0^2+\frac25c_2^2 = \frac25(5c_0^2+4(c_0-2)^2)).\tag5$$
Taking in account $(3),$ the coefficients of the minimal polynomial can be found from the system
\begin{cases}
c_1=c_3 = 0\\
c_2 = 2c_0 -4\\
c_0 = \operatorname{argmin}\left(5c_0^2+4(c_0-2)^2\right).\tag6
\end{cases}
Since
$$\left(5c_0^2+4(c_0- 2)^2\right)'=18c_0-16,$$
then
$$c_0 = \frac89,\quad c_2 = -\frac{20}9,\tag7$$
$$q(x)=-\frac89-\frac{10}9(3x^2-1),$$
$$q(x) = 2-\frac{10}3 x^2.\tag8$$
The norm is
$$\|q(x)\|^2 = 2\cdot\frac{64}{81}+\frac25\cdot\frac{400}{81}= \frac{32}9.$$

