I am following the answer of Jens from following post: How do I simplify a vector expression?
vec /: Cross[vec[x_], HoldPattern[Cross[y__]]] :=
I want to create following identities (I use x to represent \[Cross] for readability):
vec[a]x(vec[b] x vec[c]) = (vec[a] x vec[b]) x vec[c] - (vec[a] x vec[c]) x vec[b]
(vec[a] x vec[b]) x vec[c] = vec[a] x (vec[b] x vec[c]) + (vec[a] x vec[c]) x vec[b]
but unable to make. I tried the following command Map[Cross[Cross[vec[x], #], #] &, Plus[y]] but in product it gives
vec[a]x(vec[b] x vec[c]) = (vec[a] x vec[b]) x vec[b] - (vec[a] x vec[c]) x vec[c]
Thanks in advance.
x-character and expect that to be the operator for cross product. – Sascha Jan 30 '16 at 13:39xwas causing confusion. I think it's fine the way it is, but one thing to keep in mind is that people using the site usually have M running and can copy and paste ugly code into the front end to see it formatted nicely and have the syntax checked. The question is whether having the desired code with proper syntax is helpful to those who are interested in your question. It might seem so to some, I suppose. – Michael E2 Jan 30 '16 at 13:52