integratePolynomialOnSimplex {qspray} | R Documentation |
Returns the exact value of the integral of a multivariate polynomial with rational coefficients over a simplex whose vertices have rational coordinates.
integratePolynomialOnSimplex(P, S)
P |
a |
S |
the simplex, a |
A bigq
number, the exact value of the integral.
library(qspray)
x <- qlone(1); y <- qlone(2)
P <- x/2 + x*y
S <- rbind(c("0", "0"), c("1", "0"), c("1", "1")) # a triangle
integratePolynomialOnSimplex(P, S)