finding $ \int^{4}_{0}(x^2+1)d(\lfloor x \rfloor),$ given $\lfloor x \rfloor $ is a floor function of $x$ finding $\displaystyle \int^{4}_{0}(x^2+1)d(\lfloor x \rfloor),$ given $\lfloor x \rfloor $ is a floor function of $x$
Assume  $\displaystyle I = (x^2+1)\lfloor x \rfloor \bigg|^{4}_{0}-2\int^{4}_{0}x\lfloor x \rfloor dx$ ( integration by parts )
i have a doubt about limit part , did not understand whether the limit corresponding to $x$
or corrosponding to $\lfloor x \rfloor$
because when we take $\displaystyle \int^{b}_{a}f(x)dx,$ then limits are corrosponding to $x$
but when we take  $\displaystyle \int^{b}_{a}f(x)d(\lfloor x \rfloor ),$ then limit corrosonding to $\lfloor x \rfloor$
please clearfy my doubt and also explain me whats wrong with my method above , thanks 

you can rewrite the integral as $$\int_0^4 x^2+1 \frac{d[x]}{dx}dx$$ where $[x]$ is greatest integer function.Now apply IBP taking $\frac{d[x]}{dx} $ as function to be first integrated.
$$ (x^2+1) \int (\frac{d[x]}{dx} dx)\text{from x=0 to x=4}-\int_0^4 2x ( \int \frac{d[x]}{dx} dx)dx=0$$
