# real analysis on max min and boundedness [duplicate]

Possible Duplicate:
Real Analysis Boundedness of continuous function

I have a real analysis question that I am having trouble with:

Suppose that $f:\Bbb R\to\Bbb R$ is continuous on $\Bbb R$ and $\lim\limits_{x\to-\infty}f(x) = 0$ and $\lim\limits_{x\to\infty}f(x) = 0$. Prove that $f$ is bounded on $\Bbb R$ and attains either a max or a min on $\Bbb R$.

Should I do this by contradiction, perhaps using the fact that if $f(x)$ is unbounded on $\Bbb R$, then WLOG, suppose that it contains a max. Then there exists $s:=\max f(x)$ where $s>f(x)$ for all $x$ in $\Bbb R$. Then $s>f(x_m)>M$ meaning $f(x_m)$ is bounded on $\Bbb R$.

I just don't think this will work since I also have to prove it has a max or min. I can't just assume it has one.

-

## marked as duplicate by Martin Sleziak, Cameron Buie, Thomas, Did, Douglas S. StonesOct 23 '12 at 20:24

Was one of your infinities supposed to be $-\infty$? –  Martin Sleziak Oct 23 '12 at 19:32
Yes, sorry about that –  Jackson Hart Oct 23 '12 at 19:33
My mistake - I missed it when I was reading your post for the first time. –  Martin Sleziak Oct 23 '12 at 19:34
Just curious is this (Elements of Real Analysis - Charles Denlinger) is the source of the problem? –  user2468 Oct 23 '12 at 19:38
Same problem but I am using a different book by Bartle –  Jackson Hart Oct 23 '12 at 19:39

Hint: The limit conditions you gave for $f$ are equivalent to the following: For every $\epsilon > 0$, there exists $N > 0$ such that $|f(x)| < \epsilon$ whenever $x \in \mathbb{R} \setminus [-N, N]$.
Then, use the fact that when restricted to the closed interval $[-N,N]$, $f(x)$ attains both a max and min. What remains is to show how to relate this local max/min to the global behavior.