0

I am quite new to Wolfram language, and I am trying to use it to prove the equality $$ \nabla (A \cdot B) = A \times (\nabla \times B) + B \times (\nabla \times A) + (A \cdot \nabla)B + (B \cdot \nabla)A$$

Here are the variables I defined:

a = {Ax[x, y, z], Ay[x, y, z], Az[x, y, z]};
b = {Bx[x, y, z], By[x, y, z], Bz[x, y, z]};
del = Grad[#, {x, y, z}] &;

lhs = Grad[Dot[a, b], {x, y, z}];

rhs1 = Cross[a, Curl[b, {x, y, z}]]; rhs2 = Cross[b, Curl[a, {x, y, z}]]; rhs3 = Dot[a, del] b ; rhs4 = Dot[b, del] a;

rhsfinal = rhs1 + rhs2 + rhs3 + rhs4;

The problem I have is that I cannot get Dot[a,del]b to expand fully as in
$$(\vec A \cdot \nabla)\vec B =((\vec A \cdot \nabla)B_x,(\vec A \cdot \nabla)B_y,(\vec A\cdot \nabla)B_z)$$

In[404]:= rhs3

Out[404]= {Bx[x, y, z] {Ax[x, y, z], Ay[x, y, z], Az[x, y, z]} . (Grad[#1,{x, y, z}] &), By[x, y, z] {Ax[x, y, z], Ay[x, y, z], Az[x, y, z]} . (Grad[#1,{x, y, z}] &), Bz[x, y, z] {Ax[x, y, z], Ay[x, y, z], Az[x, y, z]} . (Grad[#1,{x, y, z}] &)}

Hence I cannot prove equality of the expression.

Domen
  • 23,608
  • 1
  • 27
  • 45
  • (⃗ ⋅∇) is really an abuse of notation and mathematical convenience. You can't dot a vector with an operator / function. Also you need to clean up your expression at the top. You have a $V$ where I think you meant $\nabla$, and what do you mean by $Ax$ and $Bx$ ? – flinty Jun 13 '23 at 09:37
  • Hi thanks for the catch, I updated $$ V \rightarrow \nabla $$ As for $$ (\vec{A} \cdot \nabla) $$ being an abuse of notation, i should interpret as $$ \vec{A} \cdot \nabla \vec{B} $$ – likely_fail_2202 T_T Jun 13 '23 at 09:42
  • ... in which case, this identity doesn't seem to be true if I'm interpreting $x$ as Cross as you've done in your code. Simply choose a = {-y,x,0}; b={1,0,0}; and it fails: FullSimplify[(Cross[a, Curl[b, {x, y, z}]] + Cross[b, Curl[a, {x, y, z}]] + a . Grad[b, {x, y, z}] + b . Grad[a, {x, y, z}]) == Grad[a . b, {x, y, z}]] – flinty Jun 13 '23 at 09:51
  • hmm this expression is definitely True... I will go try and edit my code thanks for the help! – likely_fail_2202 T_T Jun 13 '23 at 09:59
  • @flinty You can't dot a vector with an operator / function. Says who? Physicists do it routinely, and I’m fairly sure mathematicians do as well. $\hat n\cdot\nabla$ is just a directional derivative. – Ghoster Jun 14 '23 at 00:21
  • @Ghoster The dot is overloaded notation - when you're working with computers you need to be very precise, but in Maths and Physics by hand you can get away with it. In any case, Mathematica, and other CAS, will not let you do this. There are ResourceFunction["DirectionalDerivative"] and ResourceFunction["DirectionalD"] and it would be easy to define your own if you didn't want to use a ResourceFunction. – flinty Jun 14 '23 at 09:37
  • got it thanks all – likely_fail_2202 T_T Jun 21 '23 at 05:35

0 Answers0