Mean value theorem, Wierstrass theorems I have a question that is related to these theorems I tried to tackle but got stuck
Please let me know if it is the proper way to go ? 
The question is:
 Let $f:[0,1]\rightarrow\mathbb{R}$
  be a continuous function such that $f(0)=f(1)$
Prove that exists $c\in\left[0,1\right]$
  such that $f(c)=f(c+\frac{1}{2})$
My try to solve 
Set $$\left||f|\right|=max\left\{ f(x)|x\in\left[0,1\right]\right\} $$
Due to the second theorem of wierstrass : 
$\forall x\in\left[0,1\right]$     $f(x)\leq\left||f|\right|$
$$\begin{aligned}\mbox{Also note that      } & c\in\left[0,1\right]\\
\rightarrow & 0\leq c\leq1\\
\iff & \frac{1}{2}\leq c+\frac{1}{2}\leq\frac{3}{2}
\end{aligned}$$
However $\frac{3}{2}>1$
  ,the func is undefined there. we have to use the following statement:$\frac{1}{2}\leq c+\frac{1}{2}\leq1$
  and $0\leq c\leq\frac{1}{2}$
Therefiore we got 2 subdomains $D_{1},D_{2}$
$$\begin{aligned}D_{1}=\left[0,\frac{1}{2}\right]\\
\begin{aligned}D_{2}=\left[\frac{1}{2},1\right]\end{aligned}
\end{aligned}
\enskip\enskip
  and 2 'sub-images' \enskip\begin{aligned}I_{1}=\left\{ f(x)|x\in\left[0,\frac{1}{2}\right]\right\} \\
I_{2}=\left\{ f(x)|x\in\left[\frac{1}{2},1\right]\right\} 
\end{aligned}$$
Therefore using the second theorem of wierstrass we again deduce that 
$$\begin{aligned}\forall i_{1}\in I_{1}\enskip i_{1}\leq\left||f|\right|\rightarrow\exists k_{1}\in D_{1}\enskip:f(k_{1})=\left||f|\right|\\
\forall i_{2}\in I_{2}\enskip i_{2}\leq\left||f|\right|\rightarrow\exists k_{2}\in D_{2}\enskip:f(k_{2})=\left||f|\right|
\end{aligned}$$
I feel that I need to prove that $k_2 = k_1+0.5$ and I'm done however I don't understand how to do it
Please let me know how to proceed :) 

It is much simpler than that. Consider
$$
g(x)=f\Bigl(x+\frac12\Bigr)-f(x),\quad x\in[0,1/2],
$$
and observe that $g(0)+g(1/2)=0$.
