I often need to simplify expressions involving cross product and dot product, for example:
f = Dot[Cross[Cross[p1 - p, e1], Cross[p2 - p, e2]], Cross[p3 - p, e3]]
where the symbols in the RHS are all 3-dimensional vectors, but it's undesired to refer to their components, because it's rather difficult to find useful information from the results. This simplification is very often required in fields such as kinematics and dynamics, and I believe many people have encountered this problem, but my search didn't return very relevant results.
Is there some way to handle this type of simplification? A possible solution I think that may work is that we may define some customized operators or functions to represent the cross product and dot product, then define a set of rules for these operators (or for the Simplify
commend) to reflect the possible simplifications such as the mixed product expansion, etc. But I'm quite new to Mathematica, and don't know how to do this, and don't know if this is the best way, either.
Could someone help? Any answer with be greatly appreciated! Thanks!
Follow Up 1
Thanks to march, I found the command $Assumptions = {p1 [Element] Vectors[3, Reals]}
, which transforms the problem into a tensor problem. I tried this command for all the vectors, and the f
function does show the correct expression, but after that, Expand
, Simplification
, Collect
don't seem to work, only TensorExpand
and TensorReduce
work for these tensors. The expression seems kind of complicated, since Simplify
won't work now. So far I haven't found a way to handle this.
Still, I think the way of defining customized operators (or functions) or rules (in Simplify
) that can define those operations such as mixed product or double cross product may help. Does anyone have experience with this type of stuff? Thanks!
Follow Up 2
Thanks for all the replies! It would be great if some of you could help me implement a small piece of code to realize some of the relations below, and I will follow your strategy to finish the rest of code.
Basically I think there are two key operations that are relevant:
- the mixed-product,
Dot[Cross[a, b], c] = Dot[Cross[b, c], a] = Dot[Cross[c, a], b]
- the double cross-product:
Cross[Cross[a, b], c] = Dot[a, c] b - Dot[b, c] a
Besides, there are some basic relations, including:
Cross[a, b] = -Cross[b, a]
Dot[a, b] =Dot[b, a]
Cross[(a + b), c] = Cross[a, c] + Cross[b, c]
Dot[(a + b), c] = Dot[a, c] + Dot[b, c]
And the criteria are that there should be as few monomials as possible, and each monomial should be simple as well, just like what I will get after a series of Expand
, Collect
and Simplify
. I'm listing these relations which I guess are to be used as rules for the Simplify
command?
Thanks again for any help!
SymbolicTensors
tutorial. I haven't used it, so I can't say anything about it, but at least it's there to look at. $\endgroup$