Solution (source code)

= Solution

With $x=\cos\theta$, the weight becomes $\sin^2\theta\,d\theta$. Since
$$
U_n(\cos\theta)=\frac{\sin((n+1)\theta)}{\sin\theta},
$$
the sine orthogonality relations show that $P_n$ is a scalar multiple of the <Chebyshev polynomial of the second kind> $U_n$. Its roots are
$$
\boxed{\omega_j(n)=\cos\frac{j\pi}{n+1}},
\qquad 1\leq j\leq n.
$$
The printed normalization $P_n(0)=1$ is possible only for even $n$; then $U_n(0)=(-1)^{n/2}$ and
$$
P_n=(-1)^{n/2}U_n.
$$
For odd $n$, every such orthogonal polynomial is odd and vanishes at zero, so that normalization is inconsistent.