# 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 \begin{equation} \int_{S_n}f(x_1,\dots,x_n) dx_1\dots dx_n=\int g\rho(g)dg \end{equation} 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 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 at 20:27
Small example added – Ed Wolf Jan 7 at 11:50

## 1 Answer

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.

If a numerical answer is all your after, then numerical techniques are probably sufficient and faster. But if you're interested in theoretical purposes or to get formulas for particular integrals, then numerical approximation won't help much, except perhaps to shed some light in a dark corner, after Hamming's dictum, "the purpose of computing is insight...."

-

@ 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 at 9:51
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 29, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 5, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9465477466583252, "perplexity_flag": "head"}