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$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.