A barycentric coordinate system assigns to a point in the affine span of the vertices of a nondegenerate simplex its unique vertex weights , constrained to sum to one. Uniqueness follows because form a basis of the translation space: expand in that basis and set . A point lies in the closed simplex exactly when every weight is nonnegative. An affine function satisfies , which makes these coordinates useful for interpolation and the integral of an affine function over a simplex.
The divergence is
For the tetrahedral domain, convenient integration bounds are
Consequently its volume integral is
Putting , the inner integral is . Therefore
Thus
There is an independent centroid check. The vertices are , giving volume and centroid . An affine function averages to its value at the centroid, so . This is the integral of an affine function over a simplex.