Evaluate $$ \int_{0}^{1} [mx] \, dx$$
The problem is like this: Consider the following function: $f:[0,1]\rightarrow R$, with $m>0 $, where $[ x ]$ is the floor function. Determine $m$ for which
$$ \int_{0}^{1} f(x)=\frac{3}{2}. $$
My attempt was to start from: $m x-1<[m x]\le m x$ and then to split the main integral into two. I am not sure if this the way to go.
Any help is appreciated.
First, note if $m\leq 1$, then the integral is 0. So I'll assume $m>1$.
Using a substitution, we have $$ \int _0^1 [mx]\,dx = \frac{1}{m}\int_0^m [y]\,dy $$ $$ = \frac{1}{m}\int_0^{[m]} [y]\,dy+\frac{1}{m}\int_{[m]}^{m} [y]\,dy $$The first integral can be evaluated by a simple sum, while on the second integral $[y]=[m]$. So we have $$ \int _0^1 [mx]\,dx = \frac{[m]-1}{2}+ \frac{[m] (m-[m])}{m} $$Note the second term vanishes at integer $m$. In particular, $m=4$ gives the value of $3/2$.