10

Okay so I'm trying to determine whether $\int_{0}^{1}\left(\left\lceil \frac{1}{x} \right\rceil-\left\lfloor \frac{1}{x} \right\rfloor\right) \, dx$ converges and if so, to what value? So the function $\left\lceil \frac{1}{x} \right\rceil-\left\lfloor \frac{1}{x} \right\rfloor = 0$ when $x=\frac{1}{k}$ where $k$ is a natural number, and everywhere else $\left\lceil \frac{1}{x} \right\rceil-\left\lfloor \frac{1}{x} \right\rfloor = 1$ From there I split the integral:

\begin{align*} \int_0^1 \left(\left\lceil \frac{1}{x} \right\rceil-\left\lfloor \frac{1}{x} \right\rfloor\right) \, dx &= \int_{1/2}^1 1 \, dx +\int_{1/3}^{1/2} 1 \, dx + \int_{1/3}^{1/4} 1 \, dx + \cdots \\[10pt] &= (1 - 1/2) + (1/2 - 1/3) + (1/3 - 1/4) + \cdots \\[10pt] &= \lim_{m \to \infty} 1-1/m = 1\;. \end{align*}

Am I correct?

Brian M. Scott
  • 616,228
lamyvista
  • 363

1 Answers1

5

Yes, you are correct. But it is much faster if you say that $\lceil \frac{1}{x} \rceil-\lfloor \frac{1}{x} \rfloor$ is $1$ except in a set of measure zero. If you don't know what the meausre of a set is, just say that the set is countable. Then $$\int_0^1\left(\left\lceil \frac{1}{x}\right \rceil-\left\lfloor \frac{1}{x} \right\rfloor\right)dx=\int_0^11dx=1 $$

Your solution is still very nice.

ajotatxe
  • 65,084
  • Thank you. I haven't taken any measure theory yet, and I wasn't sure of it being correct because of the function taking on a value of 0 at all of the integrals bounds. I guess that's a nice explanation as to why my first equality holds. – lamyvista Jul 16 '15 at 00:07
  • The problem then is that this function might not be integrable in Riemann's sense. I think it is, but it is not obviuos, that is, if you are using Riemann's integrals, you should show that it is integrable. – ajotatxe Jul 16 '15 at 00:17
  • @ajotatxe: One can just use the theorem that says that a function is Riemann integrable on an interval iff its set of discontinuities has measure zero. I think most introductory analysis classes cover that theorem. – shalop Jul 16 '15 at 01:07
  • Dirichlet's function (rationals map to $0$ and irrationals to $1$) is not integrable in Riemann's sense. – ajotatxe Jul 16 '15 at 03:09
  • 1
    @ajotatxe: That is not a counterexample to my statement. Think about it: where is that function discontinuous? – shalop Jul 16 '15 at 03:29