TITLE: Any Simple Example of Lebesgue Integration?
QUESTION [10 upvotes]: I saw several conceptual explanations regarding Lebesgue Integration, but can I see few practical examples that require Lebesgue Integration? What I need is just a toy case of Lebesgue Integration.  
For instance, how can I integrate $f(x)=x$ using Lebesgue Integration? I know it is $F(x)=\frac{1}{2}x^2$ since Riemann Integration is applicable, but do not know how to do this using Lebesgue Integration instead.  
Also can I apply Lebesgue Integration to compute moments of distributions? For example, can I compute $\mathrm{E}[X]=\lambda^{-1}$ for a random variable $X$ that follows the exponential distribution with $\lambda$?

REPLY [6 votes]: I think SpaceIsDarkGreen's answer is very good, but I'd like to reformulate one of his examples with a notation that physicists and engineers may relate to more easily. In any case, it made it much easier for me to write it this way so I hope it's useful to others. I'll also argue that the Lebesgue point of view can have a practical use even for integrals of continuous functions.
Consider the (Riemann) integral between $-1$ and $+1$ of the function $f(x) = x^2$:
$$
I = \int_{-1}^{1}dx\; f(x) = \int_{-1}^{1}dx\; x^2 = \left.\frac{x^3}{3}\right|_{-1}^{1} = \frac{2}{3}
$$
The Lebesgue integral calculates the same things with a very special change of integration variables. I'll write the Lebesgue integral this way:
$$
I = \int_{0}^{1} f\;d\mu(f)
$$
Basically we're doing what SpaceIsDarkGreen said. For each value of the function $f \in \left[0,1\right]$, we find the size $d\mu(f)$ of the integration domain that maps to the image $\left[f,f+df\right]$. Then we multiply $f$ by $d\mu(f)$ add up horizontal slices under the curve. To give a practical meaning to our Lebesgue integral, we now need to calculate the size $d\mu(f)$. For the integration region above, there are two points on the $x$ axis that map to the same value $f$, one at $+x$ and one at $-x$. For one of these points, the size of the domain that maps to $\left[f,f+df\right]$ is $\sqrt{f+df} - \sqrt{f}$. The function is symmetric so the total size of the domain mapping to $\left[f,f+df\right]$ is twice that:
$$
d\mu(f) = 2\times\left[\sqrt{f+df}-\sqrt{f}\right] \approx \frac{df}{\sqrt{f}}
$$
Here, I used the fact that $df$ is small. Putting this back into the Lebesgue integral above, we find that
$$
I = \int_{0}^{1} f\;\frac{df}{\sqrt{f}} = \int_{0}^{1} df\;\sqrt{f} = \left.\frac{2}{3}f^{3/2}\right|_{0}^{1} = \frac{2}{3}
$$
Of course, we get the same answer. But note that even though we didn't need the Lebesgue integral, we have a very practical result. We proved the following equality:
$$
I  = \int_{-1}^{1}dx\; x^2 = \int_{0}^{1} dx\;\sqrt{x} 
$$
and we proved that this equality is not accidental. Here it's a bit trivial, but it may sometimes be the case that even for nice continuous functions, the Lebesgue point of view could give integrals that are easier to solve.
Edit: I still want to emphasize the point made earlier though: this is not the main reason why Lebesgue integration is interesting. But I thought it was worth pointing out that it can give a new point of view on practical integration.