Let $f:\mathbb{R}\rightarrow\mathbb{R}$ such that $f$ is differentiable over $\mathbb{R}$.
Prove that if $\underset{x\rightarrow\infty}{\lim}f(x)=L$ and $\underset{x\rightarrow-\infty}{\lim}f(x)=L$ for $0<L\in\mathbb{R}$, then $\exists c\in\mathbb{R} \; f'(c)=0$.
Thoughts: I know that if the interval is $[a,b]$ (where $a, b \in \mathbb{R}$) $x\rightarrow a^+$ and $x\rightarrow b^-$, I can use Rolle's theorem, but what should I do when $x$ approaches infinity?
If $f(x)=L$, then we are done (the derivative vanishes everywhere). Otherwise there exists $x_0\in \mathbb{R}$ such that $f(x_0) \neq L$, wlog assume $f(x_0)>L$. By definition there exists $R>0$ such that $\vert f(x)-L\vert < \frac{f(x_0)-L}{2}$ for all $\vert x \vert >R$. This implies that $\sup_{\vert x \vert>R} f(x) \leq f(x_0)$. This implies that $\sup_{x\in \mathbb{R}} f(x) = \sup_{ x \in [-R;R]} f(x)$. As $f$ is continuous and $[-R;R]$ compact, we get that $f$ admits a global maximum, and at the global maximum the derivative vanishes.