T = 10
ω = 2*Pi/T

f1 = (Sin[0.2*t])^2

Plot[Evaluate[f1], {t, 0, T}]

a0 = (2/T)*(∫_0^T) f1*
            Cos[0*ω*t] \[DifferentialD]t

a1 = (2/T)*(∫_0^T) f1*
            Cos[1*ω*t] \[DifferentialD]t

b1 = (2/T)*(∫_0^T) f1*
            Sin[1*ω*t] \[DifferentialD]t

g0 = a0/2

g1 = g0 + a1*Cos[ω*t] + b1*Sin[ω*t]

Plot[Evaluate[g1], {t, 0, T}]

a2 = (2/T)*(∫_0^T) f1*
            Cos[2*ω*t] \[DifferentialD]t

b2 = (2/T)*(∫_0^T) f1*
            Sin[2*ω*t] \[DifferentialD]t

g2 = g1 + a2*Cos[2*ω*t] + b2*Sin[2*ω*t]

Plot[Evaluate[g2], {t, 0, T}]

a3 = (2/T)*(∫_0^T) f1*
            Cos[3*ω*t] \[DifferentialD]t

b3 = (2/T)*(∫_0^T) f1*
            Sin[3*ω*t] \[DifferentialD]t

g3 = g2 + a3*Cos[3*ω*t] + b3*Sin[3*ω*t]

Plot[Evaluate[g3], {t, 0, T}]

a4 = (2/T)*(∫_0^T) f1*
            Cos[4*ω*t] \[DifferentialD]t
a5 = (2/T)*(∫_0^T) f1*
            Cos[5*ω*t] \[DifferentialD]t
a6 = (2/T)*(∫_0^T) f1*
            Cos[6*ω*t] \[DifferentialD]t
a7 = (2/T)*(∫_0^T) f1*
            Cos[7*ω*t] \[DifferentialD]t
a8 = (2/T)*(∫_0^T) f1*
            Cos[8*ω*t] \[DifferentialD]t
b4 = (2/T)*(∫_0^T) f1*
            Sin[4*ω*t] \[DifferentialD]t
b5 = (2/T)*(∫_0^T) f1*
            Sin[5*ω*t] \[DifferentialD]t
b6 = (2/T)*(∫_0^T) f1*
            Sin[6*ω*t] \[DifferentialD]t
b7 = (2/T)*(∫_0^T) f1*
            Sin[7*ω*t] \[DifferentialD]t
b8 = (2/T)*(∫_0^T) f1*
            Sin[8*ω*t] \[DifferentialD]t

g8 = 
      g3 + a4*Cos[4*ω*t] + b4*Sin[4*ω*t] + 
        a5*Cos[5*ω*t] + b5*Sin[5*ω*t] + a6*Cos[6*ω*t] + 
        b6*Sin[6*ω*t] + a7*Cos[7*ω*t] + b7*Sin[7*ω*t] + 
        a8*Cos[8*ω*t] + b8*Sin[8*ω*t]

Plot[Evaluate[g8], {t, 0, T}]

Plot[Evaluate[f1], {t, 0, T}]