numTerms = 15;
L = 1;
f[x_] = Exp[x];
(*Sine Series*)
B = Table[N[(2/L)(∫_0.^L)f[x]Sin[n Pi x/L]\[DifferentialD]x], {n, numTerms}];
Plot[{f[x], (∑_(n=1)^numTerms)B[[n]] Sin[n Pi x/L]}, {x, -1.5L, 1.5L}]