1. ## Integrability

Give an example of a function $\displaystyle f:\mathbb R \rightarrow \mathbb R$ such that $\displaystyle f$ is integrable but $\displaystyle f^2$ is not integrable. Prove your result.

Thanks

2. $\displaystyle f(x)=\left\{\left\begin{array}{ll}1 \ \mbox{if }x \in \mathbb{Q}\\-1 \ \mbox{otherwise.}\end{array}$

3. There is a problem with the OP.
There is a theorem (its proof is quite tedious): If $\displaystyle f$ is integrable on $\displaystyle [a,b]$ then $\displaystyle f^2$ is integrable on $\displaystyle [a,b]$.

In the OP the finite interval was not included. So I am not sure what is meant.

However, in the example given by Bruno J $\displaystyle f$ is not integrable but $\displaystyle f^2$ is integrable. The inverse of the OP.

4. This is the definition I know:

$\displaystyle f$ is integrable if $\displaystyle \int|f|< \infty$. Now in Bruno J's example I don't think either $\displaystyle f$ or $\displaystyle f^2$ are integrable since $\displaystyle |f|$and$\displaystyle |f^2|$ are both identically 1 and the integral is not finite.
With regards to Plato's post, well it tells us that we can't use a function integrable on [a,b] since then $\displaystyle f^2$ is going to be integrable. But any function defined on a subset of $\displaystyle \mathbb{R}$ should do. So still thinking.....

5. Originally Posted by Plato
There is a problem with the OP.
There is a theorem (its proof is quite tedious): If $\displaystyle f$ is integrable on $\displaystyle [a,b]$ then $\displaystyle f^2$ is integrable on $\displaystyle [a,b]$.

In the OP the finite interval was not included. So I am not sure what is meant.

However, in the example given by Bruno J $\displaystyle f$ is not integrable but $\displaystyle f^2$ is integrable. The inverse of the OP.
Oops!