Is the converse of the following statement is true?
Let $f$ and $g$ be two bounded measurable functions on a set $E$. If $f(x)=g(x)$ a.e. on $E$ then $$\int_E f=\int_E g$$
Here is my proof for converse but my textbook says give an example that the converse statement does not hold.
Let $A_1=\{x|f(x)>g(x)\}$ and $A_2=\{x|f(x)<g(x)\}$
$A_1\cup A_2=\{x|f(x)\not=g(x)\}$
Suppose $m(A_1)>0, \,\,\, A_1=\bigcup_{n=1}^\infty E_n$
Therefore there exists $n, \,\,\, m(E_n)>0$
$E_n=\{x|f(x)-g(x)\geq\frac{1}{n}\} \,\,\,\, f-g$ is measurable therefore $E_n$ is measurable.
$ \int_{E_n}f-\int_{E_n}g=\int_{E_n}f-g\geq\frac{1}{n}mE_n>0\,\,\,$ contradiction.
Similarly if $m(A_2)>0$ we get a contradiction.
Why do you claim a contradiction in the last two lines? The hypothesis is that $$\int_E f = \int_E g$$ but it need not be the case that $$\int_{E_n} f = \int_{E_n} g$$ Consider, for example, $E = [0,2\pi]$, $f(x) = \cos(x)$, and $g(x) = \sin(x)$. Then $\int_E f = \int_E g = 0$ but, for example, $\int_0^\pi f \neq \int_0^\pi g$.