# Proving that the Lebesgue integral over a measurable function $f$ is equal to the area/volume below the graph of $f$

Given a Borel set $A \subseteq \mathbb{R}^d, d ≥ 1$ and a measurable function $f: A \to [0, \infty)$, I want to consider the set:

$$E = \{(x, y) \in \mathbb{R}^{d+1}: x \in A, 0 ≤ y ≤ f(x)\} \subseteq \mathbb{R}^{d+1}$$

I first want to show that $E$ is a Borel set. Then, I want to prove that

$$\lambda_{d+1}(E) = \int_A f(x) d \lambda_d(x)$$

where $\lambda_d$ is the $d$-dimensional Lebesgue measure.

I unfortunately wasn't even successful showing that $E$ is a Borel set so far. I first thought that one could write $E$ as the product of two Borel sets ($E = A \times \text{another Borel set}$), but I then realized that it isn't that simple, seeing as the $y$ in a vector $(x, y) \in E$ is dependent on $x$. Maybe one could construct a clever measurable function that sends $E$ onto a measurable set in $\mathbb{R}$ or something like that? I'm not really all that sure though.

Once established that $E$ is measurable, wouldn't the second part follow more or less right from Fubini's theorem?

Also, I think the intuition behind this excercice is to acknowledge that, in case $d = 1$, the Lebesgue integral of $f$ over $A$ is nothing but the area inbetween the graph of $f$ and the $x$-axis; for $d = 2$, it's the volume, and so on. I'm not really sure how that helps me (formally) showing it.

(I will assume that $f$ is Borel measurable, and extend $f$ to all of $\Bbb R^d$ by setting $f(x)=-1$ for $x\in A^c$.) Think of $E$ as the inverse image $g^{-1}([0,\infty))$, where $g:\Bbb R^d\times[0,\infty)\to\Bbb R$ is defined by $g(x,y)=f(x)-y$. Then $g$ is the composition of the $\mathcal B^d\otimes\mathcal B_+/\mathcal B^2$ map $(x,y)\to (f(x),y)$ with the continuous map $\Bbb R^2\ni(u,v)\to u-v\in\Bbb R$. It follows that $g$ is $\mathcal B^d\otimes\mathcal B_+/\mathcal B$-measurable, hence $E\in \mathcal B^d\otimes\mathcal B_+$.
Similar considerations apply if $f$ is Lebesgue measurable.