## integrating indicator functions [closed]

i am trying to understand something about Cauchy sequences in $L^2$, why is $\int_0^\infty \frac{1}{x^2}|1_{[n,n+1]}-1_{[m,m+1]}|^2\;dx=\int_n^{n+1}\frac{1}{x^2}dx+\int_m^{m+1}\frac{1}{x^2}dx$, where $1_A(x)$ is the indicator function.

there seems that there is a identity about subtracting indicator functions.

-
You just have to develop the term $(1_{[n,n+1]}-1_{[m,m+1]})^2=1_{[n,n+1]}+1_{[m,m+1]}-2.1_{[n,n+1]\cap [m,m+1]}$. The formula you wrote can be deduced directly from this ($n\neq m$ of course) – Henri May 15 2010 at 21:14
Alternate approach. Why "develop" this? The expression $|1_{[n,n+1]}-1_{[m,m+1]}|^2$ has only value $0$ or $1$, so of course you integrate on the set where it is $1$. – Gerald Edgar May 15 2010 at 21:31