(Subscript[G, y]) =  { {1, 1, 1},  {1, -8, 1}, {1, 1, 1}} // 
        MatrixForm

{ {1, 2, 1},  {2, 4, 2}, {1, 2, 1}} // MatrixForm

Gaussian in 2  
        D  =  (σ^2) (E^(-(((x^2) + (y^2))/(2  (σ^2)))))

(1/16)

DCT[N_] :=  
      Table[{Table[
            Cos[(((2 n + 1) i π)/(2 N))], {n, 0, 7}]}, {i, 0, 
          7}]
IDCT[N_] :=  Transpose[DCT[N]]

N[ Flatten[DCT[8], 1]]   // MatrixForm
N[Transpose[Flatten[IDCT[8], 1]]] // MatrixForm

% // N

% /. i -> 0

Total[Table[i, {i, 0, 8, 1}]]

?Sum

?Total

(1/2*4) + (1/2*5) + (1/2*5.6)

1/2*(4 + 5 + 5.6)

(∫_(-Pi)^Pi)(Cos[
              2  Pi  t])^2 \[DifferentialD]t

3.219446520969915`
Pi // N

3.141592653589793`

Simplify[(∫_(-Pi)^Pi) Cos[n x]^2 \[DifferentialD]x, 
      Element[n, Integers]]

Simplify[(∫_(-Pi)^Pi) x^2  Cos[n x] \[DifferentialD]x, 
        Element[n, Integers]]/
      Simplify[(∫_(-Pi)^Pi) Cos[n x]^2 \[DifferentialD]x, 
        Element[n, Integers]]

% /. n -> 0

Simplify[(∫_(-Pi)^Pi) x^2   Cos[n x] \[DifferentialD]x, 
      Element[n, Integers]]

N[Simplify[(∫_(-Pi)^Pi) x^2    \[DifferentialD]x, 
          Element[n, Integers]]/Pi]

Simplify[(∫_(-Pi)^Pi) 1   \[DifferentialD]x, 
      Element[n, Integers]]

Pi^2/3

N[%]

f = 
      ((Subscript[a, 0])/2) + (∑_(n = 1)^N) (Subscript[a, n]) 
            Cos[nx] + (∑_(n = 1)^N) (Subscript[a, n]) 
            Sin[nx]
(Subscript[a, n]) = (1/π) (∫_(-Pi)^Pi) f (x) 
            Cos[nx] \[DifferentialD]x
(Subscript[b, n]) = (1/π) (∫_(-Pi)^Pi) f (x) 
            Sin[nx] \[DifferentialD]x