TITLE: Calculation of $ \int_{0}^{\sqrt{n}}\lfloor t^2 \rfloor dt\;$, where $n\in \mathbb{N}$ and $\lfloor x \rfloor = $ floor function of $x$.
QUESTION [5 upvotes]: Calculation of $\displaystyle \int_{0}^{\sqrt{n}}\lfloor t^2 \rfloor dt\;$, where $n\in \mathbb{N}$ and $\lfloor x \rfloor = $ floor function of $x$.
$\bf{My\; Try}::$ Let $t^2 = u$ and $\displaystyle dt = \frac{du}{2\sqrt{u}}$ and changing Limits, we get $\displaystyle \frac{1}{2}\int_{0}^{n}\frac{\lfloor u \rfloor }{\sqrt{u}}du$
Now Let 
$\displaystyle I = \int_{0}^{n}\lfloor u \rfloor \cdot u^{-\frac{1}{2}}du = \int_{0}^{1}0\cdot u^{-\frac{1}{2}}du+\int_{1}^{2}1\cdot u^{-\frac{1}{2}}du+\int_{2}^{3}2\cdot u^{-\frac{1}{2}}du+.........+\int_{n-2}^{n-1}(n-2)\cdot u^{-\frac{1}{2}}du+\int_{n-1}^{n}(n-1)\cdot u^{-\frac{1}{2}}du$
$\displaystyle =-2\left\{1\cdot \left(\sqrt{2}-1\right)+2\cdot \left(\sqrt{3}-\sqrt{2}\right)+3\cdot \left(\sqrt{4}-\sqrt{3}\right)+.......+(n-2)\cdot \left(\sqrt{n-1}-\sqrt{n-2}\right)+(n-1)\cdot \left(\sqrt{n}-\sqrt{n-1}\right)\right\}$
Now how can i calculate given sum in closed form
please Help me
Thanks

REPLY [2 votes]: Actually I think is way simpler... The floor function is a step function, possibly the simplest kind to integrate. Note that
$$
  \lfloor t^2 \rfloor
~=~
  k
\quad\text{whenever}\quad
  t\in \big[\,\sqrt k,\,\sqrt{k+1}\,\big)
~\text{and}~k\in\mathbb Z
$$
As you are integrating between $0$ and $\sqrt n$, such integers $k$ range from $0$ to $n-1$.
Graphically, the function is constantly equal to the integer $k$ in the interval $[\sqrt k,\,\sqrt{k+1})$. Therefore, the contribution of this interval to the whole integral is $(\sqrt{k+1}-\sqrt k)\cdot k$.
You can sum all the steps yielding
$$
  \int_0^{\sqrt n}
  \lfloor t^2\rfloor{\rm d}t
~=~
  \sum_{k=0}^{n-1}
  (\sqrt{k+1}-\sqrt k)\cdot k
$$
I strongly doubt a close form exists, but it can be worked in something simpler. Adding and substracting $\sum_{k=0}^{n-1}\sqrt{k+1}$,
\begin{align}
  \sum_{k=0}^{n-1}
  (\sqrt{k+1}-\sqrt k)\cdot k
~=~&
  \sum_{k=0}^{n-1}
  (k+1)\sqrt{k+1}
-
  \sum_{k=0}^{n-1}
  \sqrt k\cdot k
-
  \sum_{k=0}^{n-1}
  \sqrt{k+1}
\\
~=~&
  n\sqrt n
-
  \sum_{k=0}^{n-1}
  \sqrt{k+1}
~=~
  (n-1)\sqrt n
-
  \sum_{k=1}^{n-1}
  \sqrt k
\end{align}
To sum up,
$$
  \int_0^{\sqrt n}
  \lfloor t^2\rfloor{\rm d}t
~=~
  (n-1)\sqrt n
-
  \sum_{k=1}^{n-1}
  \sqrt k
~=~
  \sum_{k=1}^{n-1}
  \big(
    \sqrt n-\sqrt k
  \big)
$$