0

Let $ f: \mathbb{R} \rightarrow \mathbb{R} $ be defined by

\begin{align} f(x)=x^{2} \ \ if \ \ x \in \mathbb{Q}, \\ f(x)=x+2 \ if \ x \in \mathbb{Q^{c}} \end{align} . Find out the points where f is continuous, if any.

My approach- let $ x_{n} \in \mathbb{Q}$ and $ x_{n} \rightarrow x_{0} $ . Then $ f(x_{n})=x_{n}^{2} \rightarrow x_{0}^{2} $. Now if $ x_{n} \in \mathbb{Q} $ , then $ x_{n} \rightarrow x_{0} $ implies $ f(x_{n})=2+x_{n} \rightarrow 2+x_{0} $. Hence f will be continuous if $ \ x_{0}^{2}=2+x_{0} \ \ or, x_{0}=2,-1 $. Hence f is continous at 2, -1 . Is is true ? Any help is there

MAS
  • 10,638
  • 1
    For all $x$ in the neighborhood of $2,$ if all $f(x)$ is the same neighborhood? Then ask the same question with $x$ in a neighborhood of $-1.$ And then $x$ not in either neighborhood, what can you say about $f(x)$? If you can answer these three questions, then you are done. – Doug M Jun 09 '17 at 22:33
  • 1
    When $x$ is near $-1,$ $ |x+1|<\delta \implies |f(x) - 1| < 2\delta + \delta^2$ if $\delta$ is rational, and $<\delta$ if $\delta$ is irrational. You can definitely find a delta that pins $|f(x) - 1|<\epsilon$ – Doug M Jun 09 '17 at 22:49

2 Answers2

1

Suppose $x$ is a point of continuity of $f$. Choose a sequence of rationals $(a_n)$ such that $a_n \to x$ and a sequence of irrationals $(b_n)$ such that $b_n\to x$. Then $(f(a_n))$ and $(f(b_n))$ admits the same limit $f(x)$, i.e., $$ a_n^2 \to f(x)=x^2 \text{ and }b_n+2 \to f(x)=x+2. $$ By the uniqueness of the limit then $x^2=x+2$, i.e., $x \in \{-1,2\}$.

Paolo Leonetti
  • 15,423
  • 3
  • 24
  • 57
0

We are using the definition of continuity in terms of limits of sequences.

Both the rational numbers and irrational numbers are dense on the real number line, so the only numbers where continuity is even possible is when

$x + 2 = x^2$

Let us show that $f$ is indeed continuous at, say, the point $2$.

Let $x_{n} \rightarrow 2$ be any sequence converging to $2$.

If the $x_{n}$ are all rational, we see that $f(x_{n})$ approaches $4$ (equal to $f(2)$) so we are done. Similarly, if the sequence contains only irrationals, no sweat. You are also OK if the sequence contains only a finite number of irrationals, or a finite number of rational numbers. The only 'problem' is if we keep getting both types of numbers as we move along the sequence. But for positive $x_n$,

$2 + x_n \gt x_n^2$ for $x_n \lt 2$
and
$2 + x_n \lt x_n^2$ for $x_n \gt 2$

So no matter what values the function is taking on, we can appeal to a 'squeeze' argument to show that it is continuous at $2$.

Sure happy the OP never mentions epsilon/delta!

CopyPasteIt
  • 11,366