# Integrating the composition of a Heaviside function with a smooth function

I am trying to find how to compute an integral of the form: $$\int_{R^n}{\Theta(g(x))f(x)\,dx}$$, where $$\Theta$$ is the Heaviside function, $$g(x)$$ is a smooth function (a result for more general $$g$$ is also welcome) and you can assume that $$f(x)$$ is also smooth. For the Dirac delta (which is the derivative of $$\Theta$$) we have the relationship: $$\int_{R^n}{f(x)\delta(g(x))|\nabla g(x)|\,dx} = \int_{R^n}{f(x)\delta_S(x)\,dx} = \int_{S}{f(x)\,d\sigma(x)}$$ Where $$S = \{x|g(x) = 0, x \in R^n\}$$, and $$\sigma(x)$$ is the surface measure on $$S$$. Is there a similar relationship for the Heaviside function? Or any standard method that would help me compute integrals of that form. References on the subject are welcome, but keep in mind I am a computer science student (so my mathematical background is fairly limited).

Turns out there is no such relationship for the Heaviside step function (and it's not necessary). We can directly apply it to the integration domain. That is: $$\int_{R^n}{\Theta(g(x))f(x)\,dx} = \int_{\{x|g(x)\geq 0\}}{f(x)\,dx}$$