Let $f$ be a continuous and integrable function on $[a,b]$ such that
$$\int_a^b f(x)\,\mathrm{d}x = 2$$
and for every $t_1,t_2$ such that $\displaystyle t_2 -t_1 = \frac{b-a}2$
$$\int_{t1}^{t2} f(x)\,\mathrm{d}x =1$$
Prove that $f$ is periodic and then determine its period.
The previous subquestion asked to prove that if $f$ is continuous then there exists an $F$ such that $F'(x)=f(x)$ for every $x$ and it's supposed to help.
Frankly I have no idea where to even start from.
I want to prove that there exists a $T$ such that $f (x+T) = f (x)$ for every $x$ that's all I can say, any insights please?
Define $G(x)=\int_{x}^{x+\frac{b-a}{2}} f(t) dt$ for $a\le x\le a+(b-a)/2$. Then $G(x)=1$ by assumption. Hence,
$$0=G^\prime(x)=\frac{d}{dx} \int_x^{x+\frac{b-a}{2}} f(t) dt=f\left(x+\frac{b-a}{2}\right)-f(x)$$
so $f$ is periodic with period $\frac{b-a}{2}$.