f[t_] := t*(2 - t)

g[t_] = 
      (4/6) + (∑_(n = 1)^5)-((4 Cos[
                      n π] (n π Cos[n π] - 
                        Sin[n π]))/((n^3) (π^3)))*
            Cos[n*π*t]

(∫_0^2)(2  t - t^2)*
        Cos[n*π*t] \[DifferentialD]t

(∫_0^2) f[t] \[DifferentialD]t

Plot[{f[t], g[t]}, {t, 0, 2}]