Lebesgue measure in $\mathbb{R}^2$

lebesgue-measuremeasure-theoryreal-analysis

Let $f : \mathbb{R} \to \mathbb{R}^+$ be a positive, Lebesgue measurable function.
Denote the set $A := \{(x,y)\in \mathbb{R}^2 | 0 < y < f(x)\}$ .
Show that $A$ is Lebesgue measurable and that and $$\int_\mathbb{R}f(x)dx = m_2(A)$$

where $m_2$ denotes the two-dimensional Lebesgue measure.

I tried to show that $A$ is Lebesgue measurable (idk if it is right)but have no clue for the second part.

My attempt:

$\textbf{Edit}$ : This is my second attempt but have not been verified yet:

we can write that there exists a rational $r$ that $f(x)-y >r>0$ so $f(x)>r+y>0$

$$A = \{(x,y)\in \mathbb{R}^2 | f(x) – y>0 \} = \bigcup_{r\in\mathbb{Q} \\ r >0} \bigg[ \bigg( \{(x,y)\in\mathbb{R}^2 | f(x)>r\}\times \mathbb{R}\bigg)\bigcap \bigg( \{(x,y)\in\mathbb{R}^2 | y>-r\}\times \mathbb{R}\bigg) \bigg]$$


Edit : Below is my first attempt which from the comment I found that it is wrong. but I kept it here.

we can write for a fixed $y$

$$A = \{(x,y)\in \mathbb{R}^2 | f(x)>y>0 \} = \bigcup_{n=1}^\infty \{(x,y)\in \mathbb{R}^2 | f(x)> y-\frac{1}{n}>0 \} = \bigcup_{n=1}^\infty f^{-1}\big((y-\frac{1}{n},\infty)\big)\times \mathbb{R}^+$$

so $A$ is Lebesgue Measurable.

Best Answer

For the second part:

$m(A)=\int_{R}\int_R1_{\{(x,y):f(x)>y>0\}}dydx$

$1_A(x,y)=1$ iff $f(x)>y>0$ iff $y \in (0,f(x))$ iff $1_{(0,f(x))}(y)=1$

So $$m(A)=\int_R\int_R1_{(0,f(x))}(y)dydx=\int_R \int_0^{f(x)}1dydx=\int_R f(x)dx$$