# Lebesgue Integral of Simple Functions

I am mainly confused by the notation. An excerpt from Stein and Shakarchi.

"If $$E$$ is a measurable subset of $$\mathbb{R}^d$$ with finite measure, then $$\varphi(x)\chi_E(x)$$ is also a simple function, and we define

$$\int_E\varphi(x)\,dx=\int\varphi(x)\chi_E(x)\,dx.$$

To emphasize the choice of the Lebesgue measure $$m$$ in the definition of the integral, one sometimes writes

$$\int_{\mathbb{R}^d}\varphi(x)\,dm(x)."$$

My Question:

1. The Lebesgue measure partitions the $$range$$ of the function, so why are we still taking the integral with respect to $$x$$? Is this because we looking at the measurable set $$E$$, which are a collection of $$x$$ such that it falls into a particular partition in the range?

2. What does $$dm(x)$$ mean in the second statement. Are we integrating with respect to the measure? How are they equivalent?

Reference: Real Analysis: Measure Theory, Integration, and Hilbert Spaces. Elias M. Stein, Rami Shakarchi. Princeton University Press, 2009.

The choice of writing $$dx$$ in the first two integrals is unfortunate. It is a nearly universal convention that when you write $$dx$$ as the differential of an integral, you mean Riemann integration, and when you write $$dm$$ or $$d\mu$$ as the differential, you mean Lebesgue integration. So the answer to your first question is that we're not taking the integral with respect to $$x;$$ in context, your book is definitely talking about Lebesgue integration.

You are integrating with respect to the measure $$m$$ in the second statement. It's another unfortunate choice of notation: most authors would have written $$\int_{\mathbb{R}^d}\varphi(x)\,dm\quad\text{or}\quad \int_{\mathbb{R}^d}\varphi(x)\,d\mu$$ for the second integral, depending on whether they were talking about the Lebesgue measure, or a more general measure.

There is a theorem that says if a function $$f$$ is Riemann integrable, then the Riemann integral over a region is equal to the Lebesgue integral over the same region. And that only makes sense. Counting up your area in two different ways shouldn't give you two different results!