1. ## Continuity Epsilon Delta

Hello

i need to show the following function is not continuous anywhere else but 0.
$\displaystyle f(x) = x^2$if x is rational
$\displaystyle f(x) = 0$ if x is irrational

I have read the guide on epsilon delta proof and have managed to work out part of it, i have found that it is continuous at 0, and that is fine and completed.

I'm very stuck on the rest though. I tried to do this:

If a is a rational number there exists a set of numbers $\displaystyle y_1,y_2,...$ that converge to f(a).
So
$\displaystyle \lim_{y \rightarrow \infty} f(y) = \lim_{y \rightarrow \infty} y^2 = a^2$

If a is an irrational number, there exists a set of numbers $\displaystyle x_1,x_2,...$ that converge to f(a).
So
$\displaystyle \lim_{y \rightarrow \infty} f(x) = \lim_{y \rightarrow \infty} 0 = 0$
which are different, and therefore the function is not continuous when x is not 0.
Is this a valid proof?

Many Thanks

2. Originally Posted by dollydaggerxo
Hello

i need to show the following function is not continuous anywhere else but 0.
$\displaystyle f(x) = x^2$if x is rational
$\displaystyle f(x) = 0$ if x is irrational

I have read the guide on epsilon delta proof and have managed to work out part of it, i have found that it is continuous at 0, and that is fine and completed.

I'm very stuck on the rest though. I tried to do this:

If a is a rational number there exists a set of numbers $\displaystyle y_1,y_2,...$ that converge to f(a).
So
$\displaystyle \lim_{y \rightarrow \infty} f(y) = \lim_{y \rightarrow \infty} y^2 = a^2$

If a is an irrational number, there exists a set of numbers $\displaystyle x_1,x_2,...$ that converge to f(a).
So
$\displaystyle \lim_{y \rightarrow \infty} f(x) = \lim_{y \rightarrow \infty} 0 = 0$
which are different, and therefore the function is not continuous when x is not 0.
Is this a valid proof?

Many Thanks
It is not. The function is continous at 0.

Here is a hint to get you started. How would you prove that the function
$\displaystyle f(x)=x^2$ is continous at 0?
The above proof can be modified to show that the function

$\displaystyle f(x)=\begin{cases} x^2, x \in \mathbb{Q} \\ 0, x \in \mathbb{R}\backslash \mathbb{Q} \end{cases}$

3. This is my proof that the function is continuous at 0:

Let $\displaystyle \epsilon > 0$, and suppose that $\displaystyle \epsilon < 1$. Let $\displaystyle \delta = \epsilon$. Then if $\displaystyle |x-0| < \delta$ then

|f(x)-f(0)| = $\displaystyle |x^2 -0^2|$
$\displaystyle = x^2$
$\displaystyle < \delta^2$
$\displaystyle = \epsilon^2$
$\displaystyle < \epsilon$

If a= 0, however, then f(a)= 0. If x is a rational number close to 0, then f(x)= x^2 is close to 0 and if x is an irrational number, f(x)= 0 so the limit, as x-> 0, exists and is equal to 0. The function is continuous at x= 0.

It is the bit for being discontinuous everywhere else i am confused on!

4. Originally Posted by dollydaggerxo
This is my proof that the function is continuous at 0:

Let $\displaystyle \epsilon > 0$, and suppose that $\displaystyle \epsilon < 1$. Let $\displaystyle \delta = \epsilon$. Then if $\displaystyle |x-0| < \delta$ then

|f(x)-f(0)| = $\displaystyle |x^2 -0^2|$
$\displaystyle = x^2$
$\displaystyle < \delta^2$
$\displaystyle = \epsilon^2$
$\displaystyle < \epsilon$

If a= 0, however, then f(a)= 0. If x is a rational number close to 0, then f(x)= x^2 is close to 0 and if x is an irrational number, f(x)= 0 so the limit, as x-> 0, exists and is equal to 0. The function is continuous at x= 0.

It is the bit for being discontinuous everywhere else i am confused on!
Well, the problem with f is that arbitrarily close to every rational number there is an irrational number, and vice versa. So if x is rational and $\displaystyle \neq 0$ then you have that $\displaystyle f(x)=x^2\neq 0$, but arbitrarily close to this rational number x there is always an irrational x', for which $\displaystyle f(x')=0$.
Or to put it another way; for any rational x $\displaystyle \neq 0$ there exists a sequence of irrational numbers $\displaystyle x_n$ that converge to x, but for which the values $\displaystyle f(x_n)$ are always 0, and hence do not converge to $\displaystyle f(x)=x^2\neq 0$.
Similarly, if x is an irrational number $\displaystyle \neq 0$ you have that $\displaystyle f(x)=0$, but arbitrarily close to this irrational number there is always a rational number x', for which $\displaystyle f(x')=x'^2\neq 0$.

Okay, i understand that, and have wrote something similar, but do i not need any mathematical proof of the second part with epsilon delta? or is it sufficient to simply write that explanation?

6. Originally Posted by dollydaggerxo
Okay, i understand that, and have wrote something similar, but do i not need any mathematical proof of the second part with epsilon delta? or is it sufficient to simply write that explanation?
Well, I just wanted to make sure that you start out with the right intiution. Next comes writing down the proof with all the necessary detail. If the exercise explicitly asks for an epsilon-delta proof, so be it. If not, you have the choice to argue for / against continuity of f at $\displaystyle x_0$ via $\displaystyle \lim_{x\to x_0}f(x)=f(x_0)$, and $\displaystyle \lim_{x\to x_0}f(x)\neq f(x_0)$, respectively.
But note, that there are three cases to consider: $\displaystyle x\in \mathbb{Q}\backslash \{0\}, x\in \mathbb{R}\backslash\mathbb{Q},$ and $\displaystyle x=0$.

7. Thanks again.

So for x = 0, would the proof i gave in post 3 be sufficient ?

And then for the other two cases,
$\displaystyle x\in \mathbb{Q}\backslash \{0\}, x\in \mathbb{R}\backslash\mathbb{Q},$
i can then prove it using limits?

If the limits are not equal to each other then the fucntion does it mean that the function is discontinuous for those two cases?

Also, can you please explain to me why my first post is wrong?

Thankyou, your help is greatly appreciated!

8. Originally Posted by dollydaggerxo
Thanks again.

So for x = 0, would the proof i gave in post 3 be sufficient ?
Well, it looks like it, and, yes, it is an epsilon-delta proof.

And then for the other two cases,
$\displaystyle x\in \mathbb{Q}\backslash \{0\}, x\in \mathbb{R}\backslash\mathbb{Q},$
i can then prove it using limits?
The question is not so much whether to do an epsilon-delta proof of discontinuity or one via limits: it is whether you are allowed to assume it to be known that (1) arbitrarily close to every irrational number there is a rational number and (2) arbitrarily close to every rational number there is an irrational number.

To show discontinuity of f at x=a using an epsilon-delta argument amounts to showing that there exists an $\displaystyle \varepsilon > 0$ such that for every $\displaystyle \delta >0$ there exists an x such that $\displaystyle |x-a|<\delta$ and $\displaystyle |f(x)-f(a)|\geq \varepsilon$. (Because this is the exact opposite - the logical negation - of what you would have to show if you wanted to use an epsilon-delta argument to prove that f is continuous at a.)

Example: If $\displaystyle a\in \mathbb{Q}\backslash\{0\}$ (i.e. a is rational, $\displaystyle \neq 0$) you can take $\displaystyle \varepsilon := f(a)=a^2$. Now let $\displaystyle \delta >0$ be given (no matter how small). There always exists an irrational x such that $\displaystyle |x-a|<\delta$ for which we have that $\displaystyle |f(x)-f(a)|=|0-a^2|=a^2\geq \varepsilon$.
Thus f is discontinuous at a.

If, on the other hand, you wanted to use a limit argument, you could do it like this: there exists a sequence of irrational numbers $\displaystyle x_n\, \neq a$ with $\displaystyle \lim_{n\to\infty}f(x_n)=\lim_{n\to\infty}0=0\neq f(a)=a^2$, hence f is discontinuous at a.

Can you now try to write down something similar for the remaining case of x being irrational (and, therefore, also non-zero)?

Also, can you please explain to me why my first post is wrong?
One problem was that you just wrote of a sequence of numbers $\displaystyle y_n$ that converge to f(a). But what you need is a sequence of a particular kind of number (depending on which case you are discussing you need a sequence of irrational numbers or a sequence of rational numbers). Also, you need that this sequence converges to a and not that it converges to f(a), as you wrote. Because: if you want to test a function for continuity, you are getting closer to a on the x-axis, so to speak, and check whether the corresponding values of f tend to the value f(a) or whether they tend to some different value.

9. Thank you so much! you have helped me a lot.

For the irrational numbers, could i possibly do it the same: $\displaystyle \epsilon \geq 0$ and suppose $\displaystyle \delta > 0$. Take $\displaystyle \epsilon := f(x) = 0$.
So there is always a rational number, a such that
$\displaystyle |a-x| < \delta$ and so
$\displaystyle |f(a) - f(x)| = |f(a) - 0| = a^2 \geq \epsilon$
and so f is discontinuous.

am i allowed to pick that value of epsilon or should it be the same as before?
thanks again!

10. Originally Posted by dollydaggerxo
Thank you so much! you have helped me a lot.

For the irrational numbers, could i possibly do it the same: $\displaystyle \epsilon \geq 0$ and suppose $\displaystyle \delta > 0$. Take $\displaystyle \epsilon := f(x) = {\color{red}0}$.
Opps, no, I am sorry, but that particular value of $\displaystyle \varepsilon$ does not work: you need to specify an $\displaystyle \varepsilon > 0$ (that is strictly greater than 0).
You could take $\displaystyle \varepsilon := a^2>0$, because we have assumed a to be irrational, therefore it is $\displaystyle \neq 0$, and thus $\displaystyle a^2 > 0$.

So there is always a rational number, a such that
There is a slight problem here, but it is just one of the naming convention the two of us are using, and that doesn't seem to be quite the same. I assumed that a is the non-zero real number where you want to show that f is not continuous, while you seem to be assuming that x is that number. It doesen't really matter which of the two naming conventions you are using, but you need to use the same convention throughout the proof(s).

So let me change your use of x and a from
$\displaystyle |a-x| < \delta$ and so
$\displaystyle |f(a) - f(x)| = |f(a) - 0| = a^2 \geq \epsilon$
and so f is discontinuous
to
$\displaystyle |x-a| < \delta$ and so
$\displaystyle |f(x) - f(a)| = |x^2-0| = x^2 \geq \epsilon$
and so f is discontinuous
This almost works. Almost, because: no matter how close you choose x to be to the positive irrational number a, as long as it is very close to a but smaller than a you get that $\displaystyle f(x)=x^2<a^2$ so that you would have that $\displaystyle |f(x)-f(a)|=|x^2-0|=x^2{\color{red}<}a^2=\varepsilon$, which is not at all what we want in order to show that f is discontinuous at a.

One way out out is to require, not only that the rational number x satisfy the condition $\displaystyle |x-a|<\delta$, but in addition that |x| be larger than |a|, which is aways possible. (We need to use the condition $\displaystyle |a|<|x|$ here, because a need not be positive: it could be negative, in which case the square of a number larger than a could actually be smaller than the square of a itself, and thus smaller than our chosen value for $\displaystyle \varepsilon$.)

So let me sum it up: let a be irrational (and therefore also be non-zero), and let $\displaystyle \varepsilon := a^2>0$. Then, for any $\displaystyle \delta >0$, no matter how small, there will always be a rational number x such that $\displaystyle |x-a|<\delta$ and $\displaystyle |x|{\color{blue}>}|a|$, and therefore $\displaystyle |f(x)-f(a)|=|x^2-0|=|x^2|=x^2{\color{blue}>}a^2=\varepsilon$, and thus, since $\displaystyle \delta >0$ was arbitrary (and arbitrarily small at that), f is discontinuous at a.

am i allowed to pick that value of epsilon or should it be the same as before?
No, as I wrote, in order to refute continuity of f at a you absolutely need to pick a value of $\displaystyle \varepsilon$ that is strictly greater than 0. But apart from that condition, $\displaystyle \varepsilon>0$, you are free to choose any number for $\displaystyle \varepsilon$, provided of course, that that number allows you to prove that it then follows that for any $\displaystyle \delta >0$ (no matter how small) there exists an x with $\displaystyle |x-a|<\delta$, such that $\displaystyle |f(x)-f(a)|\geq \varepsilon$.

Please note another problem with your above attempts: you repeatedly wrote "and so f is discontinuous". This is, imho, not sufficiently precise: What you are proving this way is not that "f is discontinuous", but that "f is discontinuous at a" (where a, in our case, is any irrational number).
So try to make it a habit to be very, very precise when stating what, exactly, your argument is intended to prove.

11. Oh i see, and yes sorry about the a and x mixup! i see what you are saying now.

Thank you so much for your help, I think I understand it now! A lot better than before anyway so thankyou very much for all of your help and patience with me.

And thanks for the last comment too, i should learn to be more precise!