# Evaluate $\int_{0}^{[x]}\left(\int_{0}^{[t]}[s]-\left[s-\frac{1}{2}\right] \mathrm{d}s\right) \mathrm{d}t$

Evaluate $$\int_{0}^{[x]}\left(\int_{0}^{[t]}[s]-\left[s-\frac{1}{2}\right] \mathrm{d}s\right) \mathrm{d}t$$

Where $$[x]$$ denotes the greatest integer function . But I don't know how to approach this kind of problem. So I want to know how to think to solve this type of problems.
If there are more than one way to approach, I would like to gather the knowledge.
Thanks in advance.
Edit: Edited after the comments.

• +1 for the interesting question. Attention SPOILER ! After some careful inspection based on graphic representations of intergrand and integral I found this simple solution for the integral $i(x) = \frac{1}{4} (\lfloor x\rfloor -1) \lfloor x\rfloor$. – Dr. Wolfgang Hintze Mar 13 at 8:33

## 1 Answer

Since $$x$$ only appears in a floor function in a limit of the outer integral, we can assume $$x$$ is an integer: $$\int_0^x\int_0^{[t]}[s]-[s-1/2]\,ds\,dt$$ $$[s]-[s-1/2]$$ is $$0$$ when the fractional part of $$s$$ is greater than $$\frac12$$ and $$1$$ when it is not. Since the bounds of the inner integral are also integers, it simply evaluates to half of the distance between the bounds: $$=\int_0^x\frac12[t]\,dt$$ Now assuming $$x>0$$ (the other case is similar), $$t$$ assumes the same value for each of $$x$$ intervals of length $$1$$: the values from $$0$$ to $$x-1$$ inclusive. Thus the integral becomes a finite sum. $$=\frac12(0+1+\dots+(x-1))=\frac{x(x-1)}4$$ The final answer is $$\frac{[x]([x]-1)}4$$.

• Close encounter: my comment was 2 minutes earlier than your solution ;-) – Dr. Wolfgang Hintze Mar 13 at 8:37
• Sir I cannot understand the line written by you "Since the bounds of the inner integrals are also integers, it simply evaluates to half of the distance between the bounds". Please explain this sir. – Math-Learner Mar 13 at 13:07