Do Riemann and Lebesgue integrals always agree? I know that on a closed bounded interval, say $[a,b]$ in $R^1$, if a function is Riemann integral, then it is Lebesgue integrable, and the values of those two integrals are the same.
But, is this true in general??
If $A$ is some set in $\mathbb{R}^n$, and if $f$ is Riemann integrable on $A$, then is it true that $f$ is also Lebesgue integrable and the value of this integral is the same as that of Riemann integral?
It seems that it should be true when $A$ is bounded, but what happens when $A$ is unbounded, for example, if $A = \mathbb{R}^n$?
 A: If $A$ is unbounded, the Lebesgue integral may not exist even though the improper Riemann integral does. For example, consider $A = [0, \infty)$ and
$$f(x) = \frac{(-1)^{\lfloor x\rfloor}}{1+\left\lfloor\frac{x}{2}\right\rfloor} = \begin{cases}
\dfrac{1}{n+1} & 2n \leq x < 2n + 1\\
\dfrac{-1}{n+1} & 2n + 1 \leq x < 2n + 2.
\end{cases}$$
Then $\int_0^{\infty}f(x)dx$ exists (and is equal to zero), while the Lebesgue integral doesn't exist because 
$$\int_{[0,\infty)}f^+ dm = \int_{[0,\infty)}f^- dm = \sum_{n=0}^{\infty}\frac{1}{n+1} = \infty.$$
A: Not going into technical details note the following: in the definition of Riemann integrable function (say on $\mathbb{R}$) you don't assume anything about the integral of modulus of this function. So it could happen that the function $f$ is oscillating in such a way that improper integral $\int_{-\infty}^{\infty}f(x)dx$ is finite but the integral $\int_{-\infty}^{\infty}|f(x)|dx$ is infinite. But if $f$ is Lebesgue integrable one assumes that $f$ is absolutely convergent. So one can produce examples of functions which are Riemann integrable but are not Lebesgue integrable. Note also that the same thing could happen (for improper integrals) if you take bounded set: for example you could take $f:[0,1] \to \mathbb{R}$ which becomes unbounded when $x \to 1^{-}$ in such a way that the "amount" of positive and negative values is the roughly the same.  
Let me also mention one more thing: if you consider the set of all Riemann integrable (in improper sense) functions then it wouldn behave much worse than the set of all Lebesgue integrable functions. You can't apply all the machinery of functional analysis to the space of Riemann integrable functions. Thats why it is better to do analysis on Lebesgue integrable functions,
