Riemann-Stieltjes integral of a general function f with respect to the greatest integer function. I want to prove $\sum_{n\leq x} f(n)= \int_{y}^{x}f(t)d[t]$ where the interval of integration is [y,x]. Here n is an integer.
My attempt:- By Riemann Stieltjes integration's definition, we have
$\int_{y}^{x}f(t)dt = \lim_{n \to +\infty}\sum_{ k=1}^{n-1} f(c_{k})([x_{k+1}]-[x_{k}])  $ where is $c_{k}$ is in $[x_{k}, x_{k+1}]$.
I do not know how to proceed further. Kindly guide me further.
 A: I will assume that $f$ is a continuous function on the interval $[a, b].$ Consider a partition $P = (x_0 = a < x_1 < \dots < x_{n - 1} < x_n)$ and a system of intermediate points $\xi = (\xi_1, \dots, \xi_n).$ The the associated Riemann-Stieltjes sum is simply $S(f; g, P, \xi) := \sum_{1 \leq i \leq n} f(\xi_i)(g(x_i) - g(x_{i - 1})) = \sum_{1 \leq i \leq n} f(\xi_i) (\lfloor x_i \rfloor - \lfloor x_{i - 1} \rfloor).$ We consider a sequence of partitions $P_n = (x_0^n < \dots < x_N^n)$ with $\Vert P_n \Vert \to 0$ and any associated system of intermediate points $\xi_n.$ It follows that for every integer $k$ between $a$ and $b$ there is a unique interval $[x^n_{i_k - 1}, x^n_{i_k}]$ such that $k \in [x^n_{i_k - 1}, x^n_{i_k}]$ and $\lfloor x^n_{i_k} \rfloor - \lfloor x^n_{i_kk - 1} \rfloor = 1$ for $n$ sufficiently large (if $n$ happens to be one of the ends of this interval, then it would be found in two intervals of this type; however, there is only one that also verifies the second condition since $\Vert P_n \Vert$). Then $$S(f;g, P_n, \xi_n) = \sum_{1 \leq i \leq N} f(\xi^n_i) (\lfloor x^n_i \rfloor - \lfloor x^n_{i - 1} \rfloor) = \sum_{1 \leq i \leq N} f(\xi^n_{i_k}).$$ Since $\xi^n_{i_k}$ is always in the interval that contains $k,$ $\Vert P_n \Vert \to 0$ and $f$ is continuous, we get that $f(\xi_{i_k}^n) \to f(k)$ as $n \to \infty.$ It follows that $$\int_a^b f d\lfloor t \rfloor = \sum_{n \in \mathbb{Z} \cap [a, b]} f(n),$$ where this sum is taken to be $0$ if the intersection is empty. I hope this helps. :)
