0

The function f(x) is defined by:

f(x)=x, if x is rational

f(x)=2x, if x is irrational

Is f continuous?

Now my answer was the following: let a=√2 (any irrational number would do). Then f(a)=2√2. But, as x gets arbitrarily close to a, x is rational, so lim(x->a) of f(x)=√2, which is not equal to f(a), so f is not continuous.

Are there any flaws in my proof? My main question is, can we safely assume that x is rational as we let it get arbitrarily close (but not equal) to a? Thanks in advance, and excuse my failure to use MathJax, but I cannot for the love of me get the mathematical notations to appear.

1 Answers1

1

Your proof is not quite correct. In particular, the statement "as $x$ gets arbitrarily close to $a$, $x$ is rational" is not correct. In fact, no matter how close $x$ gets to $a$, there will always be rational and irrational numbers between $x$ and $a$.

For $f$ to be continuous at a point $x=a,$ we would need $\lim_{x\to a}f(x)=f(a)$. That means that for all $\epsilon > 0$, there must be a $\delta>0$ such that if $x\in(a-\delta, a+\delta)$, $f(x)\in (f(a)-\epsilon, f(a)+\epsilon)$. This clearly cannot happen in this case because any interval $(a-\delta,a+\delta)$ contains rational and irrational numbers, so the values of $f(x)$ cannot all be within $\epsilon$ of $f(a)$ (whether $a$ is rational or irrational).

Let's see what this would look like for your choice of $a= \sqrt{2}$ with $f(a)=2\sqrt{2}$. Let $\epsilon=\sqrt{2}$. For any $\delta>0$, the interval $(a-\delta,a)$ contains a rational number, call it $q$. Then $$f(a)-f(q)=2\sqrt{2}-q>2\sqrt{2}-\sqrt{2}=\sqrt{2}=\epsilon$$

pwerth
  • 3,880
  • Thank you! Unfortunately I haven't yet been taught this definition of continuity, therefore I get the general idea of your proof, but it will require extra effort and serious thinking on my part to grasp all the little details. –  Dec 17 '18 at 19:36
  • What definition of continuity have you seen? I just used the standard $\epsilon-\delta$ definition here. – pwerth Dec 17 '18 at 19:44
  • The definition that was given to us said that if the limit of f as x approaches a exists and is equal to f(a), then f is continuous at a. Moreover, the definition of a limit we were given was "in words" and did not include any of the formal notation with ε, δ and such. –  Dec 17 '18 at 20:51
  • As a side note, I now think I have the grasp of the proof, except for one thing: "...so the values of f(x) cannot all be within ϵ of f(a) (whether a is rational or irrational)" . By that, you mean that, for this particular function, no matter the ε, δ, there will always be a number that is outside the specified interval? –  Dec 17 '18 at 20:58
  • What does it mean to say that the limit of $f$ as $x$ approaches $a$ exists and is equal to $f(a)$? If you write this out, this will be precisely the conditions I wrote! And yes, what I mean is that if $\epsilon<\sqrt{2}$, there is no way to ensure that all function values are within $\epsilon$ of $f(a)=f(\sqrt{2})$ because of the way the function is defined. – pwerth Dec 18 '18 at 05:11