ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 16 Sep 2020 13:43:30 +0200integrate rational function over a polyhedral domainhttps://ask.sagemath.org/question/10288/integrate-rational-function-over-a-polyhedral-domain/Hi,
I would like to integrate (symbolically or numerically) a rational function on some polyhedral domain. As an example, my function would be:
sage: f(a,b,c) = 1/((a+b)^2 * c)
and my domain would be the unbounded polyhedron:
sage: I = [
....: [0,1,0,0], # a > 0
....: [0,0,1,0], # b > 0
....: [0,0,0,1], # c > 0
....: [-1,1,1,1], # a + b + c > 1
....: [1,-1,-1,0], # a + b < 1
....: [0,0,-1,1] # b < c
....: ]
sage: P = Polyhedron(ieqs=I)
Is it possible to do it in Sage? With some optional package? With some other software?
*(Note for suspicious minds: the integral is finite.)*Wed, 26 Jun 2013 12:55:08 +0200https://ask.sagemath.org/question/10288/integrate-rational-function-over-a-polyhedral-domain/Comment by slelievre for <p>Hi,</p>
<p>I would like to integrate (symbolically or numerically) a rational function on some polyhedral domain. As an example, my function would be:</p>
<pre><code>sage: f(a,b,c) = 1/((a+b)^2 * c)
</code></pre>
<p>and my domain would be the unbounded polyhedron:</p>
<pre><code>sage: I = [
....: [0,1,0,0], # a > 0
....: [0,0,1,0], # b > 0
....: [0,0,0,1], # c > 0
....: [-1,1,1,1], # a + b + c > 1
....: [1,-1,-1,0], # a + b < 1
....: [0,0,-1,1] # b < c
....: ]
sage: P = Polyhedron(ieqs=I)
</code></pre>
<p>Is it possible to do it in Sage? With some optional package? With some other software?</p>
<p><em>(Note for suspicious minds: the integral is finite.)</em></p>
https://ask.sagemath.org/question/10288/integrate-rational-function-over-a-polyhedral-domain/?comment=53448#post-id-53448Sage has something for polynomial functions (via the `latte_int` optional package), see
- [Ask Sage question 53419: Triple integrals in a specific region of space](https://ask.sagemath.org/question/53419)
but I'm not aware of something for more general rational functions.Mon, 14 Sep 2020 03:53:03 +0200https://ask.sagemath.org/question/10288/integrate-rational-function-over-a-polyhedral-domain/?comment=53448#post-id-53448Comment by vdelecroix for <p>Hi,</p>
<p>I would like to integrate (symbolically or numerically) a rational function on some polyhedral domain. As an example, my function would be:</p>
<pre><code>sage: f(a,b,c) = 1/((a+b)^2 * c)
</code></pre>
<p>and my domain would be the unbounded polyhedron:</p>
<pre><code>sage: I = [
....: [0,1,0,0], # a > 0
....: [0,0,1,0], # b > 0
....: [0,0,0,1], # c > 0
....: [-1,1,1,1], # a + b + c > 1
....: [1,-1,-1,0], # a + b < 1
....: [0,0,-1,1] # b < c
....: ]
sage: P = Polyhedron(ieqs=I)
</code></pre>
<p>Is it possible to do it in Sage? With some optional package? With some other software?</p>
<p><em>(Note for suspicious minds: the integral is finite.)</em></p>
https://ask.sagemath.org/question/10288/integrate-rational-function-over-a-polyhedral-domain/?comment=53467#post-id-53467The distinction between polynomial and rational function matters a lot: the integration of a polynomial over a polytope is a rational number (that can be computed exactly by `latte_int`). With rational function, the result is very often transcendental and could also be infinite.Wed, 16 Sep 2020 13:43:30 +0200https://ask.sagemath.org/question/10288/integrate-rational-function-over-a-polyhedral-domain/?comment=53467#post-id-53467