Problem: Let \( f: [0, 1] \to \mathbb{R} \) be a continuous function such that \( f(0) = f(1) \). Prove that there exist two points \( x_1, x_2 \in [0, 1] \) with \( x_2 - x_1 = \frac{1}{2} \) such that $f(x_1) = f(x_2).$
Solution: Define a function
\begin{align*}
g: \left[ 0, \frac{1}{2} \right] \to \mathbb{R} \quad \text{by} \quad g(x) = f(x) - f\left(x + \frac{1}{2}\right).
\end{align*}
Since \( f \) is continuous on \([0, 1]\), \( g \) is continuous on \([0, \frac{1}{2}]\). Now observe that
\begin{align*}
g(0) & = f(0) - f\left(\frac{1}{2}\right) = f(1) - f\left(\frac{1}{2}\right) = - g\left(\frac{1}{2}\right)
\end{align*}
If \( g(0) = 0 \), then \( x_1 = 0 \) and \( x_2 = \frac{1}{2} \) satisfy the condition. Otherwise, \( g(0) \) and \( g\left(\frac{1}{2}\right) \) have opposite signs. By the Intermediate Value Theorem, there exists \( x_1 \in \left(0, \frac{1}{2}\right) \) such that \( g(x_1) = 0 \). This implies:
\[
f(x_1) = f\left(x_1 + \frac{1}{2}\right),
\]
and we can take \( x_2 = x_1 + \frac{1}{2} \). Thus, the result is proved.