How do I use sage to check differential vector identities? Do I need to create an operator?
Hi!
I would like to check some differential vector identities. Any suggestion to achieve this goal would be welcomed.
Example of a case I already worked out: $\vec{\nabla} (fg) = (\vec{\nabla}f) g + f (\vec{\nabla} g)$.
Code (I coudn't manage to put it on a single box, sorry):
from sage.manifolds.operators import *
E.<x,y,z> = EuclideanSpace()
f = function('f')(x,y,z)
g = function('g')(x,y,z)
sff = E.scalar_field(sff, name = 'sff')
sfg = E.scalar_field(sfg, name = 'sfg')
sffg = E.scalar_field(sffg, name = 'sffg')
grad(sffg) == grad(sff) * sfg + sff * grad(sfg)
Out: True
Example of what I want to check: $ \vec{\nabla} (\vec{A}\centerdot \vec{B}) = \vec{A}\times(\vec{\nabla} \times \vec{B}) + \vec{B} \times (\vec{\nabla} \times \vec{A}) + (\vec{A} \centerdot \vec{\nabla}) \vec{B} + (\vec{B} \centerdot \vec{\nabla}) \vec{A}. $ I don't know how to came to differential operators of the form $(\vec{A} \centerdot \vec{\nabla})$.
I tried (kind of hopelessly)
newOperator=A.dot(grad())
without success.
How could I put sage to check identities like this one?
Thank you in advance.