Cancelling integrals with smooth functions
Let \phi, \varphi be locally integrable in \RR^n and \mu a Radon measure. Suppose that for every \zeta \in C_c^{\infty}(\RR^n), it holds that
We claim \phi \stackrel{\circ}{=}\varphi. Indeed, let A = \{ \phi > \varphi \}. Since \varphi and \phi are measurable, A is measurable. Let A_N = A \cap B(N). Since \mu is Radon, there exists an increasing sequence of closed sets F_n \subseteq A_N and a decreasing sequence of open sets U_n \supseteq A_N (which we may suppose are bounded) such that \mu(U_n \setminus F_n) \to 0.
Using that \varphi and \phi are integrable on bounded sets and the dominated convergence theorem, for every \varepsilon > 0 there exists n_0 such that
From now on we shall call U = U_{n_0} and F = F_{n_0}. Using the existence of bump functions, we can take \zeta \in C^{\infty}, 0 \leq \zeta \le 1 such that \zeta|_F = 1 and \supp \zeta \subseteq U (since U is bounded, we have \zeta \in C^{\infty}_c indeed).
We know that
Since \lvert \zeta \rvert \le 1,
so
Since \phi - \varphi > 0 and \zeta = 1 inside F, by Markov’s inequality, for every \alpha > 0 \mu(\{ x \in F : (\phi - \varphi)(x) \ge \alpha \}) \le \frac{\varepsilon}{\alpha}. But \mu(A_N \setminus F) < \varepsilon, so
The set on the left does not depend on \varepsilon, thus for each fixed \alpha > 0, by letting \varepsilon \to 0,
Now it suffices to notice that
so \mu(A_N) = 0, which implies \mu(A) = 0. By using the same argument on B = \{ \varphi > \phi \}, we conclude \varphi \stackrel{\circ}{=} \phi.
Measurability is not enough
We shall now provide a counterexample to the case where \phi, \varphi are just measurable.
Let \{ r_i \}_{i \in \NN} a dense subset of \RR. Let
We know f is measurable, finite everywhere and not integrable on any interval around zero. Any function with such properties will do. Now let
Where (s_i) is any sequence such that \sum_{i = 1}^{\infty}s_i < \infty. Perhaps surprisingly, \phi will be finite almost everywhere. We show this using Borel-Cantelli: let’s call i-good sets the sets G_i = \{ x : s_i^2f(x - r_i) < s_i \} For a f with the properties we c picked, using the translation invariance of Lebesgue measure,
Since f is