Solution (source code)

= Solution

For each node define its <Lagrange interpolation> cardinal <polynomial> $\ell_i(t)=\prod_{j\ne i}(t-x_j)/(x_i-x_j)$. Its square has degree $2n-2<2n$ and nodal values $\ell_i(x_j)^2=\delta_{ij}$. Exactness therefore gives $a_i=\int_{-1}^1\ell_i(t)^2dt$. The <polynomial> is nonzero, so continuity makes this integral strictly positive. Thus $\boxed{a_i>0}$ for every node.