Evaluate: $$\int _0^2 (x^2+1) \; d \lfloor x\rfloor$$
Here $[x]$ denotes the greatest integer function of $x$.
I know this has to be done by parts as:
$$\int _0^2 (x^2+1) \, d [x]= {|(1+x^2)[x]|}_0^2- \int_0^2 [x] \, d(1+x^2)$$
Note:- This integral can be quite easily evaluated.I don't need the method for this.
But if we split the given integral into the sum of $2$ integrals as:-
$$\int _0^2 (x^2+1) \, d [x]=\int _0^1 (x^2+1) d [x]+\int _1^2 (x^2+1) \, d [x]$$
My question is as $[x]$ is constant in each of the intervals $[0,1)$ and $[1,2)$ in each of these $2$ integrals $d[x] = 0$
So, the value of the given integral should be $0$.
This seems contradictory !!
Kindly correct my reasoning for the part $d[x]=0$.