integratePolynomialOnSimplex {qspray}R Documentation

Integral of a multivariate polynomial over a simplex

Description

Returns the exact value of the integral of a multivariate polynomial with rational coefficients over a simplex whose vertices have rational coordinates.

Usage

integratePolynomialOnSimplex(P, S)

Arguments

P

a qspray object

S

the simplex, a (n+1)xn matrix such that each entry of the matrix as.character(S) is a quoted integer or a quoted fraction

Value

A bigq number, the exact value of the integral.

Examples

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)

[Package qspray version 3.1.0 Index]