Integral with respect to greatest integer function Assume $f$ is continuous on $[1,n]$. How would you go about taking the integral 
$$\int_1^n f(x)\,d\lfloor x\rfloor$$
where $\lfloor x\rfloor$ represents the greatest integer function?
 A: $$\begin{align*}
\int_1^n f(x)\ d\lfloor x \rfloor =& \left[f(x)\lfloor x \rfloor\right]_1^n - \int_1^n \lfloor x \rfloor df(x)\\
\end{align*}$$
Since  $f$ is continuous, we use the additivity of integration on intervals property for the steps
$$\begin{align*}
=& nf(n)-f(1) - \sum_{i=1}^{n-1} \int_i^{i+1}\lfloor x\rfloor df(x)\\
=& nf(n) - f(1) - \sum_{i=1}^{n-1} i\int_i^{i+1}df(x)\\
=& nf(n) - f(1) - \sum_{i=1}^{n-1} i [f(i+1)-f(i)]\\
=& nf(n) - f(1) - \sum_{i=2}^{n} (i-1)f(i) +  \sum_{i=1}^{n-1} if(i)\\
=& \sum_{i=2}^{n} f(i)
\end{align*}$$
A: This is a Stieltjes integral. By definition it is a limit under refinement of sums of the following kind: Consider (tagged) partitions
$${\cal P}:\quad 1=x_0<x_1<x_2<\ldots<x_N=n$$
of the interval $[1,n]$, and put
$$S_{\cal P}:=\sum_{i=1}^N f(\xi_i)\bigl(\lfloor x_i\rfloor-\lfloor x_{i-1}\rfloor\bigl)\ .$$
Note that $\lfloor x_1\rfloor-\lfloor x_0\rfloor=0$ and $\lfloor x_N\rfloor-\lfloor x_{N-1}\rfloor=1$ for all sufficiently fine partitions. It is then easily seen that
$$\lim_{{\cal P}\to?}\> S_{\cal P}=\sum_{k=2}^n f(k)\ .$$
