# Least Squares with Weight Function

• Nov 20th 2011, 04:23 PM
monomoco
Least Squares with Weight Function
Use the Laguerre polys
L1=x-1, L2=x^2-4x+2, L3=x^3+9x^2+18x-6
to compute least squares polys on (0, infinity) with respect to the weight fn w(x)=e^-x
for the following functions:

f(x)=x^2 , f(x)=e^-x, f(x)=x^3, f(x)=e^-2x
• Nov 20th 2011, 11:39 PM
CaptainBlack
Re: Least Squares with Weight Function
Quote:

Originally Posted by monomoco
Use the Laguerre polys
L1=x-1, L2=x^2-4x+2, L3=x^3+9x^2+18x-6
to compute least squares polys on (0, infinity) with respect to the weight fn w(x)=e^-x
for the following functions:

f(x)=x^2 , f(x)=e^-x, f(x)=x^3, f(x)=e^-2x

The Laguerre polynomials are orthogonal with respect to your weight on the given interval. So what do you know about expansion in terms of orthogonal functions?

CB
• Nov 23rd 2011, 03:02 PM
monomoco
Re: Least Squares with Weight Function
I am very confused about all this stuff, but I think when the functions are orthogonal we can use the following to calcualte coefficients in the polynomial:

$a_j = (1/a_j)$*Integral from a to b of $w(x)f(x)\Phi_j (x) dx$

Sorry, I don't really know Latex
• Nov 23rd 2011, 08:05 PM
CaptainBlack
Re: Least Squares with Weight Function
Quote:

Originally Posted by monomoco
I am very confused about all this stuff, but I think when the functions are orthogonal we can use the following to calcualte coefficients in the polynomial:

$a_j = (1/a_j)$*Integral from a to b of $w(x)f(x)\Phi_j (x) dx$

Sorry, I don't really know Latex

Define the inner product:

$\langle f,g \rangle= \int_0^{\infty} f(x)g(x) w(x)dx$

on the space of real square integrable functions over $(0,\infty)$ with respect to the weight $w(x)$. Then if $L_i,\ i=0, .. \ ,\infty$ is a complete basis of orthogonal functions for this space then:

$f(x)=\sum_{i=1}^{\infty} \frac{\langle f,L_i\rangle}{\|L_i\|}L_i(x)$

and the least squares (with respect to $w$ ) approximation to $f$ in the subspace spanned by $L_n .. L_m$ is:

$f(x)=\sum_{i=n}^{m} \frac{\langle f,L_i\rangle}{\|L_i\|}L_i(x)$

CB
• Nov 24th 2011, 08:20 AM
monomoco
Re: Least Squares with Weight Function
Not so bad after all. Thanks very much!