= Solution
Use first-kind <Chebyshev polynomials> $T_j$, characterized by $T_j(\cos\theta)=\cos(j\theta)$. Substituting $x=\cos\theta$ converts the weighted <inner product> into $\int_0^\pi g(\cos\theta)h(\cos\theta)d\theta$. Hence these <polynomials> are <orthogonal>, with squared <norms> $\pi$ for $j=0$ and $\pi/2$ for $j\geq1$.
For the specified <function>, $f(\cos\theta)=\sin\theta$. Its constant projection coefficient is $\pi^{-1}\int_0^\pi\sin\theta\,d\theta=2/\pi$. For $j\geq1$ the coefficient is $(2/\pi)\int_0^\pi\sin\theta\cos(j\theta)d\theta$. Symmetry about $\pi/2$ makes it zero for odd $j$. For $j=2m$, the product-to-sum identity gives
$$
\int_0^\pi\sin\theta\cos(2m\theta)d\theta
=\frac1{1+2m}+\frac1{1-2m}=\frac2{1-4m^2}.
$$
Therefore the <Chebyshev projection of a semicircle> is
$$
\boxed{p_n(x)=\frac2\pi-\frac4\pi\sum_{m=1}^{\lfloor n/2\rfloor}\frac{T_{2m}(x)}{4m^2-1}.}
$$
In particular the best degree-at-most-$n$ <polynomial> is even, so for odd $n$ its actual degree is at most $n-1$.
Back to article page