# calculating a multivariate integral via level sets

I'm considering the possibility of calculating an integral of the form $\int_{S_n} f(x_1,\dots,x_n) dx_1\dots dx_n$ via level sets, where $S_n$ is the domain of integration. In my problem everything is real valued, and $f:R^n\to R$. Also, consider $f$ smooth, with no holes, etc.

Now, consider $g$ a real number that solves the equation $g=f(x_1,\dots,x_n)$, i.e., a level set. Then, I think one can write the relation $$\int_{S_n}f(x_1,\dots,x_n) dx_1\dots dx_n=\int g\rho(g)dg$$ where $\rho(g)dg$ is the density distribution of $g$, or roughly speaking the number of solutions of the level set equation for $g$. A simple example: consider calculating the volume of a half sphere (radius $r$) centered at $(a,a,0)$. Then, the integral on the left hand of the identity is $\int dx \int dy \sqrt{r^2-(x-a)^2-(y-a)^2}$, and the right hand is $\int dz 2\pi\sqrt{r^2-z^2}z$ where $g=z$ and $\rho(g=z)=2\pi\sqrt{r^2-z^2}$.

First, is this statement roughly correct? I suspect it's related to the coarea formula, but am not entirely sure as this is not my area of expertise. Does this result have a particular name?

Also, it seems to me that $\rho(g)$ would relate to the Jacobian (modulus) in some way, although I don't think it's just equal. Any ideas?

Finally, even if all of this is correct, in a concrete case it seems to me that unless $f$ is a very simple example, it is going to be difficult to make concrete calculations in most cases. However, I should still whether there are some techniques out there to deal with this analytically. Or should one consider numerical techniques?

Thanks

-
It's roughly correct, but you are right that it's usually very difficult to compute the new integral. Sometimes, when the domain of integration is at least partially bounded by level sets of $f$, the method can help. – mrf Jan 5 '13 at 17:32
@mrf By the way, is there a name for this result? I'm not entirely sure it's this coarea formula, although it seems clearly related. Also, $\rho(g)$ probably relates to a Jacobian or Hausdorff measure, I imagine. I've amended the question a bit to add these questions. – Ed Wolf Jan 5 '13 at 20:27
Small example added – Ed Wolf Jan 7 '13 at 11:50

Your example is the same as the "cylindrical shell method," of which your method is a generalization. In general, $\rho(g)$ will be equal to the $(n-1)$-dimensional content of the intersection of $S_n$ and the level set $f({\bf x}) = g$, that is, the integral of $1$ over the intersection.
As with most changes of variables, this technique would be helpful if it suited $f$ and $S_n$ particularly well -- for instance, if $\rho(g)$ is easy to find and $g\,\rho(g)$ easy to integrate. See also the comment to the original post by @mrf.
@ Michael E2 The problem I have is relatively complicated and the solutions $f(\boldsymbol{x})=g$ are difficult to obtain, but the multivariate integral is worse. Numerical analysis may shed insight as suggested by Hamming, but I may need divine inspiration to finish... Thank you – Ed Wolf Jan 8 '13 at 9:51