# Question #e30bc

Feb 17, 2017

${\int}_{0}^{x} \left[t\right] \mathrm{dt} = \frac{\left[x\right] \left(2 x - \left[x\right] - 1\right)}{2}$ for $x > 0$

#### Explanation:

Define the function as:

$\left[x\right] = n$ for $n \le x < \left(n + 1\right)$

The function is continuous almost everywhere, that is in all $\mathbb{R} - \mathbb{Z}$

Consider $x > 0$ and $\left[x\right] = N$, its integral can be calculated as:

${\int}_{0}^{x} \left[t\right] \mathrm{dt} = {\int}_{0}^{1} 0 \cdot \mathrm{dt} + {\int}_{1}^{2} 1 \cdot \mathrm{dt} + \ldots + {\int}_{N - 1}^{N} \left(N - 1\right) \mathrm{dt} + {\int}_{N}^{x} N \mathrm{dt}$

${\int}_{0}^{x} \left[t\right] \mathrm{dt} = 1 + 2 + \ldots + \left(N - 1\right) + N \left(x - N\right)$

${\int}_{0}^{x} \left[t\right] \mathrm{dt} = \frac{N \left(N - 1\right)}{2} + N x - {N}^{2}$

${\int}_{0}^{x} \left[t\right] \mathrm{dt} = \frac{{N}^{2} - N + 2 N x - 2 {N}^{2}}{2}$

${\int}_{0}^{x} \left[t\right] \mathrm{dt} = \frac{N \left(2 x - 1\right) - {N}^{2}}{2}$

${\int}_{0}^{x} \left[t\right] \mathrm{dt} = \frac{N \left(2 x - N - 1\right)}{2}$

Consider $x < 0$ and $\left[x\right] = - N$, its integral can be calculated as:

${\int}_{0}^{x} \left[t\right] \mathrm{dt} = - {\int}_{x}^{- N} \left(- N - 1\right) \cdot \mathrm{dt} - {\int}_{- N}^{- N + 1} - N \cdot \mathrm{dt} + \ldots - {\int}_{- 1}^{0} \left(- 1\right) \mathrm{dt}$

${\int}_{0}^{x} \left[t\right] \mathrm{dt} = 1 + 2 + \ldots + N + \left(N + 1\right) \left(x - N\right)$

${\int}_{0}^{x} \left[t\right] \mathrm{dt} = \frac{N \left(N + 1\right)}{2} + N x - {N}^{2} + x - N$

${\int}_{0}^{x} \left[t\right] \mathrm{dt} = \frac{{N}^{2} + N + 2 N x - 2 {N}^{2} + 2 x - 2 N}{2}$

${\int}_{0}^{x} \left[t\right] \mathrm{dt} = \frac{N \left(2 x - 1\right) - {N}^{2} + 2 x}{2}$

${\int}_{0}^{x} \left[t\right] \mathrm{dt} = x + \frac{N \left(2 x - N - 1\right)}{2}$