Prove tha if $f:I\rightarrow\Bbb R$ is a periodic function then $\int_{x}^{x+T}f(t)\,dt=\int_0^T f(t)\,dt$ for any $x\in I$. $$\underline{\text{**ATTENTION**}}$$
This question is not a duplicate of this one and this other question!
So let be $f:\Bbb R\rightarrow\Bbb R$ a periodic function, that is there exist $T\in\Bbb R$ such that
$$
f(x+T)=f(x)
$$
for any $x\in \Bbb R$. So I'd like to prove that
$$
\int_x^{x+T}f(t)\,dt=\int_0^Tf(t)\,dt
$$
for any $x\in\Bbb R$ and exactly I'd like to do this using the same arguments that André Nicolas gave in this answer but now I'd like do this with more details since I am sure that the mentioned user proves the result using the Fundamental Theorem of Calculus but unfortunately it is not clear how he applies it so that I thought to pay an apposite question where I ask to give this proof adding more details, that's all. Moreover it seems to me that if the period $T$ of $f$ is negative then the above integral could not be defined so that I ask also clarification about this.
So could anyone help me, please?
 A: First of all we observe that the period $T$ can be suppose not negative without loss of generality: indeed if $T$ was not positive then $-T$ would be not negative and it would be such that
$$
f(x-T)=f\big((x-T)+T\big)=f(x)
$$
for any $x\in\Bbb R$. So without loss of generality we can suppose that
$$
x\le x+T
$$
for any $x\in\Bbb R$ so that the function $F:\Bbb R\rightarrow\Bbb R$  defined as
$$
F(x):=\int_x^{x+T}f(t)\,dt
$$
for any $x\in\Bbb R$ is well defined.
So we let to prove now that $F$ is constant and precisely we are doing this proving that it is constant in $(-\infty,T]$ and in $[T,+\infty)$ respectively.
Previously we remember that the Change of Variables Theorem states that

Given a diffeomorphism $\phi:A\rightarrow B$ between open sets of $\Bbb R^n$ for any $C^r$ function $f:A\rightarrow\Bbb R$ with $r\ge 1$ the identity $$\int_Af=\int_B(f\circ \phi)|\det Dg|$$ holds.

whereas the Fundamental Theorem of Calculus states that

If $I$ is a (closed) interval of the real line $\Bbb R$ with extremities $x_1$ and $x_2$ then given a real valued function $f:I\rightarrow\Bbb R$ the function $F:I\rightarrow\Bbb R$ defined as
$$
F(x):=\int_{[x_1,x]}f(\xi)\,d\xi
$$
for any $x\in I$ is derivable in $I$ and it is such that
$$
\operatorname{D}F(x)=f(x)
$$
for any $x\in I$.


*

*So let be now $x\in(T+\infty]$ and thus through the additivity of the integral we observe that
$$
F(x):=\int_{[x,x+T]}f(t)\,dt=\int_{[T,x+T]\setminus[T,x]}f(t)\,dt=\int_{[T,x+T]}f(t)\,dt-\int_{[T,x]}f(t)\,dt
$$
for any $x\in[T,+\infty)$. Now let be $\varphi:\Bbb R\rightarrow\Bbb R$ the diffeomorphism defined through the equation
$$
\varphi(x):=x+T
$$
for any $x\in\Bbb R$. So through the Chain Rule we conclude that
$$
\operatorname{D}F(x)=D\Biggl[\int_{\big[T,\varphi(x)\big]}f(t)\,dt-\int_{[T,x]}f(t)\,dt\Biggl]=\\
\operatorname{D}\Biggl[\int_{\big[T,\varphi(x)\big]}f(t)\,dt\Biggl]\cdot\operatorname{D}\varphi(x)-\operatorname{D}\Biggl[\int_{[T,x]}f(t)\,dt\Biggl]=\\
f\big(\varphi(x)\big)-f(x)=f(x+T)-f(x)=0
$$
for any $x\in[T,+\infty)$ and so the statement is proved for this such $x$.

*So let be now $x\in(-\infty,T]$ and provided that $x$ is not negative through the additivity of the integral we observe that
$$
F(x):=\int_{[x,x+T]}f(t)\,dt=\int_{[x,T]\cup[T,x+t]}f(t)\,dt=\int_{[x,T]}f(t)\,dt+\int_{[T,x+T]}f(t)\,dt
$$
Now let be $\phi:\Bbb R\rightarrow\Bbb R$ the diffeomorphism defined through the equation
$$
\phi(x):=-x
$$
for any $x\in\Bbb R$ so that through the change variables theorem we conclude that
$$
F(x)=\int_{[x,T]}f(t)\,dt+\int_{[T,x+T]}f(t)\,dt=\int_{(x,T)}f(t)\,dt+\int_{(T,x+T)}f(t)\,dt=\\
\int_{\phi^{-1}\big[(x,T)\big]}\big(f\circ\phi\big)(t)\cdot\Big|\operatorname{det}\big(\operatorname{D}\phi(t)\big)\Big|\,dt+\int_{\big(x,\varphi(x)\big)}f(t)dt=\\
\int_{(-T,-x)}\big(f\circ\phi\big)(t)\,dt+\int_{\big(T,\varphi(x)\big)}f(t)\,dt=\int_{\big(-T,\phi(x)\big)}\big(f\circ\phi\big)(t)\,dt+\int_{\big(T,\varphi(x)\big)}f(t)\,dt
$$
for any $x\in[0,T]$ and thus finally through the Fundamental Theorem of Calculus and through the Chain Rule we conclude that
$$
\operatorname{D}F(x)=
\operatorname{D}\Biggl[\int_{\big(-T,\phi(x)\big)}\big(f\circ\phi\big)(t)\,dt+\int_{\big(T,\varphi(x)\big)}f(t)\,dt\Biggl]=\\
D\Biggl[\int_{\big(-T,\phi(x)\big)}\big(f\circ\phi\big)(t)\,dt\Biggl]\cdot\operatorname{D}\phi(x)+\operatorname{D}\Biggl[\int_{\big((T,\varphi(x)\big)}f(t)\,dt\Biggl]\cdot\operatorname{D}\varphi(x)=\\
-\Big(f\circ\phi\Big)\big(\phi(x)\big)+f\big(\varphi(x)\big)=f\big(\varphi(x)\big)-f\Big(\phi\big(\phi(x)\big)\Big)=f(x+T)-f(x)=0
$$
for any $x\in[0,T]$ so that we proved that $F$ is effectively constant on the not negative real line. Whereas if $x$ is not positive through the additivity of the integral we observe that
$$
F(x):=\int_{[x,x+T]}f(t)\,dt=\int_{[x,T]\setminus[x+T,x]}f(t)\,dt=\int_{[x+T]}f(t)\,dt-\int_{[x+T,x]}f(t)\,dt
$$
for any $x\in(-\infty,0]$ so that through the change variables theorem we conclude that
$$
F(x)=\int_{[x,T]}f(t)\,dt-\int_{[x+T,T]}f(t)\,dt=\\
\int_{\phi^{-1}\big[[x,T]\big]}(f\circ\phi)(t)\,dt-\int_{\phi^{-1}\big[[x+T,T]\big]}(f\circ\phi)(t)\,dt=\\
\int_{[-T,-x]}(f\circ\phi)(t)\,dt-\int_{[-T,-(x+T)]}(f\circ\phi)(t)\,dt
$$
for any $x\in(-\infty,0]$ and thus finally through the Fundamental Theorem of Calculus and through the Chain Rule we conclude that
$$
DF(x)=D\Biggl[\int_{[-T,-x]}(f\circ\phi)(t)\,dt-\int_{[-T,-(x+T)]}(f\circ\phi)(t)\,dt\Biggl]=\\
D\Biggl[\int_{[-T,\phi(x)]}(f\circ\phi)(t)\,dt-\int_{[-T,(\phi\circ\varphi)(x)]}(f\circ\phi)(t)\,dt\Biggl]=\\
D\Biggl[\int_{[-T,\phi(x)]}(f\circ\phi)(t)\,dt\Biggl]\cdot D\phi(x)-D\Biggl[\int_{[-T,(\phi\circ\varphi)(x)]}(f\circ\phi)(t)\,dt\Biggl]\cdot D(\phi\circ\varphi)(x)=\\
-(f\circ\phi)(\phi(x))-\Big(-(f\circ\phi)\Big(\big(\phi\circ\varphi\big)(x)\Big)\Big)=\\
f\big(\varphi(x)\big)-f(x)=f(x+T)-f(x)=0
$$
for any $x\in(-\infty,0]$ and this proves finally that $F$ is constant in $(-\infty,0]$ too.

A: You don't need advance technique. In fact,
\begin{eqnarray}
\int_{x}^{x+T}g(t)\,dt&=&\int_0^{x+T} g(t)\,dt-\int_0^{x} g(t)\,dt\\
&=&\int_{-T}^{x} g(u+T)\,dt-\int_0^{x} g(t)\,dt\\
&=&\int_{-T}^0g(t)\,dt=\int_{0}^Tg(T+t)\,dt\\
&=&\int_{0}^Tg(t)\,dt.
\end{eqnarray}
