Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How to show that $$ \int_{a}^{b}\left \lfloor x \right \rfloor dx+ \int_{a}^{b}\left \lfloor -x \right \rfloor dx=a-b $$ Where $\left \lfloor x \right \rfloor$ means greatest integer $\leqslant x$.

share|cite|improve this question
@Vishal I tried $\int_{a}^{b}\left \lfloor x \right \rfloor dx+ \int_{a}^{b}\left \lfloor -x \right \rfloor dx=\int_{a}^{b}(\left \lfloor x \right \rfloor + \left \lfloor -x \right \rfloor)dx$. Then I think that $\left \lfloor x \right \rfloor + \left \lfloor -x \right \rfloor=0$, so $\int_{a}^{b}0dx = 0$. But it is clearly wrong, but why? – Fazzolini Jun 5 '13 at 12:01
@Vishal I was mistaken. $\left \lfloor x \right \rfloor + \left \lfloor -x \right \rfloor=0$ only when $x$ is integer, at other points, $\left \lfloor x \right \rfloor + \left \lfloor -x \right \rfloor=-1$. – Fazzolini Jun 5 '13 at 12:15
up vote 1 down vote accepted

What happens when you add $\lfloor x \rfloor$ and $\lfloor -x \rfloor$? Can you see how this relates to the bound of the integral and the answer you want?

share|cite|improve this answer

Represent $x$ as $n+k$, where $n$ is the greatest integer below $x$ and $k$ is below $1$. What is $\left \lfloor n+k \right \rfloor$ and $ \left \lfloor -(n+k) \right \rfloor$?

share|cite|improve this answer
I figured it out. At points, where $x$ is integer, $\left \lfloor x \right \rfloor + \left \lfloor -x \right \rfloor=0$, at any other point, $\left \lfloor x \right \rfloor + \left \lfloor -x \right \rfloor=-1$. So we have $\int_{a}^{b}-1dx = (b-a)(-1)=a-b$. – Fazzolini Jun 5 '13 at 12:14

Show that :)

$\displaystyle\int \lfloor x\rfloor dx=\dfrac{\left\lfloor x\right\rfloor\left(2x-1-\left\lfloor x\right\rfloor\right)}{2}+C$

$\displaystyle\int \lfloor -x\rfloor dx=\dfrac{\left\lfloor -x\right\rfloor\left(2x+1+\left\lfloor -x\right\rfloor\right)}{2}+C$

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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