If $f(x)>0$ near $x_0$ and $\lim_{x\to x_0}f(x)$ exists, then why is it always $\lim_{x\to x_0}f(x)\geq0$? 
If $f(x)>0$ near $x_0$ and $\lim_{x\to x_0}f(x)$ exists, then why is it always $\lim_{x\to x_0}f(x)\geq0$?

The basic limit theorems, state that If $\lim_{x \to x_0}f(x)>0$, then $f(x)>0$, near $x_0$. Why does the opposite of that have to contain an equality?
 A: Consider the function $f:\mathbb{R}\to\mathbb{R}$ given by $f(x)=|x|.$ Then $f(x)>0$ for all $x \neq 0.$ But $\lim_{x\to 0} f(x)=0.$
However, if $\lim_{x\to x_0}=L>0,$ then corresponding to $\frac{L}2>0,$ there exists $\delta >0$ such that $|f(x)-L|<\frac{L}{2}$ whenever $|x-x_0| <\delta.$ So near $x_0,$ we have $f(x)>L-\frac{L}2=\frac{L}{2}>0.$
A: The apparent contrast between the two statements can be explained by observing the following facts:


*

*If a number is positive then there is a neighborhood containing only positive numbers.

*Every neighborhood of $0$ necessarily contains positive as well as negative numbers.


First fact is the reason behind $$\text{limit is positive} \implies \text{function takes positive values} $$ and second fact allows for the possibility that limit may be zero even if function is always positive.
What really distinguishes these two cases is that if the limit is positive the function values remain positive but in a different way. They also remain bounded away from zero. Or in other words if the limit is positive the function can not take arbitrarily small positive values.
If a function takes positive values and also remains bounded away from zero then its limit can not be zero and if the limit exists it will be positive. It is only in the specific case when function values are positive but can be arbitrarily small the limit can be zero. 
Also note that none of the above statements really require a formal proof using math symbols at least not any more than the statement "if a number is positive all the numbers greater than it are also positive". 
Most textbooks make the subject of analysis deeply boring and frustrating by providing a formal proof of such statements. 
A: Personally, I don't know what you mean by 'near'; I find things like this too vague to be used in real analysis teaching.
So perhaps the example you need is not provided by the other answers. Consider:
$$
f(x) = \begin{cases} |x| & \ \text{if}\ x \neq 0 \\
1 & \ \text{if}\ x = 0
\end{cases}
$$
This has $f(x) > 0$ in an entire neighbourhood of $0$. The limit $\lim_{x \to 0}f(x)$ exists, but is equal to zero.
