Fourier Series Notes

f[x] defined on [-L, L] has Fourier series

((a[0])/2) + (∑_(n=1)^∞)( a[n] Cos[((n π x)/L)] + b[n] Sin[((n π x)/L)])
where 
a[0] = (1/L) (∫_(-L)^L)f[x]dx
a[n] = (1/L) (∫_(-L)^L) f[x]Cos[((n π x)/L)]dx  , n= 1, 2, ...
b[n] = (1/L) (∫_(-L)^L) f[x]Sin[((n π x)/L)]dx  , n= 1, 2, ...

If f[x] is even, b[n]=0 ∀n and a[n] can be calculated as the Fourier cosine series below.

If f[x] is odd,
a[n]=0 ∀n and b[n] can be calculated as the Fourier sine series below.

There are many sufficient conditions for Fourier series to converge.  Here are some: f and f' are piecewise continuous;   f is pieceise smooth; f is piecewise continuous with finite one-sided  limits at the endpoints of each subinterval; f is pieceise continuous with each piece monotone.

If f is continous at c, the Fourier series for x=c converges to f(c). 
If f is not continous at c, the Fourier series for x=c converges to(( f(c- ) + f(c+ ))/2).

f[x] defined on [0, L] has Fourier cosine series

((a[0])/2) + (∑_(n=1)^∞)a[n] Cos[((n π x)/L)]
where a[n] = (2/L) (∫_0^L) f[x]Cos[((n π x)/L)]dx  , n= 0, 1, 2, ...

f[x] defined on [0, L] has Fourier sine series

(∑_(n=1)^∞)b[n] Sin[((n π x)/L)]
where b[n] = (2/L) (∫_0^L) f[x]Sin[((n π x)/L)]dx  , n= 1, 2, ...