Show that this function is bounded Let $f$ be a $\mathbb R \rightarrow \mathbb R$ continuous function such that : $\lim_ {x \to \pm \infty} f(x) \in \mathbb R$ and $\lim_ {x \to 0} f(x) \in \mathbb R$
How can one show that $f$ is bounded ? I get it "intuitively" but I cant show it rigorously 
 A: The fact that $\lim_{x\to0}f(x)\in\mathbb R$ is necessarily true: since $f$ is continuous that limit has to be $f(0)$.
Now, suppose that $f$ is unbounded. Then, for each $n\in\mathbb N$, there is a $x_n\in\mathbb R$ such that $\bigl\lvert f(x_n)\bigr\rvert\geqslant n$. The sequence $(x_n)_{n\in\mathbb N}$ is either bounded or unbounded and:

*

*if it is bounded, then it has a convergent subsequence $(x_{n_k})_{k\in\mathbb N}$. But if $\lim_{k\to\infty}x_{n_k}=x$, then $\lim_{k\to\infty}f(x_{n_k})=f(x)$, which is impossible, since $\bigl(f(x_{n_k})\bigr)_{k\in\mathbb N}$ is unbounded.

*if it is unbounded, then it has a subsequence $(x_{n_k})_{k\in\mathbb N}$ whose limit is $\pm\infty$, and we then get a similar contradiction.

A: Juts for amusement:
Let $\phi(x) = \begin{cases} \lim_{x \to -\infty} f(x) , & x = -{\pi \over 2} \\
f(\tan(x)), & x \in (-{\pi \over 2}, {\pi \over 2} ) \\
\lim_{x \to +\infty} f(x) , & x = {\pi \over 2}
\end{cases} $.
Show $\phi$ is continuous on the compact set $[-{\pi \over 2},{\pi \over 2}]$, hence bounded, and hence $f$ is bounded.
A: If $\lim_{x\to-\infty} f(x)=a$ and $\lim_{x\to\infty} f(x)=b$ put $|a|+|b|+1=:c$. There is an $M>0$ such that $|f(x)|\leq c
$ for all $x\geq M$ and all $x\leq-M$. Since $f$ is continuous there is a $c'$ such that $|f(x)|\leq c'$ for all $x\in[-M,M]$. It follows that $|f(x)|\leq c+c'$for all $x\in{\mathbb R}$.
A: The hypothesis that
$\displaystyle \lim_{x \to \infty} f(x) \in \Bbb R \tag 1$
means that 
$\exists L_+ \in \Bbb R, \; \displaystyle \lim_{x \to \infty} f(x) = L_+; \tag 2$
that is,
$\forall 0 < \epsilon_+ \in \Bbb R \; \exists 0 < M_+ \in \Bbb R, \; x > M_+ \Longrightarrow \vert f(x) - L_+ \vert < \epsilon_+; \tag 3$
that is,
$x > M_+ \Longrightarrow L_+ - \epsilon_+ < f(x) < L_+ + \epsilon_+; \tag 4$
likewise the hypothesis
$\displaystyle \lim_{x \to -\infty} f(x) \in \Bbb R \tag 5$
gives us
$\exists L_- \in \Bbb R, \; \displaystyle \lim_{x \to -\infty} f(x) = L_-; \tag 6$
i.e.,
$\forall 0 < \epsilon_- \in \Bbb R \; \exists 0 > M_- \in \Bbb R, \; x < M_- \Longrightarrow \vert f(x) - L_- \vert < \epsilon_-, \tag 7$
or
$x < M_- \Longrightarrow L_- - \epsilon_- < f(x) < L_- + \epsilon_-; \tag 8$
it follows that, letting 
$b = \min(L_- - \epsilon_-, L_+ -\epsilon_+), \; B = \max(L_- + \epsilon_-, L_+ + \epsilon_+)   \tag 9$ 
and
$m = \max(-M_-, M_+), \tag{10}$
that
$\vert x \vert > m \Longrightarrow b < f(x) < B, \tag{11}$
so $f(x)$ is bounded on the set $(-\infty, m) \cup (m, \infty)$; furthermore, since the closed interval $[-m, m]$ is compact and $f(x)$ is continuous, $\vert f(x) \vert$ is strictly bounded on this interval by some $0 < \beta \in \Bbb R$:
$x \in [-m, m] \Longrightarrow -\beta < f(x) < \beta; \tag{12}$
combining (11) and (12) shows that $f(x)$ is bounded on all of $\Bbb R$.  Indeed, we have
$\forall x \in \Bbb R, \; \vert f(x) \vert < \max(\vert b \vert, \vert B \vert, \beta). \tag{13}$
A: 1) Consider $[0,\infty)$.
$\lim_{x \rightarrow \infty}f(x)=L:$
For $\epsilon >0$ there is a $M$, real, positive, s.t. 
for $x > M$ $|f(x)-L| <\epsilon$, i.e.
$- \epsilon +L < f(x) < \epsilon +L$.
The continuous function $f$ attains minimum and maximum on the compact interval $[0,M]$.
Hence $f$ is bounded on $[0,\infty)$.
2) Proceed likewise for $(-\infty,0]$.
1) and 2): f is bounded on $\mathbb{R}$.
Also cf.. comment of miraunpajaro
