I was doing the question $$\int_{-2}^{1} \{x\} dx =\frac{3}{2}$$ which got me wondering for the general expression and after few trials i got to the expression for $$\int_{a}^{b} \{nx\} dx = \left(\frac{[nb]-[na]}{2n}\right) + \left(\frac{\{(nb)^2\}-\{(na)^2\}}{2}\right) {n}\neq{0}$$ using graph of the function and Reimann summation can me making the proof a little more formal the derivation goes as: if $\{nb\}=0$ $$\int_{0}^{b} \{nx\} dx = \left(\sum_{x=0}^{\frac{1}{n}}nx +\sum_{\frac{1}{n}}^{\frac{2}{n}} ..... \sum_{x=\frac{nb-1}{n}}^{b} \right) \Delta{x} $$ and $$\sum_{\frac{k}{n}}^{\frac{k+1}{n}} {nx} - [nx]=0.5 $$ then $$\int_{0}^{b} \{nx\} dx = \frac{b}{2}$$ and if $\{nb\}\neq{0}$ $$\int_{0}^{b} = \int_{0}^{\frac{[nb]}{n}} \{nx\} dx + \int_{\frac{[nb]}{n}}^{b} \{nx\} = \frac{[nb]}{2n} + \frac{(\{nb\})^2}{2} $$ now using the properties of definite integral we can use the formula given above any
and i checked for ${a},{b}$ and ${n}$ as integers where the results hold and but i don't know for non-integers number