We see that the extension of Fourier series from one-dimension case to two-dimension case is straightforward when expressed in terms of the complex exponential function einπx∕L. However, if we use sin(mπx∕Lx), cos(mπx∕Lx), sin(nπy∕Ly), and cos(nπy∕Ly) as basis functions, the derivation of the two-dimensional Fourier series of G(x,y) is a little complicated (product-to-sum trigonometric identities are involved to simplify the results). Let’s see the derivation. A two-dimensional function G(x,y) can be first expanded as Fourier series about x,
| (127) |
(the zero-frequency component is dropped, will take it back later) and then the two coefficients am(y) and bm(y) can be further expanded as Fourier series about y,
| (128) |
| (129) |
(the zero-frequency component is dropped, will take it back later) Substituting Eq. (128) and (129) into Eq. (127), we obtain
Using the product-to-sum trigonometric identities, equation (130) is written
| (132) |
| (133) |
| (134) |
| (135) |
| (136) |
| (137) |
Noting that bm,−n(b) = −bm,n(b), and am,−n(b) = −am,n(b) and sin(0) = 0, then Eq. (131) can be written as
The coefficients can be further written as
Then comes the drudgery to handle the special cases of m = 0 and/or n = 0. The final results are identical to Eqs. (123)-(126). This kind of derivation is also discussed in my notes on mega code.