[Math] Laguerre polynomials and least squares polynomial

maplenumerical methods

A similar question from Orthogonal polynomials and Gram Schmidt says:

Use the Laguerre polynomials, i.e, $L_1(x)=x-1$,$L_2(x)=x^2-4x+2$, and $L_3(x)=x^3-9x^2+18x-6$, to compute the least squares polynomials of degree one, two, and three on the interval $(0,\infty )$ with respect to the weight function $w(x)=e^{-x}$ for $f(x)=x^3$.

I know that the answer is $6L_0(x) + 18L_1(x) + 9L_2(x) – L_3(x)$, but I'm not sure on how to obtain it either by hand or by maple.

I am working on it and meanwhile if anyone has any ideas to help me then please share it here. Thanks.

Best Answer

I presume that by least squares polynomial, you mean determine coefficients $c_i$ in $$ F(x):=c_0L_0(x)+c_1 L_1(x)+c_2L_2(x)+c_3 L_3(x) $$ such that $$\|f-F\|_w^2:=\int_0^\infty |f(x)-F(x)|^2 w(x)\,dx$$ is minimized, where $w(x)=e^{-x}$.

In that case, the orthogonality of the $L_i(x)$ (and you would need to add $L_0(x)$) together with the Best Approximation Theorem say that the coefficients should be chosen according to $$c_i={\langle f,L_i\rangle_w\over \langle L_i,L_i\rangle_w}={\int_0^\infty f(x)L_i(x)e^{-x}\,dx\over \int_0^\infty L_i^2(x)e^{-x}\,dx}, \quad i=0,1,2,3. $$