Solution (source code)

= Solution

Multiply the <Gegenbauer differential equation> by
$$
w(x)=(1-x^2)^{\alpha-1/2}.
$$
It becomes the <Sturm-Liouville form>
$$
\frac d{dx}\left((1-x^2)^{\alpha+1/2}y'\right)
+n(n+2\alpha)w(x)y=0.
$$
For two polynomial solutions of degrees $m\ne n$, multiply their equations crosswise, subtract, and integrate over $(-1,1)$. The boundary term vanishes because $\alpha>0$ and $(1-x^2)^{\alpha+1/2}\to0$. Since the eigenvalues $n(n+2\alpha)$ are distinct,
$$
\boxed{\int_{-1}^1C_m^\alpha(x)C_n^\alpha(x)(1-x^2)^{\alpha-1/2}\,dx=0}.
$$
Thus $a=-1$, $b=1$, and the displayed function is the weight.

Every interior root is simple: a solution and its derivative cannot both vanish at an ordinary point of a second-order linear differential equation unless the solution is identically zero. Let $x_1,\ldots,x_k$ be all interior roots and put $q(x)=\prod_i(x-x_i)$. If $k<n$, then $q$ has degree below $n$, so <orthogonal polynomial>[orthogonality] gives
$$
\int_{-1}^1C_n^\alpha(x)q(x)w(x)\,dx=0.
$$
But $C_n^\alpha/q$ has no zero and constant sign on $(-1,1)$, whence the integrand $q(x)^2(C_n^\alpha(x)/q(x))w(x)$ has one strict sign except at finitely many points. Its integral cannot vanish, a contradiction. Therefore $k=n$: all $n$ roots are real, simple, and lie in $(-1,1)$.