Compute Fourier Coefficients of PDE

16 Views Asked by At

I need some help with the computation of the Fourier Coefficients, please.
$-\triangle u\ +\ \nabla p \ =\ f$
$\nabla u = 0$
on a rectangular domain $\Omega\ =\ (0,L) \times(0,1)$.
The discrete Fourier series should look like $u(x,y)\ = \ \Sigma_{i,j}\ u_{i,j} \sin(i\Pi xL)\sin(i\Pi y)$ and $p(x,y)\ = \ \Sigma_{i,j}\ p_{i,j} \sin(i\Pi xL)\sin(i\Pi y)$. How can I compute the coeffitients for $f\ =\ 0$ and general f?