The Fourier Series periodic with period 2L, L>0 is defined to be:

(a_0)/2 + sum_{n=1 to infty} [a_n cos(n pi x/L) + b_n sin(n pi x/L)]

where:

a_n = (1/L) integral_{x=-L to L} f(x) cos(n pi x/L) dx

b_n = (1/L) integral_{x=-L to L} f(x) sin(n pi x/L) dx

Now consider:

g(x) = 3, -2<x<0

g(x) =-3 0<x<2

(for technical reasons it does not matter that g(x) is not defined for

x=3k, k=0, +/-1, ..)

Now g(x) is odd so all the integrals for the a terms are zero. So lets now

consider the b terms, here L=2 so:

b_n = (1/2) integral_{x=-2 to 2} g(x) sin(n pi x/2) dx

..... = (1/2) integral_{x=-2 to 0} 3 sin(n pi x/2) dx + (1/2) integral_{x=0 to 2} (-3) sin(n pi x/2) dx

but sin is antisymetric so:

b_n = (1/2) integral_{x=-2 to 0} 3 sin(n pi x/2) dx + (1/2) integral_{x=-2 to 0} 3 sin(n pi x/2) dx

..... = integral_{x=-2 to 0} 3 sin(n pi x/2) dx = -6/(pi n) - 6/(pi n) cos(n pi)

So:

b_n = -12/(pi n) for n odd (that is =1, 3, 5, ..)

b_n = 0 for n even.

RonL