Given a continuous function $f\colon \mathbb R \to \mathbb R$ and the fact that $ \lim\_{x\rightarrow \infty} f(x)$ and $ \lim\_{x\rightarrow -\infty}f(x)$ exist (finite), prove that $f$ is bounded.
I understand why it's true, but I have no idea how to formally prove this. 
I'd appreciate the help.
['https://math.stackexchange.com/questions/446589', 'https://math.stackexchange.com', 'https://math.stackexchange.com/users/84007/']
There exists $x\_1$ with $|f(x)-\lim\_{y\to\infty}f(y)|<1$ for all $x>x\_1$.
There exists $x\_2$ with $|f(x)-\lim\_{y\to-\infty}f(y)|<1$ for all $x<x\_2$.
And $f$ is bounded on the compact interval $[x\_2,x\_1]$.
Clearly, it is sufficient to prove that $f$ is bounded on $\mathbb{R}\_+$, the problem being symmetric.

Let $\ell\stackrel{\mathrm{def}}{=} \lim\_{+\infty} f$; wlog, $\ell=0$ (just by "considering" $g\stackrel{\mathrm{def}}{=}f-\ell$ instead).

* By definition [1], there exists $A\geq 0$ such that $\forall x \geq A$ $|f(x)|\leq 1$.
* Moreover, $f$ being continuous on $[0,A]$, it is also bounded there: let $M=\max\_{x\in[0,A]} |f(x)|$.

Setting
$$M^\prime\stackrel{\mathrm{def}}{=}\max(M,1)$$
we thus have that for all $x \geq 0$, $|f(x)| \leq M^\prime$; that is, $f$ is bounded on $\mathbb{R}\_+$.

[1] definition of the limit, taking $\varepsilon=1$.