Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

When we deal with the vector product problem, we usually should define some fixed form for the vector product. For instance, I define it in this way,

   R[x1_] Rp[x2_] := RRp[x1, x2];
   R[x1_] R[x2_] := If[x1==x2,R[x1]^2, RR[x1, x2]]; 
   Rp[x1_] Rp[x2_] := If[x1==x2,Rp[x1]^2,RpRp[x1, x2]];

Here, R[] and Rp[] are vectors. In some simple cases, it works. For example,

   (R[1] - Rp[3])^2 // Expand
   =R[1]^2 + Rp[3]^2 - 2 RRp[1, 3]

However, in the following case, something is wrong.

   (R[1] - Rp[3])^3 // Expand
  =R[1]^3 - 3 R[1]^2 Rp[3] + 3 R[1] Rp[3]^2 - Rp[3]^3  

The expected result is

  R[1]^3-R[1]^2Rp[3]+R[1]Rp[3]^2-Rp[3]^3-2 R[1]RRp[1, 3] +2 Rp[3]RRp[1, 3]

So, how to find a simple way to fixed the vector product in the complicated expand form ?

share|improve this question
What kind of a vector product do you need? If Cross perhaps this question will be helpful. –  Artes Mar 21 '14 at 12:58
You defined new rules for Times but not for Power. –  m_goldberg Mar 21 '14 at 17:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.