What's the name of this theorem? It happens very often in physics that we find relations like:
$$\int_V f(x) dx = \int_V g(x) dx$$
for an arbitrary volume $V$. From this we usually say "Since the volume is arbitrary, the integrands have to be equal" and we conclude $f(x) = g(x) $.
Funnily enough, this is often stated without even mentioning the name of the theorem that allows us to do so.
Intuitively, it's clear why is it so; but what's the theorem that formally allows us to do that?

This statement actually isn't true in general. Consider the following functions $f,g$ where $f$ is the zero function and we define $g(x) = 0$ for $x \neq 0$ and $g(0)=1.$ Clearly the two functions are not the same, however for any interval $[a,b],$
$$ \int_a^b f(x) \ dx = \int_a^b g(x) dx = 0. $$
Using a similar argument you can construct a counterexample in $\Bbb R^3.$
This statement is true however, if we assume that $f$ and $g$ are continuous. This is because if $f(x) \neq g(x),$ for some $x \in \Bbb R^3,$ then there is an open neighbourhood for which $f$ and $g$ are not equal (and by continuity one is always larger than the other). Integrating over this set gives a contradiction.
I don't know if this result has a name though and I wouldn't be surprised if it didn't. Important theorems are usually given a name as they are common referenced, but smaller results like these usually aren't given one.
Edit: Some conditions for $V$ may also be necessary. A sufficient condition (which my proof sketch uses) if $V$ to be open.
