<s>[INST] Evaluating $\int_0^a \lfloor x^n \rfloor \,\mathrm{d}x$ 
Evaluate $\int_0^a \lfloor x^n \rfloor \,\mathrm{d}x$ (where $ \lfloor \,\cdot\, \rfloor $ denotes greatest integer function).

Can anyone please give a detailed explanation of how to do this? 
This is my first question on MathStack Exchange.
Thank You
 [/INST] For a given $a\geq0$ there should $\exists k \in \mathbb{N}: \color{red}{k}\leq a^{n}<\color{red}{k}+1$ (i.e. $k=\left \lfloor  a^n\right \rfloor$) then 
$$\int\limits_0^a \lfloor x^n \rfloor dx=
\int\limits_0^1 \lfloor x^n \rfloor dx+
\int\limits_1^{\sqrt[n]{2}} \lfloor x^n \rfloor dx+
\int\limits_{\sqrt[n]{2}}^{\sqrt[n]{3}} \lfloor x^n \rfloor dx+...+
\int\limits_{\sqrt[n]{\color{red}{k}}}^{a} \lfloor x^n \rfloor dx\tag{1}$$
and we have


*

*for $x\in[0,1) \Rightarrow x^n\in[0,1) \Rightarrow \lfloor x^n \rfloor=0 \Rightarrow \int\limits_0^1 \lfloor x^n \rfloor dx=0$

*for $x\in[1,\sqrt[n]{2}) \Rightarrow x^n\in[1,2) \Rightarrow \lfloor x^n \rfloor=1 \Rightarrow \int\limits_1^{\sqrt[n]{2}} \lfloor x^n \rfloor dx=\sqrt[n]{2}-1$

*for $x\in[\sqrt[n]{2},\sqrt[n]{3}) \Rightarrow x^n\in[2,3) \Rightarrow \lfloor x^n \rfloor=2 \Rightarrow \int\limits_{\sqrt[n]{2}}^{\sqrt[n]{3}} \lfloor x^n \rfloor dx=2\left(\sqrt[n]{3}-\sqrt[n]{2}\right)$

*...

*for $x\in[\sqrt[n]{t},\sqrt[n]{t+1}) \Rightarrow x^n\in[t,t+1) \Rightarrow \lfloor x^n \rfloor=t \Rightarrow \int\limits_{\sqrt[n]{t}}^{\sqrt[n]{t+1}} \lfloor x^n \rfloor dx=t\left(\sqrt[n]{t+1}-\sqrt[n]{t}\right)$

*...

*for $x\in[\sqrt[n]{\color{red}{k}},a) \Rightarrow x^n\in[\color{red}{k},a^n) \Rightarrow \lfloor x^n \rfloor=\color{red}{k} \Rightarrow \int\limits_{\sqrt[n]{\color{red}{k}}}^{a} \lfloor x^n \rfloor dx=\color{red}{k}\left(a-\sqrt[n]{\color{red}{k}}\right)$


then $(1)$ becomes 
$$\int\limits_0^a \lfloor x^n \rfloor dx=
\left(\sum\limits_{t=1}^{\color{red}{k}-1}t\left(\sqrt[n]{t+1}-\sqrt[n]{t}\right)\right) + \color{red}{k}\left(a-\sqrt[n]{\color{red}{k}}\right)$$
</s>