# Math Help - Integrable functions.

1. ## Integrable functions.

Hi,
I need to find a function f, which is not integrable in [0,1], but the function |f| is integrable in that interval [0,1].

2. Originally Posted by Boaz
Hi,
I need to find a function f, which is not integrable in [0,1], but the function |f| is integrable in that interval [0,1].
$f(x) = \left\{ {\begin{array}{rl} {1,} & {x \in \left[ {0,1} \right] \cap \mathbb{Q}} \\ { - 1,} & {x \in \left[ {0,1} \right]\backslash \mathbb{Q}} \\ \end{array} } \right.$

What can you do with that and why?

3. Originally Posted by Plato
$f(x) = \left\{ {\begin{array}{rl} {1,} & {x \in \left[ {0,1} \right] \cap \mathbb{Q}} \\ { - 1,} & {x \in \left[ {0,1} \right]\backslash \mathbb{Q}} \\ \end{array} } \right.$

What can you do with that and why?
Im not sure i understand why f isnt integrable..is it because the upper and the lower sums are very "far" from each other in every interval of the partition?

4. Originally Posted by Boaz
Im not sure i understand why f isnt integrable..is it because the upper and the lower sums are very "far" from each other in every interval of the partition?
Well, yes. That function is nowhere continuous.

5. Originally Posted by Plato
Well, yes. That function is nowhere continuous.
oh right, I forgot about that!
Thank you very much!