Integrating Over a Product of (Non-Separable) Piecewise Functions (Hyper-Solid Angle of a Convex Polyhedral Cone)

347 Views Asked by At

My problem is as follows: given a function $f:\mathbb{R}^n \rightarrow \mathbb{R}$ where $n$ is some integer of order 10 and $f$ is defined by a product of (non-separable) linear piecewise functions, find the surface area of the polytope projected on the unit $n-1$-sphere. That is, find the (hyper)solid angle of a convex polyhedral cone defined by $f$, which is itself defined by $f(\vec{x}) = 1$ inside a particular convex polyhedral cone, and $0$ elsewhere (generalizing the formulae to calculate the solid angle of a convex polyhedral cone is something I have not yet tried, but I imagine it is difficult). Thus, if I project $f$ onto the $n-1$ dimensional hypersphere and integrate over the surface of the hypersphere, I should get the value I desire. I could also integrate over the $n$-dimensional unit ball, divide by the volume of the $n$-dimensional unit ball, and multiply by the surface area of the $n-1$ dimensional hypersphere. This would give an equivalent solution because the convex cone is both right and centered at the origin.

My approach so far has been to calculate the volume of the intersection of the cone and the unit ball, if only because integrating directly over the hypersphere requires either a change of coordinates or a non-trivial substition, both of which complicate matters.

Unfortunately, I don't think I can abandon the function $f$ entirely and simply integrate $1$ over the appropriate regions, because the region is difficult to determine, even in the case of only three defining inequalities - changing to spherical coordinates ends up requiring integrating very nasty things.

How does one go about integrating a piecewise function that is not easily separable over either a ball or a sphere? Is there some straightforward way I am missing to integrate such functions, or am I stuck using numerics? I do have numerical results, and I even have an analytical result for this particular cone (using spherical geometry result), but for higher-dimensional cases, the function becomes very sparsely supported and numerics get more and more difficult.

1

There are 1 best solutions below

8
On

This is not an answer, but expands on a comment I made to the question. First, some background.

Let's assume function $f$ is a product of $k$ subfunctions $g$, in $n$ variables, $$f(x_1, x_2, \dots, x_n) = \prod_{i=1}^{k} g_i(x_1,\dots,x_n)$$ where each subfunction $g_i$ is $$g_i(x_1, x_2, \dots, x_n) = H \left ( c_{i,0} + \sum_{j=1}^{n} c_{i,j} x_j \right )$$ where $H(x)$ denotes the Heaviside step function, $$H(x) = \begin{cases} 0, & x \lt 0 \\ 1, & x \ge 0 \end{cases}$$ As to the notation, one could write $$f(x_1, x_2, \dots, x_n) = \prod_{i=1}^{k} H\left(c_{i,0} + \sum_{j=1}^{n} c_{i,j} x_j \right )$$


Let's consider subfunction $i$: $$g_i(x_1,\dots,x_n) = H\left(c_{i,0} + \sum_{j=1}^{n} c_{i,j} x_j \right)$$ If we assume an inequality evaluates to $1$ if true, and to $0$ if false, we can write the above as $$g_i(x_1,\dots,x_n) = \left( c_{i,0} + \sum_{j=1}^{n} c_{i,j} x_j \ge 0 \right)$$ If $c_{i,m} \gt 0$ for some $m$, $1 \le m \le n$, we can reorder the inequality to $$g_i(x_1,\dots,x_n) = \left( x_m \le \frac{c_{i,0} + \sum_{j=1,j\ne m}^{n} c_{i,j} x_j}{c_{i,m}} \right)$$ If $c_{i,m} \lt 0$, to $$g_i(x_1,\dots,x_n) = \left( x_m \ge \frac{c_{i,0} + \sum_{j=1,j\ne m}^{n} c_{i,j} x_j}{c_{i,m}} \right)$$

Now, if we intend to calculate some integral $$\int\dots\int_{R^n} f(x_1,\dots,x_n) dx_1 \dots dx_n$$ we can replace all subfunctions $g_i$ for which $c_{i,m} \ne 0$, with $1$, by changing the integration interval for $x_m$ from $[-\infty,\infty]$ to one or more ranges specified by the above inequalities. If there is more than one range for some $x_m$, the ranges must not overlap.

It might look like we could do that recursively to eliminate all subfunctions, but that may not be the case, since the limits for each integral can only refer to outer integrals' variables. This is what I called, offhand, as "dependency graph" in my comment.

Basically, if matrix $c_{i,j}$ can be made triangular by reordering rows and/or reodering columns, we can replace all subfunctions with 1 by setting the integration intervals. ($c_{i,j}$ is what I called, again very offhand, the "use matrix". Perhaps coefficient matrix would have been more appropriate; apologies.)


Note that I am not a mathematician; I only use math as a tool for finding solutions to whatever problems I encounter. So, the original comment, and this explanation of the comment, is just the approach I'd use in trying to find a solution for the original problem (too complex integrals to evaluate).

Also, I might be completely wrong and on the wrong track, too.

Perhaps mentioning Heaviside step function in the question might tickle the resident mathematicians enough to lend their brains to the problem at hand?