7

Let $f:{\Bbb R}\to{\Bbb R}$. Is there a courterexample for the following equality or is it always true?

$$\lim_{x\to 0}f(x)=\lim_{n\to\infty}f\left(\frac{1}{n}\right)$$

What I think is that one might need a non-continuous function since this is always true for a continuous function. Would $1_{\Bbb Q}$ work? Are there any other counterexamples?

Elias Costa
  • 14,658

2 Answers2

7

Actually, even for a function which is discontinuous at only one point, this need not be true. For example: $$f(x)=\begin{cases}\sin(\pi/x)&:x\neq0\\ 0&:x=0\end{cases}.$$ This equals $0$ for every $n\in\Bbb Z\setminus\{0\}$ as $\pi/(1/n)=n\pi$ but the limit as $x\to0$ does not exist. However, if the function is continuous, then yes, the limits will be equal.

Thus, as you can see, the only way to guarantee the limits are equal is if $$\lim_{x\to0}f(x)$$ exists.

Clayton
  • 24,751
5

If the left hand side limit exists, then both limits exist and are equal. However, it is possible for the right hand side limit to exist and the left hand side limit not to exist (in which case $f$ must be discontinuous.) For example, let $f(x) = 1$ if $x = 1/n$ for some $n \in \mathbb{N}$ and $f(x) = 0$ otherwise.

Trevor Wilson
  • 16,989
  • 1
    I'm assuming the limit on the right hand side is taken over $n \in \mathbb{N}$, by the way. – Trevor Wilson Feb 16 '13 at 00:09
  • @blf Then the limit on the RHS would be more commonly written as $\lim_{x\to 0^+} f(x)$, and the answer is the same (but you would need a different counterexample, like the indicator function for $[0,\infty)$.) – Trevor Wilson Feb 16 '13 at 00:14