Solution (source code)

= Solution

The <dual space> $V^*$ consists of all real <linear functionals> on $V$. If $v_1,\ldots,v_d$ is a <basis>, its <dual basis> $\varepsilon^1,\ldots,\varepsilon^d$ is characterized by $\varepsilon^i(v_j)=\delta_{ij}$; explicitly $\varepsilon^i$ extracts the $i$th coordinate. The natural map $J:V\to V^{**}$ is $J(v)(\phi)=\phi(v)$. It is linear and injective, because the coordinate functionals separate nonzero vectors, and both spaces have dimension $d$. Hence it is an isomorphism. Its definition uses no choice of <basis>, which is the meaning of “naturally” here.

Evaluation $e_x(p)=p(x)$ is linear, so belongs to $V_n^*$. For distinct nodes $x_i$, define the <Lagrange interpolation polynomials>
$$
\ell_i(t)=\prod_{j\ne i}\frac{t-x_j}{x_i-x_j}.
$$
They lie in $V_n$ and obey $e_{x_j}(\ell_i)=\delta_{ij}$. Applying a putative relation $\sum a_ie_{x_i}=0$ to $\ell_j$ gives $a_j=0$, so the $n+1$ evaluations are independent and form a <basis> of $V_n^*$. The <polynomials> $\ell_i$ give their dual <basis> in $V_n$, using the canonical identification with $V_n^{**}$.

Every $p\in V_n$ has the interpolation expansion $p(t)=\sum_i p(x_i)\ell_i(t)$: the difference has $n+1$ distinct roots but degree at most $n$. Integrate to get the <numerical integration> weights $\lambda_i=\int_{-1}^1\ell_i(t)dt$. For the specified symmetric five nodes, symmetry gives weights $(a,b,c,b,a)$. Exactness on $1,t^2,t^4$ gives
$$
2a+2b+c=2,\qquad 2a+\frac b2=\frac23,\qquad 2a+\frac b8=\frac25.
$$
Odd moments vanish automatically. Solving yields <Boole's rule>
$$
\boxed{(\lambda_1,\ldots,\lambda_5)=\frac1{45}(7,32,12,32,7).}
$$