1
$\begingroup$

If we let $f_n(x)= 1,$ if $x\in\{1,\frac{1}{2},...,\frac{1}{n}\}$ and $0$, otherwise.

  • 4
    If I understand correctly, $f$ is locally constant away from the one point where it is a different value. Constant functions are continuous.2017-02-09
  • 0
    fix $n$ and for a given $\epsilon-$ neighborhood of $0,$ take your $\delta-$ neighborhood of $0$ of length $<1/2n$ and see what happens-2017-02-09

1 Answers 1

2

We want to show that $f_n(0) = \lim_{x \to 0} f(x)$. To do this, note that $f_n(0) = 0$.

For the limit part, by definition, we want to prove that given $\epsilon > 0$, there exists $\delta > 0$ such that $|0 - x| < \delta \implies |0-f_n(x)| < \epsilon$.

But then, for any $\epsilon > 0$, let $\delta = \frac{1}{2n}$. Whenever $|0-x| < \frac{1}{2n}$, we know that $x<\frac{1}{2n}$, so it does not belong in $\{1 ,\ldots ,\frac 1n \}$ so $f_n(x) = 0$. Hence, it follows that $|0 - f_n(x)| = 0 < \epsilon$ is true anyway.

Hence, $f_n(x)$ is continuous at zero (for all $n$, since nothing special about $n$ was assumed other than it being a natural number).