If $f(x)$ is a continous function such that $f(x) +f(\frac{1}{2}+x) =1; \forall x\in [0, \frac{1}{2}]$ then $4\int^1_0 f(x) dx =$ . Problem : 

If $f(x)$ is a continous function such that $f(x) +f(\frac{1}{2}+x) =1; \forall x\in [0, \frac{1}{2}]$ then $4\int^1_0 f(x) dx = ?$ 

My approach : 
$$f(x) +f(\frac{1}{2}+x) =1 \tag{1}\label{1}$$
Let us put $x = \frac{1}{2}+x$ we get 
$$f(\frac{1}{2}+x) +f(1+x) =1 \tag{2}\label{2}$$
$\eqref{1}-\eqref{2}\Rightarrow f(x) -f(1+x) = 0$
$\Rightarrow f(x) = f(1+x)$
Is it the correct method to find $f(x)$?  Please guide thanks.

\begin{align*}
  &4\int_0^1 f \\
  =& 4\int_{0}^{0.5} f(t) dt + 4 \int_{0.5}^1 f(t) dt\\
  =& 4\int_{0}^{0.5} f(t) dt +  4 \int_0^{0.5} f(x+\frac12) dx \quad\text{($x = t - \frac12$)}\\
  =& 4\int_{0}^{0.5} (f(t) + f(t+\frac12)) dt\\
  =& 4\int_{0}^{0.5} 1 dt\\
  =& 4\cdot 0.5\\
  =& 2
\end{align*}
