You can suppress the convergence messages by setting and AccuracyGoal and giving the corner points explicitly. The following computes without errors, but fsum and fourier do not match at all
a0 = (1/[Chi]) NIntegrate [
fsum[t], {t, 0, 1/6, 1/3, 1/2, 2/3, 5/6, [Chi]} ,
AccuracyGoal -> 8];
a[n_Integer] :=
a[n] = (1/\[Chi]) NIntegrate [
fsum[t] Cos[( \[Pi] n t)/\[Chi]], {t, 0, 1/6, 1/3, 1/2, 2/3,
5/6, \[Chi]}, AccuracyGoal -> 8]
b[n_Integer] :=
a[n] = (1/\[Chi]) NIntegrate [
fsum[t] Sin[( \[Pi] n t)/\[Chi]], {t, 0, 1/6, 1/3, 1/2, 2/3,
5/6, \[Chi]}, AccuracyGoal -> 8]
Print[{a0, a[1], b[1], a[2], b[2]}]
fourier[nmax_] :=
a0 / 2 + Sum[
a[n] Cos[ (\[Pi] n t)/\[Chi]] + b[n] Sin[(\[Pi] n t)/\[Chi]], {n,
1, nmax}]
Plot [Evaluate[{fsum[t], fourier[2]}], {t, 0, 1}, Frame -> True,
Axes -> True, PlotRange -> { {0, 1}, {-1.25, 1.25}},
FrameLabel -> {"Time", "Flow rate"}, GridLines -> Automatic,
AspectRatio -> .65,
PlotStyle -> {{Red, Thickness[0.005]}, {Green,
Thickness[0.0051]}, {Blue, Thickness[0.005]}, {Gray,
Thickness[0.01]}},
BaseStyle -> {FontWeight -> "Bold", FontSize -> 15,
FontFamily -> "Arial"}]