Hey I made a mistake up there: should have formed the sum with the Legendre polynomials:
=\sum_{n=0}^{\infty}c_n(y) P_n(x)<br />
)
and:
=\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
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