All, I have noticed what appears to be an inconsistency between two sources, so I must be misunderstanding something.
In the book Boundary Value Problems by D. Powers, he provides the example of calculating the coefficients for $f(x) = \lvert\,\sin(\pi x)\,\rvert$, which has a period of 1.
He breaks up the function like so:
$\sin(\pi x)$ on $0< x<1$
$-\sin(\pi x)$ on $-1 < x <0$
Then calculates $a_0 = \frac{1}{1} \int_{-1/2}^{1/2} \lvert\,\sin(\pi x)\,\rvert dx = \int_{-1/2}^{0}-\sin(\pi x) dx + \int_{0}^{1/2} \sin (\pi x) dx$
Notice that we have an implicit distributation of the $\frac{1}{1}$ over the sum of the integrals.
However, in another example found online, for the function defined as...
$f(t) = 2$ on $-2\pi < t < 0$
$f(t) = -1$ on $0 < t < 2\pi$
... the $a_0$ coefficient is shown as $\frac{1}{2\pi} \int_{-2\pi}^{0}2 dt + \frac{1}{2\pi} \int_{0}^{2\pi} -1dt = 1$.
What is odd to me is that if the latter example began as the Powers' book had, wouldn't we have...
$a_0 = \frac{1}{4\pi} \int_{-2\pi}^{2\pi} f(t) dt$.
But then if we broke it up into a sum, we would have $\frac{1}{4\pi}$ multiply across, so obviously the two approaches would not be equal.
What's gone wrong with my thinking? The period must not be $4\pi$, but according to symbolic manipulation, shouldn't it work?
Remember the definition of period as the smallest $p$ such that $f(x+p) = f(x)$. In the latter example above, you have a discontinuity which in pieces is a constant function. Thus, it is actually after $2\pi$ that values repeat, not $4\pi$.