I am asked to calculate the Fourier Transform $F(p,q)$ of a function $h(x,y)$, which is an infinite checkerboard consisting of square areas, each square has side $a$, and within these areas, the value of $h$ is either $m$ or $n$, depending on which square the point $(x,y)$ falls. (So normal checkerboard, just instead of black and white, its $m$ and $n$ now.)
I think I should proceed with this integral:
$$F(p,q) = \int_{-\infty}^\infty h(x,y) e^{-i(px+qy)}dxdy$$
Though I don't know how to proceed without a computer.
Am I doing the right thing - ie is there a simple way to do this? If yes, what's that, if no, how to proceed?
For the $n$ value checker (centered) the integral is simply $$\int_{-\frac{a}{2}}^{\frac{a}{2}}\int_{-\frac{a}{2}}^{\frac{a}{2}} n e^{-i(px+qy)}dxdy$$ For the $m$ value checker (centered) the integral is simply $$\int_{-\frac{a}{2}}^{\frac{a}{2}}\int_{-\frac{a}{2}}^{\frac{a}{2}} m e^{-i(px+qy)}dxdy$$
All you have to do now is use your imagination and try stacking the checkers (one next to the other and one on top of the other. For this let's define a function that pushes the limits by steps of $a$, $$N_{l_x,l_y}(p,q) = n \int_{-\frac{a}{2} + al_y}^{\frac{a}{2} + al_y}\int_{-\frac{a}{2} + al_x}^{\frac{a}{2} + al_x} e^{-i(px+qy)}dxdy$$ where $l_x,l_y$ are integers. Likewise, $$M_{l_x,l_y}(p,q) = m \int_{-\frac{a}{2} + al_y}^{\frac{a}{2} + al_y}\int_{-\frac{a}{2} + al_x}^{\frac{a}{2} + al_x} e^{-i(px+qy)}dxdy$$ Notice that both functions depend on the same double integral, which could be decomposed along the $x$ and $y$ directions, $$\int_{-\frac{a}{2} + al_y}^{\frac{a}{2} + al_y}\int_{-\frac{a}{2} + al_x}^{\frac{a}{2} + al_x} e^{-i(px+qy)}dxdy = \Big(\int_{-\frac{a}{2} + al_x}^{\frac{a}{2} + al_x} e^{-ipx} \ dx \Big) \Big( \int_{-\frac{a}{2} + al_y}^{\frac{a}{2} + al_y} e^{-iqy} \ dy \Big)$$
Using $$\int_a^b \exp(-ipx) \ dx = \frac{i}{p}(e^{-ipb} - e^{-ipa} )$$ we can say $$\int_{-\frac{a}{2} + al_x}^{\frac{a}{2} + al_x} e^{-ipx} \ dx = e^{-ipal_x}\frac{i}{p}(e^{-ip\frac{a}{2}} - e^{ip\frac{a}{2}} )$$ and $$\int_{-\frac{a}{2} + al_y}^{\frac{a}{2} + al_y} e^{-iqy} \ dy = e^{-ipal_y}\frac{i}{p}(e^{-ip\frac{a}{2}} - e^{ip\frac{a}{2}} )$$
Then your integral could be written as a sum $$F(p,q) = \sum_{l_x \in \lbrace \text{even integers}\rbrace \\ l_y \in \lbrace \text{even integers}\rbrace}N_{l_x,l_y}(p,q) + \sum_{l_x \in \lbrace \text{odd integers}\rbrace \\ l_y \in \lbrace \text{odd integers}\rbrace}M_{l_x,l_y}(p,q) $$