Is there a simple way to simplify an expression in terms of vector operations?
For example, when I evaluate this;
v1 = {x1, y1, z1};
v2 = {x2, y2, z2};
v3 = {x3, y3, z3};
v4 = {x4, y4, z4};
Integrate[1, {x, y, z} \[Element] Tetrahedron[{v1, v2, v3, v4}]]
I get this horrible abomination;
1/6 Abs[x3 y2 z1 - x4 y2 z1 - x2 y3 z1 + x4 y3 z1 + x2 y4 z1 - x3 y4 z1 - x3 y1 z2 + x4 y1 z2 + x1 y3 z2 - x4 y3 z2 - x1 y4 z2 + x3 y4 z2 + x2 y1 z3 - x4 y1 z3 - x1 y2 z3 + x4 y2 z3 + x1 y4 z3 - x2 y4 z3 - x2 y1 z4 + x3 y1 z4 + x1 y2 z4 - x3 y2 z4 - x1 y3 z4 + x2 y3 z4]
However, this is simply the formula for the tetrahedron volume;
$$\frac16 \left| ( \vec{v}_2 - \vec{v}_1 ) \cdot ( ( \vec{v}_3 - \vec{v}_1 ) \times ( \vec{v}_4 - \vec{v}_1 ) ) \right|$$
Can Mathematica show the result I get in terms of vectors and vector operations?
There are other questions similar to this, but answers are some hacky manipualtions and not quite what I'm looking for.
Isn't there a simple, non-hacky, built-in way? There must be! C'mon Mathematica...
$Assumptions = (v1 | v2 | v3 | v4) \[Element] Vectors[dim, Reals], but you need a "vectorformulated Tetrahedron"! – Ulrich Neumann Jul 01 '19 at 14:01$Assumptions = (v1 | v2 | v3 | v4) \[Element] Vectors[3, Reals];Integrate[1, {x, y, z} \[Element] Tetrahedron[{v1, v2, v3, v4}]]However, I got this error:Integrate::ilim: Invalid integration variable or limit(s) in {x,y,z}\[Element]Tetrahedron[{v1,v2,v3,v4}].– Mahmut Akkuş Jul 01 '19 at 14:09Abs[(v2 - v1).((v3 - v1)\[Cross](v4 - v1))]/6, which is your desired answer, what do you get? Whenv1etc. are evaluated, they are replaced by their coordinate versions. SimilarlyDot[]andCross[]will expand in terms of given coordinates when their arguments are defined in terms of coordinates. Your desired result is like wanting2 * 3to remain factored instead of evaluating to6. -- BTW,Integrateis probably using the equivalent formulaAbs[Det[{v2 - v1, v3 - v1, v4 - v1}]]/6, which of course evaluates to the coordinate form – Michael E2 Jul 01 '19 at 16:04Simplifywon't replace vectors, it seems:Simplify[{-x1 + x4, -y1 + y4, -z1 + z4}, v4v1 == {-x1 + x4, -y1 + y4, -z1 + z4}]. Looks more and more like swimming upstream. – Michael E2 Jul 01 '19 at 16:22Simplify[]also helped on the way, to get final results in vector form. – Mahmut Akkuş Jul 01 '19 at 17:07