numTerms = 15;
L = 1;
f[x_] = Exp[x];
(*Sine Series*)
A0 = N[(1/(2L))(∫_(-L)^L)f[x]\[DifferentialD]x];
A = Table[N[(1/L)(∫_(-L)^L)f[x]Cos[n Pi x/L]\[DifferentialD]x], {n, numTerms}];
B = Table[N[(1/L)(∫_(-L)^L)f[x]Sin[n Pi x/L]\[DifferentialD]x], {n, numTerms}];
Plot[{f[x],A0+ (∑_(n=1)^numTerms)(A[[n]] Cos[n Pi x/L] + B[[n]] Sin[n π x/L])}, {x, -2L, 2L}, PlotRange -> {0, 3}]