0
$\begingroup$

This is related to Simplifying cross product expressions

Consider the following:

F2[R + 2 a] = F2[R] + 2 a D[F2[R], R]
F3[R + 3 a] = F3[R] + 3 a D[F3[R], R]
F[R + 4 a] = F[R] + 4 a D[F4[R], R]

FullSimplify[TensorExpand[Cross[F3[R + 3 a], F[R + 4 a] - F2[R + 2 a]]]]

(*=> F[R]\[Cross]F3[R] - 3 F[R]\[Cross](a Derivative[1][F3][R]) + 
 F2[R]\[Cross]F3[R] + 3 F2[R]\[Cross](a Derivative[1][F3][R]) - 
 2 F3[R]\[Cross](a Derivative[1][F2][R]) + 
 4 F3[R]\[Cross](a Derivative[1][F4][R]) + 
 6 (a Derivative[1][F2][R])\[Cross](a Derivative[1][F3][R]) + 
 12 (a Derivative[1][F3][R])\[Cross](a Derivative[1][F4][R])

a is scalar, but Mathematica doesn't know it, so it isn't moved outside the cross product.

I tried

FullSimplify[TensorExpand[Cross[F3[R + 3 a], F[R + 4 a] - F2[R + 2 a]]], 
 Assumptions -> {F[R], F2[R], F3[R], D[F[R], R], D[F3[R], R], D[F2[R], R]} \[Epsilon] Vectors[3]]

but the result is the same. How can I specifically declare that a is a scalar?

$\endgroup$
2
  • 1
    $\begingroup$ I don't think it'll necessarily fix it, but note that \[Epsilon] is not the same as \[Element]! $\endgroup$
    – thorimur
    Apr 16, 2021 at 19:57
  • 1
    $\begingroup$ Note that {F[R], F2[R], F3[R], D[F[R], R], D[F3[R], R], D[F2[R], R]} \[Element] Vectors[3]] does not express what you think it expresses; it says that the single vector {F[R], F2[R], F3[R], D[F[R], R], D[F3[R], R], D[F2[R], R]} is in Vectors[3] and thus evaluates to False. Rather, you need a way of saying they're all in Vectors[3], e.g. # \[Element] Vectors[3] & /@ {F[R], F2[R], F3[R], D[F[R], R], D[F3[R], R], D[F2[R], R]}. But for this application, all that's needed is information on a. $\endgroup$
    – thorimur
    Apr 16, 2021 at 20:07

1 Answer 1

2
$\begingroup$

Note that you can give assumptions to TensorExpand:

TensorExpand[Cross[F3[R + 3 a], F[R + 4 a] - F2[R + 2 a]], 
 Assumptions -> {a \[Element] Reals}]
(* Out: 

-F[R]\[Cross]F3[R] - 3 a F[R]\[Cross]Derivative[1][F3][R] + 
 F2[R]\[Cross]F3[R] + 3 a F2[R]\[Cross]Derivative[1][F3][R] - 
 2 a F3[R]\[Cross]Derivative[1][F2][R] + 
 4 a F3[R]\[Cross]Derivative[1][F4][R] + 
 6 a^2 Derivative[1][F2][R]\[Cross]Derivative[1][F3][R] + 
 12 a^2 Derivative[1][F3][R]\[Cross]Derivative[1][F4][R]

*)

(You could also use a \[Element] Complexes or even a \[Element Integers, if you wanted!)

$\endgroup$
1
  • $\begingroup$ thanks for the comments and the answer $\endgroup$
    – geom
    Apr 16, 2021 at 21:00

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.