I do not understand the proof of this expression. Who can explain it to me using simpler words?


I do not understand the following black part:

I do not understand the proof of this expression. Who can explain it to me using simpler words?


I do not understand the following black part:

Assume $X_1<X_2$. If $u<X_1$ and $u<X_2$ then $I(u,X_1)-I(u,X_2)=0$. If $u>X_1$ and $u<X_2$ then $I(u,X_2)-I(u,X_1)=1$. If $u>X_2$ and $u>X_1$ then $I(u,X_1)-I(u,X_2)=0$ again. Thus $$ \begin{align} \int_{-\infty}^\infty[I(u,X_1)-I(u,X_2)]du&=\int_{-\infty}^{X_1} 0du + \int_{X_1}^{X_2} 1 du +\int_{X_2}^\infty 0 du \\ &= \int^{X_2}_{X_1} 1 du \\ &= (X_2-X_1)\\ \end{align} $$ If $X_2<X_1$ then $$ \begin{align} \int_{-\infty}^\infty[I(u,X_1)-I(u,X_2)]du&=\int_{-\infty}^{X_2} 0du + \int_{X_2}^{X_1} -1 du +\int_{X_1}^\infty 0 du \\ &= \int^{X_1}_{X_2} -1 du \\ &= (X_2-X_1)\\ \end{align} $$