Given a periodic function $f$ with period $L$ I want to prove the following:
$$\int_a^{a+L}f(x) \,dx=\int_0^Lf(x)\,dx$$
I've found some nice proofs here but I have tried by my own doing the following:
$$\begin{align*}\int_a^{a+L}f(x)dx&=\int_a^Lf(x)dx+\int_L^{a+L}f(x)dx\\ &=\int_a^Lf(x)dx+\int_0^af(y)dy\\ &=\int_0^Lf(x)dx \end{align*}$$
by using the substitution $y=x-L$.
So I was wondering if this is enough? Because all the proofs there say that this only holds for $a\in[0,L)$ but not for $a$ in general.
So my question is why is this not enough and only holds for $a\in[0,L)$ but not $a$ in general?