# Example of a function that is not continuous but Riemann Integrable

I have recently stumbled upon the following function $f [0,1] \rightarrow \mathbb{R}$:

$$f(x) = \begin{cases} e, & \text{if } x = 0 \\ \sum_{n=0}^y \frac{1}{n!}, & \text{if } x>0 \end{cases}$$ where $y = [\frac{1}{x}]$ is the integer part of $\frac{1}{x}$. The claim is that it is Riemann integrable but has infinitely many discontinuities. I clearly can see that it is Riemann Integrable since it is a decreasing function on the given interval $[0,1]$. However, I am not sure about the proof of being infinitely discontinuous. Here is the proof that came with this example:

Take $n \in \mathbb{N}$ and set $x_0 = \frac{1}{n}$. Then, $\lim_{x\to x_0^-} f(x) - \lim_{x\to x_0^+} f(x) = \frac{1}{n!}$

Here I understand that discontinuity follows, however, I am not sure how they obtained that the difference is $\frac{1}{n!}$.

Thank you in advance!

• @Starfall I might have explained it not very well but what I mean here is that it is a monotonic function, i.e. strictly decreasing and so Riemann Integrable. – IVU Apr 28 '17 at 21:36
• @IVU: Neat example! – dantopa Apr 28 '17 at 21:41
• that should be $f(x).$ – zhw. Apr 29 '17 at 19:41
• @zhw. Indeed, it should be, thank you – IVU Apr 30 '17 at 13:48

## 1 Answer

We are seeing the step discontinuity.

Let $x_{0}=\frac{1}{n}=\frac{1}{3}$. As we approach from the left, $$\color{blue}{2.9,\ 2.99,\ 2.999},\dots$$ The function value is $$\frac{1}{0!} + \frac{1}{1!} + \frac{1}{2!}$$ As we approach from the right, $$\color{red}{ 3.1,\ 3.01,\ 3.001}$$ The function value is $$\frac{1}{0!} + \frac{1}{1!} + \frac{1}{2!} + \boxed{\frac{1}{3!}}$$

The difference is $\frac{1}{n!} = \frac{1}{3!}$ • Oh, this makes sense now, thank you! – IVU Apr 28 '17 at 22:15
• You need to take $x_0 = 1/3$ and take the inverses of the other numbers as well. Other than this, +1. – Michał Miśkiewicz Apr 28 '17 at 22:34
• @Michał Miśkiewicz: You careful reading and comment helps me and many other users. Thanks. – dantopa Apr 29 '17 at 3:58