2

For the function: $f(x)= \begin{cases} x^2 & \mbox{if }x \mbox{ is rational } \\ -x^2 & \mbox{if }x \mbox{ is irrational } \\ \end{cases}$

I am looking for points where it is continuous My thought is that this function is not continuous for any number except 0 since if we consider a point $x_{0}$ in $R$, then since both rational and irrational numbers are dense we can find a sequence of rational numbers ${a_{n}}$ and a sequence of irrational numbers ${b_{n}}$ that converge to $x_{0}$, and then we have $x_{0}^2 = -x_{0}^2$, which is only true for $x_{0} = 0$ Am I missing something here?

Mahmoud
  • 47
  • 3

1 Answers1

0

What you did is almost fine. I say almost because your proof is convincing regarding the fact that $f$ is discontinuous at any $x_0 \neq 0$.

However, you've not proven that $f$ is continuous at $0$. Which is however easy to see as you have for any $x \in (-1, 1)$

$$\lvert f(x) \rvert \le x^2 \le \lvert x \rvert.$$

  • Proof of continuity in $0$ is done by Heine in last $4$ lines. – zkutch Jul 06 '22 at 14:07
  • @zkutch I don't understand your comment. If you refer to the last 4 lines of the question, then it is not sufficient as Heine supposes that you consider all sequences. – mathcounterexamples.net Jul 06 '22 at 14:50
  • All sequences can be obtained in following way: let's consider arbitrary one. It contain infinite number of rational members, or infinite number of irrational members, or infinite number of both. In any variant we need mentioned property $x_{0}^2 = -x_{0}^2$. And this one is true only for $x_0=0$. This standard type of reasoning in such cases and this is why I thought that the questioner meant such consideration. – zkutch Jul 06 '22 at 16:37
  • @zkutch To prove continuity at zero using Heine, you need to prove that for any sequence ${x_n}$ converging to zero, ${f(x_n)}$ converges to zero. And I don't see how the consideration $x_0^2=-x_0^2$ proves that. It only proves that the only possible continuity point is at zero. Not that $f$ is indeed continuous at zero. You need to add arguments for that. – mathcounterexamples.net Jul 06 '22 at 16:46
  • Add to already written by me $x_n \to x_0$ . Then given consideration of subsequences and brought equality shows continuity for $x_0=0$ and discontinuity for $x_0 \ne 0$. – zkutch Jul 06 '22 at 17:09