Dear Sandona,
I am not a skilled Sympy user. However, I guess the fact that you do not give the periodicity does not allow sympy to compute the Fourier Series. I did this that seems satisfactory :
x, n = symbols("x, n")
N = 10
expr = 2 * (Heaviside(x / 2) - Heaviside(x / 2 -1)) - 1
fs = fourier_series(expr,(x,-2,2))
wolfram = 4 / pi * sin(n * pi * x / 2) / n
wolfram_expr = 0
for i in range(1, N + 1):
if i % 2 != 0:
wolfram_expr += (4 / pi * sin(n * pi * x / 2) / n).subs(n, i)
plot(expr, fs.truncate(N/2), wolfram_expr, (x, -5, 5))
Moreover, I guess (I did not check in Sympy documentation) that Sympy only displays non-zero harmonics on "truncate" ?
Hope this helps,
Mike