C.1 For 2D real-valued functions

The formula for expanding a real-valued two-dimensional function G(x,y) in terms of basis functions cos( mπx-  nπy)
  Lx +  Ly and sin(m-πx  nπy)
  Lx +  Ly can be readily recovered from Eqs. (120) and (119). For notation ease, define

    m πx   nπy
α = -Lx- + Ly-.
(121)

Then Eq. (120) is written as

            ∑∞    ∞∑
G(x,y)  =             cmn [cosα + isinα ]
           m= −∞ n= −∞ (                              )
            ∑∞    ∞∑    ---1--∫ Ly ∫ Lx
        =              4LxLy  − Ly −Lx G (x,y)cos αdxdy [cosα + isinα]
           m= −∞ n= −∞ (      ∫    ∫                  )
            ∑∞    ∞∑    ---1--  Ly   Lx
        +              4LxLy  − Ly −Lx G (x,y)sinαdxdy [− icosα + sin α],
           m= −∞ n= −∞
Sine G(x,y) is assumed to be real-valued, the imaginary parts of the above expression will cancel each other. Therefore, the above expansion is simplified to
             ∞∑    ∑∞
G (x,y)  =
           m= −∞ n=−∞
            (   1   ∫ Ly∫ Lx               )
           [  ------         G(x,y)cosαdxdy  cosα
           (  4LxLy  −Ly −Lx              )
               1   ∫ Ly ∫ Lx
        +    4LxLy-         G (x,y)sinαdxdy  sin α].   (122)
                    −Ly  −Lx
This is a compact Fouier expansion for 2D real-valued function. Furthermore, noting that (m,n) term is equal to (m,n) term, the above expansion can be further reduced to
            ∑∞  ∑∞
G(x,y)  =           Gcnm cosα +Gsnm sinα,         (123)
           n=−∞ m=0
with
            ∫   ∫
Gc  = --1---  Ly  Lx G(x,y)dxdy.
 00   4LxLy  −Ly − Lx
(124)

and the other coefficients given by

  c    --1---∫ Ly∫ Lx
G mn = 2LxLy  −L   −L G (x,y)cosαdxdy.
                y    x
(125)

  s      1   ∫ Ly ∫ Lx
G mn = 2LxLy-         G (x,y)sinαdxdy.
              −Ly  −Lx
(126)

Here the range of m is reduced to [0 : +]. In this case, we have an edge case, G00c, that needs special treatment. We see that allowing the index runing from −∞ to +has the advantage of that there are no edge cases that needs special treatment.