# How t show $f=g$ almost everywhere

How to show $f=g$ almost everywhere

Let two real-valued measurable functions $f$ and $g$ be such that for any measurable set $E$ the integrals $\int_E f\,d\mu$ and $\int_E g\,d\mu$ coincide.

It seems obvious. we could define the integrals as charges. can we do sth from here. but I do not know how to approach.

If $f = g$ a.e. does not hold, then one of the sets

$$A_n := \{x \in X \mid f(x) \geq g(x) + 1/n\}$$

or

$$B_n := \{x \in X \mid g(x) \geq f(x) + 1/n\}$$

has positive measure (why?).

Now assume that $X$ is $\sigma$-finite (or semifinite, otherwise the statement is in general wrong).

Then there exists a subset $E \subset A_n$ or $E \subset B_n$ of positive, finite(!) measure (why?).

Conclude that $\int_E f \, d\mu \neq \int_E g \, d\mu$.

EDIT: As observed in the comments, it is not that easy to show that $\int_E f \,d\mu \neq \int_E g \, d\mu$ if one does not know that the two integrals are actually finite. But to ensure this, we can modify the sets $A_n,B_n$ to

$$A_n ' = A_n \cap \{x \mid |f(x)|+|g(x)|\leq n\}$$ (similar for $B_n '$) and then use the proof as described above.

• So you say $\mu( \lbrace x\in X :|f(x)-g(x)|>1/n\rbrace)>\epsilon_0$ for some $\epsilon_0>0$ since they are not equal. Then we can find a measurable(!) set $E\subset \lbrace x\in X :|f(x)-g(x)|>1/n\rbrace)$ which has a finite positive measure $M$. Then $\int_E |f-g|d\mu \geq M.(1/n)$ Am I right? May 20 '14 at 16:49
• Essentially yes. But I split your set $\{x \in X \,|\, |f(x) - g(x)| > 1/n\}$ in the two different sets $A_n$, $B_n$, because you only know that $\int_E f d\mu = \int_E g d\mu$ and not that $\int_E |f-g| d\mu = 0$ (in that case the proof would be easier). Assume that $E \subset A_n$ has positive measure (this implicitely entails measurability). Then $\int_E f d\mu \geq \int_E g d\mu + \mu(E)/n > \int_E g d\mu$, contradiction. May 20 '14 at 16:53
• Can we directly say that $A_n$ has a positve measured subset(of course as you said it would imply measurabilty)? I don't think we can assume that directly. May 20 '14 at 16:58
• No, you can't. Thats why your claim is wrong in general. Consider e.g. $X = \{1\}$ with measure $\mu({1}) = \infty$ (fill in the details) and $f \equiv 1$, $g \equiv 2$. Then for $E \subset X$ we either have $E = \emptyset$, so $\int_E f = 0 = \int_E g$ or $E = \{1\}$, in which case both integrals equal $\infty$. But NOT $f = g$ a.e. Thus, we assume that $X$ is semi-finite (see also here math.stackexchange.com/questions/234898/… ). May 20 '14 at 17:01
• I changed \,|\, to \mid, which I take to be standard usage. May 20 '14 at 17:27