2
$\begingroup$

Suppose I want to calculate:

Cross[A1 + B1, A2 - B2] + Cross[A1 - B1, A2 + B2]

which is equal to 2 A1xA2 - 2 B1xB2

Using FullSimpify won't do it. I can use Distribute

Distribute[Cross[A1 + B1, A2 - B2]] + Distribute[Cross[A1 - B1, A2 + B2]]
(* which gives: 2 A1xA2 + A1x(-B2) + A1xB2 + (-B1)xA2 + (-B1)xB2 + B1xA2 + B1x(-B2) *)

Close but it still keeps the - into parentheses, keeping terms that cancel each other. How can I overcome this?

$\endgroup$
2
  • 1
    $\begingroup$ TensorExpand[Cross[A1+B1,A2-B2]+Cross[A1-B1,A2+B2]] $\endgroup$ – chyanog Apr 11 at 9:58
  • $\begingroup$ Please post it as an answer. I wasn't aware of TensorExpand, thanks $\endgroup$ – geom Apr 11 at 10:05
5
$\begingroup$

TensorExpand[Cross[A1+B1,A2-B2]+Cross[A1-B1,A2+B2]] gives

2 A1×A2 - 2 B1×B2

$\endgroup$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.