To find $\int_1^a \lfloor x^2\rfloor f'(x)\,\mathrm{d}x$ where $a>1$ is a real number To find the integral $$I= \int_1^a \lfloor x^2\rfloor f'(x) dx$$ where $a > 1$ is a positive real number and $ \lfloor x\rfloor \ $ is the greatest integer function.
I tried splitting the limits as $1 $ to $ \sqrt 2$ and so on. But I couldn't get a general solution for this problem.
 A: Integration by parts using the Riemann-Stieltjes integral gives
$$
\begin{align}
\int_1^a\left\lfloor x^2\right\rfloor f'(x)\,\mathrm{d}x
&=f(a)\left\lfloor a^2\right\rfloor-\int_1^a f(x)\,\mathrm{d}\!\left\lfloor x^2\right\rfloor\\
&=\bbox[5px,border:2px solid #C0A000]{f(a)\left\lfloor a^2\right\rfloor-\sum_{k=1}^{\left\lfloor a^2\right\rfloor}f\!\left(\sqrt{k}\right)}\tag1
\end{align}
$$
Note that this is a continuous function regardless of the floor function and the summation if $f$ is smooth.

We can verify $(1)$ by looking at its derivative. For $n\lt a^2\lt n+1$, the derivative of both sides is
$$
n\,f'(a)\tag2
$$
Since $f$ is continuous at $\sqrt{n}$,
$$
\forall\epsilon\gt0,\exists\delta\in(0,1):\sqrt{n-\delta}\le x,y\le\sqrt{n+\delta}\implies|f(x)-f(y)|\le\frac\epsilon{n+1}\tag3
$$
Thus,
$$
\begin{align}
&\left|\left[f\!\left(\sqrt{n+\delta}\right)\left\lfloor n+\delta\right\rfloor-\sum_{k=1}^{\left\lfloor n+\delta\right\rfloor}f\!\left(\sqrt{k}\right)\right]-\left[f\!\left(\sqrt{n-\delta}\right)\left\lfloor n-\delta\right\rfloor-\sum_{k=1}^{\left\lfloor n-\delta\right\rfloor}f\!\left(\sqrt{k}\right)\right]\right|\\[6pt]
&=\left|n\left[f\!\left(\sqrt{n+\delta}\right)-f\!\left(\sqrt{n-\delta}\right)\right]+f\!\left(\sqrt{n-\delta}\right)-f\!\left(\sqrt{n}\right)\right|\\[9pt]
&\le\epsilon\tag4
\end{align}
$$
That is, the right side of $(1)$ is continuous at $\sqrt{n}$.
Since the derivatives match when $a^2\not\in\mathbb{Z}$, both are continuous when $a^2\in\mathbb{Z}$, and both are $0$ when $a=1$, the left and right sides of $(1)$ are equal.
A: Hint:
Consider
$$I=\left(\sum_{r=1}^{\lfloor a \rfloor}{r^2\int_r^{r+1}f’(x) dx }\right)-\lfloor a \rfloor ^2f\left(\lfloor a \rfloor+1\right)+ \lfloor a \rfloor ^2f(a)$$
