TITLE: If a function is integrable, then it is bounded
QUESTION [6 upvotes]: Probably a simple question, but I wonder about the following.
I know that if a function $f : \mathbb{R} \rightarrow \mathbb{R} $ is (Riemann)integrable, then it is bounded. I wonder if I can generalize this to functions on $\mathbb{R}^3$ (now for an ingral over a volume). 
It seemed logical to me that, because this theorem is true on $\mathbb{R}$, that it should be true on $\mathbb{R}^n$. But apparently it isn't, because the integral in theorem 10.1 of the document http://people.maths.ox.ac.uk/kirchhei/section_1008.pdf converges according to the theorem. The function under the integral is not bounded however. So can't I generalize the theorem that a integrable function should be bounded?

REPLY [5 votes]: For an unbounded smooth positive function whose improper Riemann integral exists, try the function $f$ defined by
$$
f(x)=\sum_{n\geqslant1}n\mathrm e^{-n^5(x-n)^2}.
$$
Note that
$$
\int_\mathbb Rf(x)\mathrm dx=\sum_{n\geqslant1}n\int_\mathbb R\mathrm e^{-n^5(x-n)^2}\mathrm dx=\sum_{n\geqslant1}\frac1{n^{3/2}}\int_\mathbb R\mathrm e^{-x^2}\mathrm dx,
$$
hence $f$ is integrable, while $f(n)\geqslant n$ for every $n$.