assume(L>0)$

Signal

f(x):=-(1/L)*(x-L);

/* piecewise defined f for plotting purposes */
ff(x):=block(if(x>0) then -(1/L)*(x-L) else -(1/L)*(x+L))$

/* plot2d(substitute(L=2,ff(x)),[x,-2,2])$ */

Fourier coefficients

/* since f is odd, all a(n) are zero */
declare(n,integer)$
b(n):=2*(1/L)*integrate(f(x)*sin(%pi*n*x/L),x,0,L);
b(n);

Partial sums

F(n):=sum(b(k)*sin(%pi*k*x/L),k,1,n);

First few approxmations and a couple of closer ones

append(append([ff(x)],create_list(F(n),n,1,3)),[F(50),F(250)])$
plot2d(substitute(L=13,%),[x,-13,13])$