Proof that $\lim\limits_{x\to c}f(x)$ exists if and only if $c=0$

limitsreal-analysis

I want to show by $\epsilon-\delta$ that $\lim\limits_{x\to c}f(x)$ exists if and only if $c=0$ where

\begin{equation}
f(x)= \begin{cases}
x^2 &\text{if $x\in \mathbb{Q}$}\\
-x^4 &\text{if $x\notin \mathbb{Q}$}
\end{cases}
\end{equation}

For the first implication, if we assume that such a limit exists then by definition for all $\epsilon>0$ there exists a $\delta>0$ such that if $x\in D$ (domain of $f$) and $|x-c|<\delta$ then $|f(x)-L|<\epsilon$, suppose that the value of the limit is exactly $0$ ($L=0$).

Let $x\in \mathbb{Q}$ and $\delta=\sqrt{\epsilon}$, note that from $|f(x)-L|=|x^2|=|x||x|<\sqrt{\epsilon}\sqrt{\epsilon}=\epsilon$ as long as $c=0$, Analogously for $x\in \mathbb{R}-\mathbb{Q}$. This could be an idea, but I don't see it viable yet.

For the other implication, I thought of doing it by contradiction, i.e. assuming that $c=0$ and exists $\epsilon>0$ for all $\delta>0$ such that for some $x\in D$ is satisfied that $|x-c|<\delta$ and $|f(x)-L|\geq\epsilon$, I thought about taking $\epsilon=1$, and $L=0$ then for some values of $x=\frac{a}{b}$, $a$, $b$ $\in \mathbb{Z}$, it is not true that $\left|\frac{a^2}{b^2}\right|\geq\epsilon=1$.

All this under the assumption that the value of the limit is zero, but maybe I am losing generality by assuming this; any help? any contribution will be appreciated.

Best Answer

Suppose $\lim_{x \to c} f(x)$ exists.We need to prove that $c=0$.Suppose $c \neq 0$.Then there exists a sequence $\{x_n\}$ in $\Bbb{Q}$ such that $x_n \to c$ and a sequence $\{y_n\}$ in $\Bbb{Q}^c$ such that $y_n \to c$.We have $\{f(x_n)\}=x_n^2 \to c^2$ and $\{f(y_n)\}=-y_n^4 \to -c^4$ and $c^2$ and $-c^4$ is equal if and only if $c=0$.Hence $\lim_{x \to c}f(x)$ does not exists by sequential criteria.Contradiction.

Let $c=0$.We need to prove that $\lim_{x \to c}f(x)$ exists.We show that the limit is $f(c)$.Let $\epsilon \gt 0$. \begin{equation} |f(x) - f(c)|=\begin{cases}x^2 &\text{if $x\in \mathbb{Q}$}\\ x^4 &\text{if $x\notin \mathbb{Q}$} \end{cases} \end{equation} Now chose $\delta = \epsilon ^\frac{1}{4}$.Let $|x| \lt \delta$.There are two cases now one is $x$ is rational and other is irrational.If $x$ is rational then $|f(x)-f(c)|= x^2 \lt \sqrt{\epsilon} \lt \epsilon$.Other case is similar.