Is it neccessary to split the integral? I want to evaluate this integral: $$I_a=\int_a^{a+1}\left\{x\right\}(1-\left\{x\right\})dx$$ where $\left\{x\right\}$ is the fractional part.

Is it neccessary to split the integral?

Here is all my steps:


*

*let $\left\{x\right\}=\omega\Rightarrow\begin{align}\\&\left\{a\right\}=0\\&\left\{a+1\right\}=1\end{align}$


Therefore we'll obtain: $I_a=\int_a^{a+1}\left\{x\right\}(1-\left\{x\right\})=\int_0^1 (\omega - \omega^2)dx=\frac{1}{6}$ 


*

*Observe that $(I_a)'=f(a+1)-f(a)=0$ and I don't think there is neccessary to split the integral



If it is, I want an example when it create problem and we need to split integral.

 A: If $a \in \Bbb Z$, then things are simple. Assume $a \notin \Bbb Z$. For simplicity, assume $a>0$ (the reasoning is similar for $a < 0$). Note that $\{x\} = \{x-[a]\}$. The point in the following is to extract the integration variable from inside the fractional part; once we do this, the rest will be simple integration. Make the substitution $y=x-a$. Then
$$I_a = \int \limits _0 ^1 \{y+a\} (1 - \{ y+a \}) \Bbb d y = \int \limits _0 ^1 \{y+a -[a]\} (1 - \{ y+a-[a] \}) \Bbb d y = \int \limits _0 ^1 \Big\{ y+ \{a\} \Big\} (1 - \Big\{ y+\{a\} \Big\}) \Bbb d y = \int \limits _0 ^{1-\{a\}} \Big\{ y+ \{a\} \Big\} (1 - \Big\{ y+\{a\} \Big\}) \Bbb d y + \int \limits _{1-\{a\}} ^1 \Big\{ y+ \{a\} \Big\} (1 - \Big\{ y+\{a\} \Big\}) \Bbb d y .$$
In the first integral, $y+\{a\} \in [0,1)$ so it is equal to its own fractional part. In the second, $y+\{a\} \in [1,2)$, so $\Big\{ y+\{a\} \Big\} = y+\{a\} - 1$, therefore you get
$$I_a = \int \limits _0 ^{1-\{a\}} (y+ \{a\}) \Big(1 - (y+\{a\})\Big) \Bbb d y + \int \limits _{1-\{a\}} ^1 \Big( y+ \{a\} -1 \Big) \Big(1 - ( y+\{a\} -1)\Big) \Bbb d y .$$
You could now do the integrals but, for the sake of beauty, in the second integral make the change $y=z+1$:
$$I_a = \int \limits _0 ^{1-\{a\}} (y+ \{a\}) \Big(1 - (y+\{a\})\Big) \Bbb d y + \int \limits _{-\{a\}} ^{1-\{a\}} (z+ \{a\}) \Big(1 - (z+\{a\})\Big) \Bbb d z = \int \limits _{-\{a\}} ^{1-\{a\}} (y+ \{a\}) \Big(1 - (y+\{a\})\Big) \Bbb d y .$$
Finally, make the change $y+\{a\} = x$, and get
$$I_a = \int _0 ^1 x(1-x) \mathbb d x = \frac 1 6 .$$
A: Actually you can use this way to do instead of using substitution. Suppose $a$ is not an integer and $[a]=n-1$. Then $n-1<a<n<a+1$ and $[a,a+1]=[a,n)\cup(n,a+1]\cup\{n\}$. Note that, 
$$ \{x\}=x-n+1, \forall x\in[a,n) $$
and 
$$ \{x\}=x-n, \forall x\in(n,a+1] $$
and hence
\begin{eqnarray*}
\int_a^{a+1}\{x\}(1-\{x\})dx&=&\int_a^{n}\{x\}(1-\{x\})dx+\int_n^{a+1}\{x\}(1-\{x\})dx \\
&=&\int_a^{n}(x-n+1)(n-x)dx+\int_n^{a+1}(x-n)(1+n-x)dx \\
&=&\frac16.
\end{eqnarray*}
