# Integral of a measurable not non negative function over N

I know that given a non-negative function $$f: \mathbb{N} \rightarrow \mathbb{R}$$, the integral over $$\mathbb{N}$$ with the counting measure is just the infinite sum.

However, given the funcion $$b(n) = \frac{(-1)^n}{n}$$, I found a problem. If you split the function in 2 in order to separate the positive part from the negative part, the sum of each part is divergent, but the sum of the funcion in itself without separating it is actually convergent.

In this case, can I just do the sum of this function, or it doesn't work if it isn't non negative? If it doesn't work, is it possible to calculate the integral? If so, how?

Thank you.

• The function $b(n)=\frac{(-1)^n}{n}$ is not Lebesgue-measurable ($\int |b(n)|d\mu(n)=+\infty$), so the integral doesn't exist – Andrzej Kukla Jan 16 at 12:34