I want to express a function as a sum of fourier series.
I tried the code below. It works. But only get one period (from 0 to 1).
How to display every period correctly?
f = Piecewise[{{10 x, 0 <= x < 0.1}, {-(10/9) x + (10/9), 0.1 <= x < 1}}];
coeff[0] = 1/4 Integrate[f, {x, 0, 1}];
coeff[n_] = 1/4 Integrate[f*Exp[I Pi n x/2], {x, 0, 1}];
series[m_, x_] := Sum[Exp[-I Pi n x/2] coeff[n], {n, -m, m}];
Plot[Evaluate[Table[series[j, x], {j, 1, 5}]], {x, -2, 2}]

