1
$\begingroup$

I would like to expand a tensor expression of 3-d vectors. However, the code runs really slow, the problem is asked here: Why is TensorExpand so slow for vector operations?

However, I found that by assuming the 3-d vectors as real numbers, the code could be faster. For example, to expand $(a-b)\times c.d$:

$Assumptions = (a | b | c | d) \[Element] Reals;
TensorExpand[( a - b)\[Cross]c.d]

Instead of using $Assumptions = (a | b | c | d) \Vectors[3] I used Reals. It was really faster, except that the result was not perfect:

$$ a\times c.d+b (-1)\times c.d$$

I got a -1 here, which should be b.

Can we have some operations that could put the "b" in the correct place?

$\endgroup$

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.