In mathematics, the integer part function, also known as the floor function is the function that associates with each real number $x$ the largest integer less than or equal to $x$, denoted by $\lfloor x\rfloor$ or $[x]$ being $\lfloor x \rfloor=\max\, \{k\in\mathbb{Z} : k\le x\}$. We suppose to consider the trivial integral $$\int \lfloor x\rfloor \, dx\tag 1$$
I have thought that since the value of the indefinite integral is independent of the integration variable could I write? $$\int \lfloor x\rfloor \, d\lfloor x\rfloor=\frac{(\lfloor x\rfloor)^2}2+\text{const.}\tag 2$$ I know that a finite function with a finite (at most numerable) number of discontinuity points is always Riemann-integrable. What would happen if the integrand function is of the kind
$$\int f(x)\lfloor g(x)\rfloor\,dx\tag 3$$
Definitively how can indefinite or definite integration be treated in the presence of integer part of functions? How should I proceed?