# Prove $f(x)=\sum_{n=1}^\infty\frac{(-1)^n}{n}\chi_{[n-1,n)}(x)$ is not Lebesgue Integrable

How can I prove $$f(x)=\sum_{n=1}^\infty\dfrac{(-1)^n}{n}\chi_{[n-1,n)}(x)$$ is not Lebesgue Integrable?

$$\int_\mathbb{R}\left(\sum_{n=1}^{\infty}\frac{|(-1)^n|}{n}1_{[n-1,n)}(x)\right)d\mu=\sum_{n=1}^{\infty}\int_\mathbb{R}\frac{|(-1)^n|}{n}1_{[n-1,n)}(x)\hspace{0.25cm}d\mu$$

• math.stackexchange.com/questions/1095711/… – Yanko May 9 '20 at 15:28
• You’re basically done, now you can actually do the integral on the right hand side to find $\sum \frac 1 n$, and the fact that your function isn’t integrable is equivalent to the divergence of the harmonic series. Of course, you should rigorously justify the swapping of the sum and integral; what theorem allows you to do that? – User8128 May 9 '20 at 15:46