Continutiy and Contradiction: I'm not sure if I have the correct negation. Suppose that the function $f:\mathbb{R}\rightarrow \mathbb{R}$ is continuous at the point $x_0$ and that $f(x_0)>0$. Prove that there is an interval $I\equiv(x_0-\frac{1}{n},x_0+\frac{1}{n})$, where $n$ is a natural number, such that $f(x)<n$ for all $x\in I$.

We are told to prove by contradiction:
Suppose that the function $f:\mathbb{R}\rightarrow \mathbb{R}$ is continuous at the point $x_0$ and that $f(x_0)>0$. Suppose that for every interval $I\equiv(x_0-\frac{1}{n},x_0+\frac{1}{n})$, where $n$ is a natural number, $f(x)\ge n$ for some $x\in I$.
Since $f$ is continuous at $x_0$ as $n\rightarrow \infty$, if the sequence $\{x_n\}\rightarrow x_0$, then $\{f(x_n)\}\rightarrow f(x_0)$. Note that as $n\rightarrow \infty$, the interval becomes $I=\{x_0\}$.
But $f(x_0)>0$ which is not greater than or equal to $\infty$, a contradiction. Therefore, there is an interval $I\equiv(x_0-\frac{1}{n},x_0+\frac{1}{n})$, where $n$ is a natural number, such that $f(x)<n$ for all $x\in I$.

This doesn't seem right though. Did I miss something when assuming the negation?
 A: The trouble is that the sequence $(x_n)$ appears from nowhere, as if you did not know why such a sequence should exist, what would be its properties, and how you should use it. In other words, you need to exhibit a specific sequence which contradicts some specific hypothesis.
If one negates the conclusion, one gets that, for every $n\geqslant1$, there exists at least one point $x_n$ in $I_n=(x_0-1/n,x_0+1/n)$ such that $f(x_n)\geqslant n$. In particular, $x_n$ in $I_n$ for every $n$ implies that $|x_n-x_0|\lt1/n$ for every $n$, hence $x_n\to x_0$ when $n\to\infty$. Since $f$ is continuous at $x_0$, $f(x_n)\to f(x_0)$. In particular, if $N$ is an integer such that $f(x_0)\leqslant N$, there exists some integer $n\geqslant N+2$ such that $|f(x_n)-f(x_0)|\leqslant1$. Thus, $f(x_n)\leqslant f(x_0)+1\leqslant N+1\lt n$, a contradiction.
To conclude, note that the hypothesis that $f(x_0)\gt0$ is not useful, and that the continuity of $f$ at $x_0$ is useful only to ensure that $f$ is bounded in a neighborhood of $x_0$.
A: This can be proved directly. Choose an $n$ such that $f(x_0)<n$. Then use the continuity of $f$ at $x_0$ to find an interval $I=[x_0-\delta,x_0+\delta]$ so that $x\in I$ implies $f(x)<n$. Then shrink the interval if necessary (we can always make $\delta$ smaller) to ensure the required condition holds.
