Prove that $\forall d > 0$ there exists $x_1, x_2 \in \mathbb{R}$ such that $x_1 - x_2 = d$ and $f(x_1) = f(x_2)$ Let $f : \mathbb{R} \rightarrow \mathbb{R}$ be a continuous function with the property that $\lim_{x \rightarrow \infty} f(x)$ and $\lim_{x \rightarrow -\infty} f(x)$ exist and are equal. Prove that $\forall d &gt; 0$ there exists $x_1, x_2 \in \mathbb{R}$ such that $x_1 - x_2 = d$ and $f(x_1) = f(x_2)$.

I applied Rolle's theorem on $\mathbb{R}$ since $\lim_{x \rightarrow \infty} f(x)= \lim_{x \rightarrow -\infty} f(x)$. So, there exists $c \in \mathbb{R}$ such that $f'(c) = 0$. This means that our function has a minimum or a maximum. Now, since the limits at $\infty$ and $-\infty$ are equal we can conclude that $\forall d &gt; 0$ there exists $x_1, x_2 \in \mathbb{R}$ such that $x_1 - x_2 = d$ and $f(x_1) = f(x_2)$.

Is this a correct solution? If not, please help me find a good one.

Thank you!
Since $f$ is not assumed differentiable you cannot use Rolle's theorem; but the IVT is available, and does the job.

After substracting a suitable constant from $f$ (which is irrelevant for the problem at hand) we may assume that $\lim_{x\to-\infty}f(x)= \lim_{x\to\infty}f(x)=0$, and that there is an $a\in{\mathbb R}$ with $f(a)&gt;0$. Using a standard argument we then can infer that there is a $\xi\in{\mathbb R}$ with $$f(x)\leq f(\xi)\qquad(-\infty&lt;x&lt;\infty)\ .$$
Given a $d&gt;0$ put $g(x):=f(x)-f(x+d)$. Then
$$g(\xi-d)=f(\xi-d)-f(\xi)\leq0,\qquad g(\xi)=f(\xi)-f(\xi+d)\geq0\ .$$
As $g$ is continuous it follows that there is a point $x_1\in[\xi-d,\xi]$ with $g(x_1)=0$. Put $x_1+d=:x_2$; then $|x_2-x_1|=d$ and
$$f(x_1)-f(x_2)=f(x_1)-f(x_1+d)=g(x_1)=0\ .$$
Since you can't use Rolle's theorem because your function is not continuous, maybe we can try something else. The idea is this: you take a point $x_0$ and calculate $x_0+d$. Now you are certain that the two points are at the right distance from each other. 

Then calculate $f(x_0)$ and $f(x_0+d)$. Then define $g(x)=f(x)-f(x+d)$. If this function is zero, we are done. We have found our points $x_1$ and $x_2$.

So, start out with one point $x_0$ and calculate $g(x_0)$. It will either be positive or negative, say without loss of generality that it's positive. We have 
\begin{equation}
0&lt;g(x_0)=f(x_0)-f(x_0+d).
\end{equation}
Now, we know that at some other point we must have
\begin{equation}
0&gt;g(x_{3})=f(x_{3})-f(x_{3}+d),
\end{equation}
otherwise we would have a monotonically decreasing sequence and then the limits at infinity can not be the same.

You know that g(x) is a continuous function, so you can apply the Intermediate Value Theorem, which is true for all continuous functions on a bounded interval.

The IVT gives you a point $x_1$ at which $g(x_1)=f(x_1)-f(x_1+d)=0$. This gives you your $x_1$ and $x_2$.