How to decide whether Lebesgue integral or Riemann integral?

Solution 1:

Whichever one exists. When both Riemann and Lebesgue integrals exist, they give the same value so it doesn't matter.

What you're asking is akin to "when someone write $-5$ should I interpret this as the real number $-5$ or the complex number $-5+0i$?". It's really the same thing, unless you have a specific reason to use one number over the other. For example if you want to say $0>-5$ then you're discussing real numbers. If you want to say $\sqrt{-5}$ then you're discussing complex numbers. Riemann/Lebesgue integration is the same way. Want to use the fundamental theorem of calculus? Then use Riemann integration. Want to use Lebesgue's dominated convergence? Then use Lebesgue.

Solution 2:

If it's understood the Lebesgue integral is being taken with respect to the Lebesgue measure, then if the Riemann integral is defined for a function (which is exactly when the set of points on which the function is discontinuous has Lebesgue measure $0$), it will agree with the Lebesgue integral wrt Lebesgue measure. So unless a particular measure is alluded to, you should use whichever integral you please when the Riemann exists (you could theoretically come up with a function where the Lebesgue is easier to calculate, though I couldn't name one off the top of my head), while noting that a "nice" function will typically have a Riemann integral; and use Lebesgue wrt Lebesgue measure when it exists. Note that when an author wants you to think Lebesgue, she may likely make explicit that integration is occurring over a set, e.g. $\int_{[a, b]}$ instead of $\int_{a}^{b}$.

When an author wants you to Lebesgue-integrate with respect to a measure that is not Lebesgue measure (often denoted λ), they will typically note the measure they want in the differential. The most common notation is $\int_{E} f \mathrm{d} \mu$, where $\mu$ is our measure, but you may also see $\int_{E} f(x) \mathrm{d} \mu$ or $\int_{E} f(x) \mathrm{d} \mu (x)$, depending on the author. In these cases though, it should be evident what measure you're (Lebesgue-)integrating wrt.

Solution 3:

One interesting fact which I have come across in formalization of mathematics: As has been mentioned, the Riemann and Lebesgue integrals coincide when they are both defined, and the Lebesgue integral has a number of nice properties not shared by the Riemann integral (see this nice article on the difference: "Should we fly in the Lebesgue-designed airplane?"). However, most of the basic properties of Lebesgue measure and integration rely on the axiom of countable choice (to prove that the countable union of measurable sets is measurable), while the Riemann integral relies only on basic order properties of the real numbers, so for reverse mathematics it is preferable to avoid Lebesgue integration when possible.

In many cases, the Riemann integral applies, or alternatively one can use derivatives instead (that is, just posit the antiderivative if it can be given in a closed form, and show that it has the right derivative). This doesn't work for the Gamma function, though, or other special functions for which the integral itself is the definition. But the Gamma function is continuous (even analytic), so you can also use Riemann integrals or termwise power series integration to show that a function with the right derivative exists.