Show the function $f:[0,1]\rightarrow\mathbb{R}$ given by
$$ f(x)= \begin{cases} 1,&x=\frac{1}{n}\text{ for any positive integer $n$}\\ 0,&\text{otherwise} \end{cases} $$has an infinite number of discontinuities.
I have completed the proof, however I'm not sure if it is completely rigorous. I first showed that there is an infinite number of point that satisfy $$x=\frac{1}{n}$$ in the interval $[0,1]$.
I then defined $k_n$ as follows$$k_n \in \left(\frac{1}{n+1},\frac{1}{n}\right)\;\forall n\in \mathbb{N}$$ I then fixed $n$ and used the following interval for the function $$\left[\frac{1}{n+1},\frac{1}{n}\right)$$rather than $[0,1]$ since it is a subinterval of $[0,1]$. My logic was that if it is discontinuous on the subinterval then it must be discontinuous on $[0,1]$ but I am not quite sure how to say this rigorously so I simply stated it. I then negated the definition of continuity and took$$\epsilon=\frac{1}{2}$$ I then substituted$$f\left(k_n\right) = 0\text{ and }f\left(\frac{1}{n}\right) = 1$$so, if$$\left|k_n-\frac{1}{n}\right|<\delta$$then,$$\left|0-1\right|=1\geq\frac{1}{2}$$This was the gist of my proof, I didn't write out everything explicitly for you but, can it be improved? have i missed anything? got a better method? any help is appreciated.
$\endgroup$ 82 Answers
$\begingroup$Discontinuity needs to be proved at single points, not intervals. You've already started saying there are an infinite number of points $1/n$ (which is obvious).
Look closely at the negation of continuity at $x_0$:$$\lnot\left(\forall\epsilon>0,\;\exists\delta>0,\;\forall x,\;\left|x-x_0\right|<\delta\Rightarrow\left|f(x)-f(x_0)\right|<\epsilon\right)$$All the quantifiers reverse - "not for all" means "there is a counterexample", "not exists" means "every possibility doesn't work":$$\exists\epsilon>0,\;\forall\delta>0,\;\exists x,\;\left|x-x_0\right|<\delta\;\wedge\;\left|f(x)-f(x_0)\right|\not<\epsilon$$
This tells you what you actually need to do to prove discontinuity: instead of being told $\epsilon$ and having to pick $\delta$ to work, you get to pick $\epsilon$ first, then you have to make every $\delta$ not work.
In short, you need to find points arbitrarily close to $x_0$ that are more than $\epsilon>0$ away from $f(x_0)$ for some fixed $\epsilon$.
Taking $x_0=\frac{1}{n}$ and $\epsilon=\frac{1}{2}$ is clearly fine; you didn't word the last part correctly. What you were trying to say is that$$\forall k_n\in\left(\frac{1}{n+1},\frac{1}{n}\right),\;f(k_n)=0$$which is fine. However, the actual statement you need is "give me $\delta$, I will find you $k_n$ such that it breaks the definition of continuity at $x_0$".
The correct statement (let $x_0=\frac{1}{n},\;\epsilon=\frac{1}{2}$): Let $\delta>0$ be given. Choose$$k_n=\max\left(x_0-\frac{\delta}{2},\frac{1}{n+\frac{1}{2}}\right)$$such that$$\left|k_n-x_0\right|<\delta\text{ and }\frac{1}{n+1}<k_n<\frac{1}{n}\text{.}$$The first half says this is a valid $x$ for testing the continuity condition. The second half says $f(k_n)=0$ and therefore $\left|f(k_n)-f(x_0)\right|>\epsilon$.
$\endgroup$ 1 $\begingroup$Let $x_n = \frac{1}{n}$. Fix $n$ and consider $y_m = \frac{1}{n} + \frac{1}{(n+1)^m}$ with $m \geq 2$. Notice that $y_m = \frac{(n+1)^m + n}{n(n+1)^m}$ is a reduced fraction:\begin{eqnarray} \gcd((n+1)^m+n, n(n+1)^m) &=& \gcd((n+1)^m+n,n) \, \gcd((n+1)^m+n,(n+1)^m) \\ &=& \gcd((n+1)^m,n)\,\gcd(n,(n+1)^m) \\&=& 1 \end{eqnarray}Hence it's not possible to write it as $\frac{1}{k}$ for any $k$. Thus $f(y_m) = 0$ for each $m$ and $f(y_m) \to 0$. On the other hand $y_m \to x_n$ and $f(x_n) = 1$. Hence, $\lim_{m \to \infty} f(y_m) \neq f(\lim_{m \to \infty} y_m)$ and $f$ is not continuous at $x_n$.
$\endgroup$