# Proof Help: Prove that limit does not exist for a particular function

Let $f(x)=$$x-1 |x \in \mathbb{Q} \brace 5-x| x \in \mathbb{Q}^c$

Show that $\lim_{x \to a}f(x)$ does not exists for any $a \not= 3$

I first showed that $lim_{x \to 3}f(x)=2$.

I don't know how to approach this part. Can anyone please guide? I was thinking of using density theorem at first to show that there will exist sequences of rationals and irrationals that will approach a but their limits would not equal but that is problematic as I don't really know the limit.

thank you

Of course, you must use the fact that for any point, there is a sequence of rationals and another sequence of irrationals which converge to that point.

Here is the conventional limit definition :

Given $f : D \to \mathbb R$ and $x \in D$, suppose there is a number $L$ such that for every $\epsilon > 0$ there is a $\delta > 0$ such that if $|x - y| < \delta$ then $|f(x) - f(y)| < \epsilon$. Then, $\lim_{t \to x}f(t)$ is said to exist and equal $L$.

Using a usual trick, we bring this down to convergence of sequences, and then get a sequential definition :

Given $f : D \to \mathbb R$ and $x \in D$, if there exists a number $L$ such that for every sequence $x_n$ converging to $x$, the sequence $f(x_n)$ converges to $L$. Then $\lim_{t \to x}f(t)$ is said to exist and equal $L$.

Now, if the limit does not exist, then we must negate the above statement:

Given $f : D \to \mathbb R$ and $x \in D$, if for all numbers $L$, there exists a sequence $x_n$ converging to $x$ such that $f(x_n)$ does not converge to $L$, then the limit $\lim_{x \to a} f(x)$ is said to not exist.

Now, we are in shape to attack the problem : all we need to do, is given any $a \neq 3$ and a candidate $L$ for the limit, find a sequence of points which converge to $a$ such that the function values don't go to $L$. To do this, we use the piecewise definition of our function.

Let $a \neq 3$. Suppose that $L$ is a candidate limit.

EDITED : At this stage, we want a sequence of numbers which does converge to $a$, but whose function values don't converge to $L$.

The answer to your question below is this : The pieces of $f$, when treated as functions from the real line to itself, are continuous, and this fact can be used to prove that $f$ is not continuous at any point, other than $3$.

First, let $p_n$ is a sequence of rationals converging to $a$. We claim that $f(p_n) \to a-1$.

This follows from the fact that $p_n$ lies inside one piece of $f$, so we may use continuity of the function which defines $f$ on that piece. But if you want to argue by basics, then : $f(p_n) = p_n - 1$ from the fact that $p_n$ is rational. Now, since $p_n \to a$ and (the constant sequence)$-1 \to -1$, we can add limits to get $p_n -1 \to a-1$, and therefore $f(p_n) \to a-1$.

By uniqueness of limits, if $L \neq a-1$, then $p_n$ serves as a candidate for the sequence of values not converging to $L$, since $p_n \to a$ but $f(p_n) \not\to L$.

On the other hand, if $q_n$ is a sequence of irrationals converging to $a$, then we may repeat the above argument for the irrational piece to get $f(q_n) \to 5-a$. So $q_n$ now serves as a candidate for the sequence of values not converging to $L$, whenever $5-a \neq L$.

Now, if $a-1 \neq 5-a$, which happens precisely when $a \neq 3$, we see that for any $L$, of course $L$ can't be equal to both $a-1$ and $5-a$, so take the case which it does not equal, and that sequence works.

Hence, the limit of the given function does not exist, for any $a \neq 3$. Of course, if $f$ has to be continuous at $a$, then $\lim_{x\to a} f(x)$ has to exist and equal $f(a)$, but the limit doesn't exist if $a \neq 3$, so $f$ is not continuous at any such point.

Let $a \ne 3$.

If $(x_n)$ is a sequence in $\mathbb Q$ with $x_n \to a$, then $f(x_n)=x_n-1 \to a-1$.

If $(y_n)$ is a sequence in $\mathbb Q^c$ with $y_n \to a$, then $f(x_n)=5-y_n \to 5-a$.

Since $a \ne 3$ we have $a-1 \ne 5-a$, hence $\lim_{x \to a}f(x)$ does not exist.

As $(x-1)-(5-x)=2x-6$, you will always find values in the neighborhood of $x$ that have their images $2x-6$ apart so that not all $\epsilon$ can be met. Unless $x=3$.