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$.
-
$\begingroup$ @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? $\endgroup$– FazzoliniJun 5, 2013 at 12:01
-
$\begingroup$ @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$. $\endgroup$– FazzoliniJun 5, 2013 at 12:15
3 Answers
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?
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$?
-
$\begingroup$ 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$. $\endgroup$ Jun 5, 2013 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$