Least square polynomial fitting
Least square polynomial fitting problem
Given $f\in C[a,b]$ and a weight function $w(x)\geq 0$, find the (weighted) least square approximant $$ \begin{align*} p^\ast = \arg \min_{p\in \mathcal{P}_n} \|f-p\|_{w} \end{align*} $$ where $$ \begin{align*} \|f-p\|_w = \left(\int_{a}^{b} |f-g|^2 w \d x\right)^{1/2}. \end{align*} $$