Solution (source code)

= Solution

With the <weighted inner product> $\langle p,q\rangle_w=\int_{-1}^1p(x)q(x)w(x)\,dx$, a family of <orthogonal polynomials> has $\deg p_j=j$, each $p_j$ nonzero, and
$$
\boxed{\langle p_j,p_k\rangle_w=0\quad(j\ne k).}
$$
Continuity and positivity of the weight make the <integral> finite and give $\langle p_j,p_j\rangle_w>0$. Unit norm or monic leading coefficient is an additional optional normalization.