# Do one-sided limits exist for this function?

Given a function $f$ with $f(x) := \begin{cases} \\ 0, & \text{if }x\in\mathbb{R}\setminus\mathbb{Q}\\ 1, & \text{if }x\in\mathbb{Q}\\ \end{cases}$ , what is $\lim\limits_{x\to0^+}f(x)$ and $\lim\limits_{x\to0^-}f(x)$?

I tried to tackle this problem by thinking of a zero sequence $c_n$ that consists of two subsequences $a_n:=\frac{1}{|n+1|}, b_n := \pi \cdot a_n$ with $c_n > c_{n-1}$. Now, 0 is a limit point of $c_n$ which makes it a good candidate for being a one-sided limit (plus, I have the feeling that the limit might be 0 for both directions for arbitrary $a_n, b_n$).

But how would I generalize this for arbitrary $a_n, b_n$? And how would 0 being a limit point help me get to what I'm trying to show?

• You're already partway there; you've found a limit point of $c_n$. Can you find another? (What about the subsequence given by $\{a_n\}$?) – Steven Stadnicki May 5 '14 at 23:55
• Hm. I'm not sure if I understand your notation correctly. Does $\{a_n\}$ describe a set that consists of $a_n$ for all $n \in \mathbb{N}$? In that case, I reckon that 1 might be a limit point as well... – chiru May 6 '14 at 0:03
• $\{a_n\}$ (in this context) describes the sequence whose $k$th entry is $a_k$; this is a fairly standard notation for sequences. Usually when you see this it'll be clear where it refers to a set and where it refers to a sequence - the presence of an index is a pretty good sign. (Keep in mind that you want to be looking at sequences here and not just sets.) But yes, the core point stands: $1$ is also a limit point. So now you've found two different limit points for $\lim_{x\to0^+}f(x)$; what does that mean? – Steven Stadnicki May 6 '14 at 0:07
• Thanks for pointing this out! Well, if we have more than one limit point, the sequence cannot converge, right? And that, on the other hand, means that neither $\lim\limits_{x \to 0^+}f(x)$ nor $\lim\limits_{x \to 0^-}f(x)$ exist (which, again, implies that $\lim\limits_{x \to 0}f(x)$ won't exist either). The only thing left that I'm not 100% sure about is what exactly makes 1 a limit point, since my earlier reasoning was based on a misunderstanding of considering $\{a_n\}$ a set. – chiru May 6 '14 at 0:15
• Basically, a limit point of a sequence is a limit of some (infinite) subsequence of the sequence. For instance, the sequence $\{a_n\}$ defined by $a_{k^2} =1-\frac1k$ and $a_i=0$ if $i$ isn't a square has $0$ and $1$ as limit points, by considering the subsequences corresponding to (for instance) squares, and numbers 1 more than squares. – Steven Stadnicki May 6 '14 at 0:21

Proposition: $\lim_{x \to a}f(x)=b \iff \forall(x_n)_{n \in \mathbb{N}} \subset \mathbb{R}$ st $\lim x_n =a \Rightarrow \lim f(x_n)=b$.
$(\Rightarrow)$ Let $(x_n)_{n \in \mathbb{N}} \subset \mathbb{R}$ st $\lim x_n =a$. If $\lim_{x \to a}f(x)=b$, given $\epsilon>0$ exits $\delta$ st $|x-a|<\delta \Rightarrow |f(x)-b|< \epsilon$. But exists $n_0 \in \mathbb{N}$ st $n>n_0\Rightarrow|x_n-a|<\delta$ and $|f(x_n)-b|<\epsilon$. So, we have $\lim f(x_n)=b$.
$(\Leftarrow)$ Suppose for contradiction $\lim_{x \to a}f(x)\neq b$. So, $\exists \epsilon>0$ st $\forall \delta>0$ $\exists x_{\delta}$ st $|x_{\delta}-a|<\delta \Rightarrow |f(x_{\delta})-b|\ge \epsilon$. Then, exists a sequence $(x_n)$ st $\lim x_n = a$ and $|f(x_{n})-b|\ge \epsilon$, a absurd.
• You have several limits in there without specifying where $n$ converges to. What does that mean? – chiru May 6 '14 at 1:27
• $\lim x_n =a$ means $\lim_{n \to \infty} x_n = a$ and $\lim f(x_n) =b$ means $\lim_{n \to \infty} f(x_n) = b$. Just it :-) – leticia May 6 '14 at 1:29