ORIGINAL QUESTION (UPDATED):
I have a function $f:\mathbb{R} \rightarrow \mathbb{R}$ containing an integral that involves the floor function:
$$f(x):= - \lfloor x \rfloor \int_1^x \lfloor t \rfloor x \left( -\pi t x \left( \frac{\cos \left(\pi (1-t) x \right)}{\pi (1-t) x} - \frac{\sin \left(\pi (1-t) x \right)}{\pi^2 (1-t)^2 x^2} \right) + \text{sinc}\left(\pi (1-t) x \right) \right) dt$$
with $x>1$ a real number.
I can calculate numerical values of $f$ in Mathematica using NIntegrate. Heuristically, it looks as though $f$ evaluates to $x$ whenever $x$ is an integer. I want to know if this is correct, and if so, how do I prove it?
Since I am only looking at integer values for the argument, make the substitution $x \rightarrow n$ with $n \in \mathbb{N}_{>1}$. Given the discontinuities in the integrand, a logical approach is to write
$$ f(n) = \\ - n \lim_{\epsilon \rightarrow 0+} \sum_{k=1}^{n-1} \int_{k + \epsilon}^{k + 1 - \epsilon} \lfloor t \rfloor n \left( -\pi t n \left( \frac{\cos \left(\pi (1-t) n \right)}{\pi (1-t) n} - \frac{\sin \left(\pi (1-t) n \right)}{\pi^2 (1-t)^2 n^2} \right) + \text{sinc}\left(\pi (1-t) n \right) \right) dt \\ = - n \lim_{\epsilon \rightarrow 0+} \sum_{k=1}^{n-1} \int_{k + \epsilon}^{k + 1 - \epsilon} t n \left( -\pi t n \left( \frac{\cos \left(\pi (1-t) n \right)}{\pi (1-t) n} - \frac{\sin \left(\pi (1-t) n \right)}{\pi^2 (1-t)^2 n^2} \right) + \text{sinc}\left(\pi (1-t) n \right) \right) dt \\ = - n \lim_{\epsilon \rightarrow 0+} \sum_{k=1}^{n-1} \frac {k \left( \frac {(k - \epsilon +1) \sin (\pi n (k - \epsilon))} {k - \epsilon} - \frac{(k + \epsilon) \sin (\pi n (k + \epsilon - 1))}{k + \epsilon - 1} \right)} {\pi n} $$
But how do I proceed from here? Is this the right approach? Is the heuristic result that $f(n) = n$ valid (i.e., the limit of the summation is equal to $-1$)? How can it be proved?
DESCRIPTION OF UPDATE:
I originally asked a muddled question that was partly about whether my approach was right, and partly about proving a heuristic result. I have since sorted out what turned out to be an error over when to take a limit, leaving me only with trying to prove the heuristic result.
I have edited the question to reflect this.
Let $I$ be the required integral.
First, I assume that $\operatorname{sinc}$ mentioned in $I$ is $\sin$.
Second, I think your approach is overcomplicated, because $I=\lim_{\epsilon\to 0+}\int_{1+\epsilon}^x \dots$, and the integrals $\int_{1+\epsilon}^x\dots $ are proper.
Third, in the final sum all summands are continuous functions, equal $0$ when $\epsilon=0$, but
$$1\cdot \frac{-(1 + \epsilon) \sin \pi n (1 + \epsilon - 1)}{(1 + \epsilon - 1)\pi n}=\frac{-(1 + \epsilon) \sin \pi n\epsilon}{\epsilon\pi n}$$
The latter expression tends to $-1$ when $\epsilon$ tends to $0$, so the total sum indeed tends to $n$.