Getting fourier coefficient by integrating over half the period? In the book Schaum's Outlines of Analog and Digital Communications solved problem 1.2, the author calculates the fourier coeffecient $C_0$ for the rectangular pulse train:

where $a$ is assumed to be $(1/4)T$ as such:

Usually, I've seen around the web that we have to integrate over the whole period, which in this case would be $0$ to $T$. Why  is this wrong and the author's approach correct?
 A: Firstly, the function is zero on both intervals $[-T/2, -a]$ and $[a, T/2]$;
Also, Integral kernel of Fourier series, the $e^{inω}$, is periodic for each $n∈ \mathbb N$ that means integral can be taken on $[-T/2, T/2]$;
Since $C_0$ is a DC component which means $n$ = 0, whole above make the integration of $C_0$ stand on $[-a, a]$. 
A: I haven't contributed anything, just spelling it all out.
We have the assumption that $a=T/4$ which implies $T/2=2a$. So using the formular for the $0$'th coefficient, we get: 
$$c_0=\frac{1}{T}\int_{0}^{T}s(t)\;\mathrm{d}t=\frac{1}{T}\int_{-T/2}^{T/2}s(t)\;\mathrm{d}t.$$
If we define $\Pi_k(t)$ to be $1$, if $|t|<k/2$ and $0$, if $|t|\geq k/2$, then we get that the signal $s(t)$ on the interval $[-T/2,T/2]=[-2a,2a]$ is just $s(t)=\Pi_{2a}(t)$.
$$c_0=\frac{1}{T}\int_{-T/2}^{T/2}\Pi_{2a}(t)\;\mathrm{d}t=
\frac{1}{T}\int_{-2a}^{2a}\Pi_{2a}(t)\;\mathrm{d}t=
\frac{1}{T}\left(\int_{-2a}^{-a}\Pi_{2a}(t)\;\mathrm{d}t+\int_{-a}^{a}\Pi_{2a}(t)\;\mathrm{d}t+\int_{a}^{2a}\Pi_{2a}(t)\;\mathrm{d}t\right)$$
now since $\Pi_{2a}(t)=0$ on $[-2a,-a]$ and $[a,2a]$ and $\Pi_{2a}(t)=1$ on $[-a,a]$, we get:
$$c_0=\frac{1}{T}\int_{-a}^{a}\mathrm{d}t=\frac{2a}{T}=\frac{2a}{4a}=\frac{1}{2}.$$
