Fourier Cosine series expansion for two dimensional function

122 Views Asked by At

I have a two dimensional function with its values and range. I need to expand the function in Fourier cosine series. The function as follows:

$$f(x,y) = \begin{cases} A &, -\frac{L}{2} + 2nL < x < \frac{L}{2} + 2nL\ \text{and}\ -\frac{L}{2} + 2qL < y < \frac{L}{2} + 2qL\\ -A &, \frac{L}{2} + 2nL < x < \frac{3L}{2} + 2nL\ \ \text{and}\ \frac{L}{2} + 2qL < y < \frac{3L}{2} + 2qL \end{cases}$$

where $n, q \in \mathbb{Z}$ and $L$ is a constant.