Solution (source code)

= Solution

\b[An arbitrary <orthonormal basis> does not have the printed property.] For example on $[-1,1]$ with $w=1$, take the usual normalized constant and linear <Legendre polynomials> and swap their labels $p_0,p_1$. The resulting family is still an <orthonormal basis> but $p_0$ has one zero, rather than zero. The necessary intended hypothesis is that $p_k$ has <vertex degree>[degree] $k$, or equivalently that the <basis> is obtained by orthogonalizing $1,x,x^2,\ldots$ in that order.

Under this hypothesis, $p_k$ is <orthogonal> to every <polynomial> of <vertex degree>[degree] less than $k$. Let $t_1,\ldots,t_s$ be its sign-changing zeros in $(a,b)$ and put $q(x)=\prod_{j=1}^s(x-t_j)$. If $s<k$, then $p_kq$ has a constant nonzero sign except at finitely many points: each interior sign change has been canceled, and all remaining zeros have even multiplicity or occur at endpoints. Since $w>0$, its integral cannot vanish. But <orthogonality> to $q$, of <vertex degree>[degree] $s<k$, says that integral is zero, a contradiction. Thus $s\ge k$. Since the <polynomial> has <vertex degree>[degree] $k$, it follows that
$$
\boxed{p_k\text{ has exactly }k\text{ distinct simple zeros, all in }(a,b).}
$$
This proves the requested conclusion in its standard intended setting and explains why it does not follow from the literal <basis> statement alone.