Suppose that limit of a function $f(x)$ exists at $x=a$. Let the limit be $L$. How do I prove this statement- if $L>0$, then $f(x)>0$? Something tells me that this assertion is wrong. Limit of a function at a point is always dependent on how the function approaches the limiting value from the left and right, and not the value of the function at the point. So say, I have a function $f(x)$ defined as $f(x)=-2$ when $x=4$, and $f(x)=x^2$ otherwise, then at the point $x=4$, I have limit as $16$, whereas $f(x)=-2<0$. And the limit is always positive.
Am I going about this the wrong way? Help would be much appreciated, thanks!
 A: When you deal with limit of $f(x)$ as $x \to a$ then you make use of the information of values of $f$ near $x = a$. But the limit of $f(x)$ as $x \to a$ does not give any information about the value of $f$ at $x = a$ (neither it makes use of the value of $f$ at $x = a$).
The statement which you mention is true, but you have not stated it in an unambiguous fashion. The correct statement is as follows:
Let $f$ be a function defined in some deleted neighborhood $I$ of point $a$ and let $\lim_{x \to a}f(x) = L > 0$. Then there is a deleted neighborhood $J \subseteq I$ of $a$ such that $f(x) > 0$ for all $x \in J$.
A neighborhood of a point $a$ is any interval which contains $a$ as an interior point. If $A$ is a neighborhood of $a$ then $B = A - \{a\}$ is a deleted neighborhood of $a$.
The proof of the statement above is easy. Since $f(x) \to L > 0$ as $x \to a$, it follows that for any $\epsilon > 0$ there is a $\delta > 0$ such that $|f(x) - L| < \epsilon$ whenever $0 < |x - a| < \delta$. Clearly since this holds for any $\epsilon > 0$, it also holds for $\epsilon = L/2 > 0$. Thus we have a $\delta > 0$ such that $$|f(x) - L| < \frac{L}{2}$$ whenever $0 < |x - a| < \delta$. This means that $f(x) > L/2 > 0$ for all $x$ with $0 < |x - a| < \delta$. Thus we have a neighborhood $J = (a - \delta, a + \delta) - \{a\}$ such that $f(x) > 0$ for all $x \in J$.
A: As @kccu says, your doubts are well-founded: the statement is wrong, and your counterexample shows it. 
For the case where $f$ is continuous at $a$, we have that 
$$
\lim_{t \to a} f(t) = f(a)
$$
by at least one definition of continuity. So since the left-hand-side limit is $L > 0$< we have $f(a) = L > 0$. 
