My question is from Apostol's Vol. 1 One-variable calculus with introduction to linear algebra textbook.

Page 70. Exercise 3. Show that $\int_a^b \lfloor x \rfloor \mathrm dx+\int_a^b \lfloor-x \rfloor \mathrm dx=a-b.$

Additional information. Definition of the integral of step functions. The integral of $s$ from $a$ to $b$, denoted by the symbol $\int_a^bs(x)\mathrm dx$, is defined by the following formula: $$\int_a^bs(x)\mathrm dx=\sum_{k=1}^ns_k(x_k-x_{k-1}).$$

I haven't had much problem computing integrals of these floor functions, but I am stuck at proving this general case of $\int_a^b \lfloor x \rfloor \mathrm dx+\int_a^b \lfloor-x \rfloor \mathrm dx=a-b.$ Any hints would be appreciated. Thanks in advance.

  • 1
    $\begingroup$ Please, write the $\sf\mbox{Floor}$ function as $\large\left\lfloor\cdots\right\rfloor$ instead of $\large\left[\cdots\right]$. $\endgroup$ – Felix Marin Dec 10 '14 at 7:35
  • $\begingroup$ Yes, sorry, I will. It's just that this is the way it is written in the book. $\endgroup$ – George Apriashvili Dec 10 '14 at 7:36


and use this follow $$[x]+[-x]=\begin{cases}-1,x\neq z\\ 0,x\in Z \end{cases}$$

  • $\begingroup$ Thank you very much, I proved few properties and examples of floor functions but haven't proved the case $[x]+[-x]$. So we would have $\int_a^b([x]+[-x])\mathrm dx=\int_a^b-1=a-b$ right? $\endgroup$ – George Apriashvili Dec 10 '14 at 6:48

Assuming your dealing with a floor function ie $\lfloor{x}\rfloor$. Then assume that $x\geq 0$ for simplicity. It can be written an $\lfloor{x}\rfloor=(x-\epsilon)$ for some $0\leq \epsilon<1$. Then it follows that $\int_{a}^{b} (x-\epsilon) dx =\frac{x^2}{2}-x\epsilon$ from $a$ to $b$ is just $\dfrac{b^2}{2}-b\epsilon-\dfrac{a^2}{2}+a\epsilon$. Finally $\int_{a}^{b}\lfloor{-x}\rfloor=\int_{a}^{b} (-x-1+\epsilon) dx= \frac{-x^2}{2}-x+x\epsilon$ from a to b which is just $\dfrac{-b^2}{2}-b+b\epsilon+\dfrac{a^2}{2}+a-a\epsilon$. Thus adding the two integrals we get $\dfrac{b^2}{2}-b\epsilon-\dfrac{a^2}{2}+a\epsilon-\dfrac{b^2}{2}-b+b\epsilon+\dfrac{a^2}{2}+a-a\epsilon=a-b$.

We see that $\lfloor{x}\rfloor=(x-\epsilon)$ where $0\leq \epsilon<1$. It must follow that $\lfloor{-x}\rfloor=-x-1+\epsilon$ when $x>0$. *If you want to see this suppose that we stick with $x\geq 0$ then it follows that $x$ is between some integer $n$ and $n-1$ that is $n-1\leq x\leq n$. Let $\epsilon=x-n+1$. That is the distance between $x$ and $n-1$. Then the distance between $-x$ and $-n$ is just $1-\epsilon= -x+n$. Since it follows that $\lfloor{-x}\rfloor=-n$ which really is $-x-1+\epsilon$. This is not really a proof but more so some intuition behind it. You will need the Archimidean property to prove the existence of a $n\in\mathbb{Z}$ such that $n-1\leq x\leq n$ which is a bit outside the scope of this problem. The case when $x<0$ is the same except its flipped flopped.

  • $\begingroup$ Thanks for different explanation, it's just that you are explaining integral of floor function by "converting" it to integral of normal function, as I understood it. Problem is, I haven't studied integrals of regular functions yet, all of the theorems so far are about manipulating floor functions. $\endgroup$ – George Apriashvili Dec 10 '14 at 7:44
  • $\begingroup$ Thats ok. Sometimes thinking outside the scope of the chapter can be a great thing as well. Technically to integrate this is just elementary calculus techniques which I think is fine to use whenever you can in proofs. $\endgroup$ – user60887 Dec 10 '14 at 7:59
  • $\begingroup$ Yes I agree, I will read it more carefully and include it with other proof. Thanks! $\endgroup$ – George Apriashvili Dec 10 '14 at 8:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.