# Showing that a function is Lebesgue integrable (or not)

How would I go about showing that the function $f(x) = \left\{ \begin{array}{lr} &1 & : x \in [n,n+1) & :n\quad \text{even}\\ &-1 & : x \in [n,n+1) & :n\quad \text{ odd} \end{array} \right.$ defined on $E=\mathbb{R}$ is Lebesgue integrable or not?

My first idea is to use the definition of the Lebesgue integral of a simple function since I have that $f$ only assumes $1$ and $-1$.

Let $f$ be a simple function with the canonical representation $f=\sum\limits^n_{k=1}c_k\chi_{E_k}.$

The Lebesgue integral of $f$ on $E$ is $\int_E f=\sum\limits^n_{k=1}c_km(E_k).$

But I ran into trouble in defining the $E_k$'s. I know that they should be measurable and disjoint as well as their union must be equal to $E=\mathbb{R}$. I have this intuition that if I take say $[0,1),[1,2),[2,3),[3,4),...$ all of these intervals are measurable and disjoint and their union is $\mathbb{R}$. I have that $f$ will assume the value $1$ on $E_1$ where $E_1$ is the union of all intervals $[n,n+1)$ where $n$ is even. On the other hand $f$ will take the value $-1$ on $E_2$ where $E_2$ is the union of all intervals $[n,n+1)$ where $n$ is odd. I'm not sure how to represent $E_1$ and $E_2$. Here is a try. If I let $n=2k$ when $n$ is even and $n=2k+1$ when $n$ is odd I will have:

$$E_1=\bigcup\limits_{k=0}^\infty [2k,2k+1)$$ $$E_2=\bigcup\limits_{k=0}^\infty [2k+1,2k+2)$$

But the representations above only covers the positive numbers. How do I write the intervals $...[-3,-2),[-2,-1),[-1,0)$?

The measure of any interval $[2k,2k+1)$ or $[2k+1),2k+2)$ is $1$. Since there are infinitely many $k$ I will have $m(E_1)=\infty$ and $m(E_2)=\infty$ also. So I would have like an $\infty-\infty$? But my intuition tells me that for every interval $[2k,2k+1)$ there is an interval $[2k+1),2k+2)$ so things should evenly cancel out and I will be left with zero. Which is finite so $f$ is integrable.

Here is another idea. What if I consider $f^+=max(f,0)$ and $f^-=-min(f,0)$?

A measurable function $f$ is said to be integrable over $E$ if $f^+$ and $f^-$ are both integrable over $E$. In this case we define $\int_E f = \int_E f^+ -\int_E f^-$.

Then if I can show that $f^+$ and $f^-$ are both integrable then so is $f$. Now if $f=1$, $f^+=1$ and $f^-=0$ and if $f=-1$, $f^+=0$ and $f^-=1$. So I have that $f^+$ and $f^-$ assumes the value $0$ or $1$ only. Intuitively I think that $\int_E f^+=\infty$ which makes it not integrable and thus $f$ is not integrable also.

Which approach is correct? Any ideas?

Any help or suggestion will be greatly appreciated. Thank you!

Your idea of covering $\mathbb{R}$ with intervals of the form $[n,n+1)$ is spot-on. You're right that your attempt at doing so leaves out the negative numbers, but that is easily fixed. Just let the indices in your big unions range over $\mathbb{Z}$ instead of $\mathbb{N}$, like this \begin{eqnarray} E_1 &=& \bigcup_{k\in\mathbb{Z}} [2k, 2k+1) \text{,}\\ E_2 &=& \bigcup_{k\in\mathbb{Z}} [2k+1, 2k+2) \text{.} \end{eqnarray}

Your function $f$, as you correctly observed, is then simply $$f(x) = \chi_{E_1}(x) - \chi_{E_2}(x) \text{.}$$

Now, the definition of the lesbegue integral splits a function into it's positive and negative parts, i.e. splits $f$ into $f^+$ and $f^-$ such that \begin{eqnarray} f^+(x) &\geq& 0 &\quad \text{for all $x$,} \\ f^-(x) &\geq& 0 &\quad \text{for all $x$,} \\ f^+(x) = 0 \,\text{or}\, f^-(x) &=& 0 &\quad \text{for all $x$,}\\ f(x) &=& f^+(x) - f^-(x) &\quad \text{for all $x$.} \end{eqnarray} and it defines the integral of $f$ as $$\int f = \int f^+ - \int f^-$$

You are correct that in your case, that gives $\infty - \infty$. And that simply means that your function is not lebesgue integrable over $\mathbb{R}$!. Lebesgue integrals do not allow infinite positive areas to cancel out infinite negative areas! In fact, this is one of the properties that make it possible for lebesgue integrals to obey much stronger convergence theorems than riemann integrals, because such a cancellation would intrinsically depend on the order of summation.

For example, say your function was instead defined to be $$f(x) = \begin{cases} -1 &\text{if x < 0} \\ 1 &\text{if x \geq 0.} \end{cases}$$ That function simply re-arranges the positive and negative areas differently, yet orders of summation that would yield a finite result for your original $f$ would not yield a finite result here.

• So in a way both of my approach are correct? Because I can also characterize the $f^+$ as a simple function and then use the same $E_1$ and $E_2$ where $f$ is $1$ and $-1$ respectively but in the case of $f^+$ I will have that $f^+$ is $1$ in $E_1$ and $0$ in $E_2$. So in the end I will have that the integral of $f^+$ is $1.m(E_1)+0.m(E_2)=\infty$ which makes it not integrable so $f$ is not also. Commented Feb 27, 2014 at 15:04
• Thank you for taking time to reply. I understand how to solve the problem now. Thanks again. Commented Feb 27, 2014 at 15:05
• @chowching Yes, mostly. Be carefull however with calling $f^+$ not integrable. Sometimes, infinite values of integrals are allowed, so $f^+$ would be integrable, but have integral $\infty$. Similarly, $f^-$ would be integrable, and also have integral $\infty$. But $f$ itself would never be called integrable, because even if you allow $\infty$ as a possible result of integration, $f$ still hasn't got a well-defined integral.
– fgp
Commented Feb 27, 2014 at 15:18
• @chowching Compare this to how infinite sums as handled. People will write $\sum_{i=0}^\infty 1 = \infty$, even though technically speaking the sum does not converge - it diverges to $\infty$. But $\sum_{i=0}^\infty (-1)^i = \infty$ just plain diverges, and nobody would say that it's equal to $\infty$, $-\infty$, or anything else.
– fgp
Commented Feb 27, 2014 at 15:21

For your notation concern, you can write it like this: $$E_1 = \bigcup_{k \in \mathbb{Z}} [2k, 2k+1) = \bigcup_{k=-\infty}^\infty [2k, 2k+1).$$

Concerning the Lebesgue integrability, I think the argument that you give holds.

• Thank you! What I have in mind is to use $\bigcup\limits_{k=-\infty}^0[2k,2k+1)$ for the negative part but looking at it now using $\bigcup_{k\in\mathbb{Z}}$ or $\bigcup\limits_{k=-\infty}^{\infty}$ looks nicer. Commented Feb 27, 2014 at 15:11