Weighted linear projection of a semicircle profile (source code)

= Weighted linear projection of a semicircle profile
{title2=$p(x)=6-3\pi/2+(9\pi/4-8)x$}

For the weight $w(x)=x$ on $[0,1]$, the <normal equations> for projecting $\sqrt{1-x^2}$ onto $\operatorname{span}\{1,x\}$ have <Gram matrix> $\left(\begin{smallmatrix}1/2&1/3\\1/3&1/4\end{smallmatrix}\right)$ and right side $(1/3,\pi/16)^T$. Its determinant is $1/72$, and inversion gives the displayed <polynomial>. <orthogonality> of the residual to both <basis> functions proves <best approximation> in the weighted <norm>.