Finding coefficients using Lengendre Polynomials

• Nov 25th 2008, 10:13 AM
Happy Dancer
Finding coefficients using Lengendre Polynomials

f(x, y) = 3 x^2 + x y - x + y^2

f(x, y) = Sigma an(y)Pn(x)

f(x, y) = Sigma bn(x)Pn(y)

Find a and b.
• Nov 25th 2008, 12:16 PM
shawsend
Hey, aren't those just the generalized Fourier coefficients? That is:

$f(x,y)=\sum_{n=0}^{\infty}c_n x^n$

where:

$c_n=\langle P_n,f(x,y)\rangle=\int_{-1}^{1} f(x,y) P_n(x)dx$

Although may have to normalize them first. Not sure though. It's a start however. :)
• Nov 25th 2008, 02:39 PM
Happy Dancer
Ok I've being doing some reading about the Fourier-Legendre series, but I don't know what to do when its a function of two variables. Also the question asks me to look at the first three Legendre polynomials, why?
• Nov 25th 2008, 04:03 PM
shawsend
Hey I made a mistake up there: should have formed the sum with the Legendre polynomials:

$f(x,y)=\sum_{n=0}^{\infty}c_n(y) P_n(x)
$

and:

$c_n(y)=\langle P_n,f(x,y)\rangle=\frac{2n+1}{2}\int_{-1}^{1} f(x,y) P_n(x)dx$

Need to review orthognal polynomials and orthonormal basis. I'm not sure why the $\frac{2n+1}{2}$ is needed above. Perhaps to normalize the set of functions. Anyway, just to check this, I plugged it into Mathematica:

Code:

In[26]:= f[x_, y_] := 3*x^2 + x*y - x + y^2; clist = Table[Subscript[c, n] = ((2*n + 1)/2)*     Integrate[f[x, y]*LegendreP[n, x],       {x, -1, 1}], {n, 0, 10}] FullSimplify[Sum[clist[[n + 1]]*LegendreP[n, x],   {n, 0, 10}]] Out[27]= {(1/2)*(2 + 2*y^2), (3/2)*(-(2/3) + (2*y)/3), 2,   0, 0, 0, 0, 0, 0, 0, 0} Out[28]= 3*x^2 + x*(-1 + y) + y^2