Let $S$ be the tetrahedron in $\mathbb{R}^3$ having vertices $(0,0,0), (1,2,3), (0,1,2)$, and $(-1, 1, 1)$. Evaluate $\int_{S}f$, where $f(x,y,z)=x+2y-z$. [Hint: Use a suitable linear transformation $g$ as a change of variables.]
This question has already been posted here Integral of $f(x,y,z)=x+2y+z$ over a tetrahedron. but I do not understand the answer they give. I would like to be able to visualize the tetrahedron and know how it is. What is the appropriate variable change that I should make? Thank you very much.
Let $g$ be the linear map with matrix $$G:=\left[\matrix{1&0&-1\cr 2&1&1\cr 3&2&1\cr}\right]\ .$$ Since it has the three nonzero vertices of $S$ as columns it maps the standard basis $(e_1,e_2,e_3)$ of ${\mathbb R}^3$ to the three vectors spanning $S$ from the vertex $O=(0,0,0)$. The map $$g:\qquad \left[\matrix{x_1\cr x_2\cr x_3}\right]\quad\mapsto \quad\left[\matrix{x\cr y\cr z}\right]=G\left[\matrix{x_1\cr x_2\cr x_3}\right]=\left[\matrix{1&0&-1\cr 2&1&1\cr 3&2&1\cr}\right]\left[\matrix{x_1\cr x_2\cr x_3}\right]$$ then maps the standard simplex $$S_{\rm st}:=\{(x_1,x_2,x_3)\,|\, x_i\geq 0 \ (1\leq i\leq 3), \ x_1+x_2+x_3\leq1\}$$ bijectively onto $S$. One computes ${\rm det}(G)=-2$. We therefore obtain $$Q:=\int_S f(x,y,z)\>{\rm d}(x,y,z)=\int_{S_{\rm st}}\hat f(x_1,x_2,x_3)\cdot2\>{\rm d}(x_1,x_2,x_3)$$ (note that the formula for the change of variables involves the absolute value of the Jacobian), whereby $\hat f$ denotes the pullback $$\eqalign{\hat f(x_1,x_2,x_3)&=f\bigl(g(x_1,x_2,x_3)\bigl)=(x_1-x_3)+2(2x_1+x_2+x_3)-(3x_1+2x_2+x_3)\cr &=2x_1\ .\cr}$$ It follows that $$Q=4\int_{S_{\rm st}} x_1\>{\rm d}(x_1,x_2,x_3)=4\int_0^1 x_1\int_0^{1-x_1}\int_0^{1-x_1-x_2}dx_3\>dx_2\>dx_1=\ldots={1\over6}\ .$$