Let's consider the continuous function $$ f:\mathbb{R}^n\to \mathbb{R} $$ Is it true that if $$\int_C fdx=0$$ for every compact set $C$ then the function is $f\equiv 0$?
I would say it is true, but I wouldn't know how to prove it. Any hint would be appreciated
Yes, it is true. Suppose otherwise. More precisely, suppose that $f(y)>0$ for some $y\in\Bbb R^n$. So, since $f$ is continuous, for some $r>0$ we have $f(x)>\frac{f(y)}2$ for every $x\in\overline{D_r(y)}$. Therefore,$$\int_{\overline{D_r(y)}}f\geqslant\frac{f(y)}2\operatorname{vol}\left(\overline{D_r(y)}\right)>0,$$which is impossible, since $\overline{D_r(y)}$ is compact.
The case in which $f(y)<0$ is similar.