# Questions on the definition of a function to be continuous.

A function f: D $\to$ R is said to be continuous at the point $x_0$ in D provided that whenever {$x_n$} is a sequence in D that converges to $x_0$. The image sequence ${f(x_n)}$ converges to $f(x_0)$. The function f: D $\to$ R is said to be continuous provided that it is continuous at every point in D.

I have 3 questions:

1) What is an image sequence? Is it like a function?

2) Using this definition, how do you show $x^2$ is a continuous function? (Show me step by step if possible. Thank you.)

3) The book mentions the Dirichlet function. I don't understand why it's not continuous. Like I plug in the definition, but the book is telling me that the density of the rationals makes it irrational. I'm not sure why it's still a non continuous function.

1) The image sequence is not a function. It is another sequence. I'll use an example to illustrate: Let $f(x) = x^2$ be the function in question. One sequence we might consider is $x_n = 1/n$, i.e. the sequence $\{1, 1/2, 1/3, 1/4, \ldots\}$. Its limit is $0$, which is therefore our $x_0$. The image sequence is what you get if you take each term above and feed it through $f(x)$. What we get is $$\{f(1), f(1/2), f(1/3), \ldots\}$$ i.e. $$\{1, 1/4, 1/9, \ldots\}.$$ This sequence still converges to $0$, and $f(x_0) = f(0) = 0$, so indeed, we have that the image sequence $\{f(x_n)\}$ converges to $f(x_0)$. If we can show that this works for every convergent sequence $\{x_n\}$ then $f(x)$ is continuous.

${}$

2) What I showed above does not prove that $x^2$ is continuous. It doesn't even prove that $x^2$ is continuous at $0$. It simply fails to give a counterexample to the continuity of $x^2$. To prove that $x^2$ is continuous we will need to do more work.

Let $\{x_n\}$ be some sequence converging to some limit point $x_0$. Its image sequence is $\{x_n^2\}$. We need to show that this converges to $x_0^2$. Let $\varepsilon > 0$ be given. By the definition of convergence, there exists a sufficiently large $N$ such that whenever $n > N$, $$|x_n - x_0| < \min\{\frac{\varepsilon}{2|x_0| + \varepsilon},\varepsilon\}.$$ (I'm using this minimum so that I can assume that $|x_n - x_0|$ is less than both $\varepsilon$ and the given fraction; both inequalities will be useful.) Therefore, if $n>N$, then $$|x_n^2 - x_0^2| = |(x_n-x_0)(x_n+x_0)| = |x_n - x_0||x_n +x_0| < \frac{\varepsilon}{2|x_0| + \varepsilon} \cdot |x_n + x_0|.$$ Notice that since $|x_n - x_0| < \varepsilon$, it follows that $|x_n| < |x_0| + \varepsilon$, and therefore $$|x_n + x_0| \leq |x_n| + |x_0| < 2|x_0| + \varepsilon.$$ Thus we have that $$|x_n^2 - x_0^2| < \frac{\varepsilon}{2|x_0|+\varepsilon} \cdot |x_n + x_0| < \varepsilon.$$ This proves that $\{x_n^2\}$ converges to $x_0^2$.

My thought process here was to look at $|x_n^2 - x_0^2|$ and ask myself how I can make this number small. I first thought to factor it as $|x_n^2 - x_0^2| = |x_n - x_0|\cdot |x_n+x_0|$. I realized that since $\{x_n\}$ converges to $x_0$, I can make $|x_n - x_0|$ as small as desired. On the other hand, when $x_n$ is close to $x_0$, then $|x_n + x_0|$ should be about $2|x_0|$. This is something bounded; indeed it doesn't depend on $n$! Thus, if $|x_n-x_0|$ is small, then $|x_n-x_0|\cdot|x_n + x_0|$ should be too. I figured out the correct bound of $\min \{\frac{\varepsilon}{2|x_0| + \varepsilon},\varepsilon\}$ from there.

${}$

3) I'm assuming the Dirichlet function is the following: $$f(x) = \left\{ \begin{array}{rcl} 1 & : & x \in \Bbb Q\\0 & : & x \notin \Bbb Q\end{array}\right.$$ To prove it's not continuous, we need to find a sequence $\{x_n\}$ converging to some number $x_0$ such that $\{f(x_n)\}$ doesn't converge to $f(x_0)$.

The thing to try is a sequence of rational numbers converging to some irrational number. For instance, take $x_0 = \pi$ and let $\{x_n\}$ be given by the decimal expansion: $$x_1 = 3,\, x_2 = 3.1,\, x_3 = 3.14,\, \ldots$$ By construction $\{x_n\}$ converges to $\pi$, and every number in the sequence $\{x_n\}$ is rational. Therefore the image sequence is $$1, 1, 1, \ldots$$ This sequence obviously converges to $1$. Yet $f(x_0) = f(\pi) = 0$ because $\pi$ is irrational. Since $f(\pi)$ is not the limit of the sequence $\{f(x_n)\}$, we conclude that $f(x)$ is not continuous at $\pi$. Indeed, you can show that $f(x)$ is not continuous at any real number!

$x_n$ converge to $x$ and $x\in D$. The image sequence here is $y_n=f(x_n)$. For to show that $f(x)=x^2$ is continuous use that if $x_n,y_n$ converge to $x$ and $y$ then $x_ny_n$ converge to $xy$.

The image sequence is the sequence $y_n=f(x_n)$, which is the image of the original sequence by $f$.

To show $f(x)=x^2$ is continuous, fix a convergent sequence $x_n$ so that $\lim_{n\rightarrow\infty}= x_0$. The image sequence is $y_n=f(x_n)=x_n^2$. Because $\lim_{n\rightarrow\infty}=x_0$, it can be shown that $\lim_{n\rightarrow\infty}x_n^2= x_0^2$.

From what I gather, the Dirichlet function is $g$ where $g(x)=1$ for $x$ rational, and $g(x)=0$ for $x$ irrational. This is continuous nowhere. Fix $x_0\in\mathbb{R}$. For $x_0$ rational, we can choose a sequence $x_n$ of irrational numbers so $\lim_{n\rightarrow\infty}x_n=x_0$. In this case, $g(x_0)=1$, but $\lim_{n\rightarrow\infty}g(x_n)=\lim_{n\rightarrow\infty}0=0$. For $x_0$ irrational, we can choose a sequence $x_n$ of rational numbers so $\lim_{n\rightarrow\infty}x_n=x_0$. In this case, $g(x_0)=0$, but $\lim_{n\rightarrow\infty}g(x_n)=\lim_{n\rightarrow\infty}1=1$.