ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 20 Nov 2015 03:14:41 +0100Gradient, Divergence, Curl and vector productshttps://ask.sagemath.org/question/10104/gradient-divergence-curl-and-vector-products/Are there implementations of vector product and the nabla operator yet? I can't find anything.Mon, 21 Oct 2013 12:40:22 +0200https://ask.sagemath.org/question/10104/gradient-divergence-curl-and-vector-products/Answer by kcrisman for <p>Are there implementations of vector product and the nabla operator yet? I can't find anything.</p>
https://ask.sagemath.org/question/10104/gradient-divergence-curl-and-vector-products/?answer=30916#post-id-30916Sorry for the update - believe it or not, after *years* this was finally implemented (as a method, not function) [in Trac 3021](http://trac.sagemath.org/ticket/3021).
sage: var('y z')
(y, z)
sage: V = vector([x^2*y, z, 3*y^2])sage: V.curl([x,y,z]) # necessary since otherwise why should x be first?
(6*y - 1, 0, -x^2)
sage: V.div() # same reason
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<snip>
ValueError: Unable to determine ordered variable names for Symbolic Ring
sage: V.div([x,y,z])
2*x*y
Fri, 20 Nov 2015 03:14:41 +0100https://ask.sagemath.org/question/10104/gradient-divergence-curl-and-vector-products/?answer=30916#post-id-30916Answer by Shashank for <p>Are there implementations of vector product and the nabla operator yet? I can't find anything.</p>
https://ask.sagemath.org/question/10104/gradient-divergence-curl-and-vector-products/?answer=15580#post-id-15580I don't think sage has a curl and divergence defined, but it is very easy to implement them.
Have a look at http://sage.math.canterbury.ac.nz/home/pub/133/Mon, 21 Oct 2013 13:24:57 +0200https://ask.sagemath.org/question/10104/gradient-divergence-curl-and-vector-products/?answer=15580#post-id-15580Comment by Ki for <p>I don't think sage has a curl and divergence defined, but it is very easy to implement them. </p>
<p>Have a look at <a href="http://sage.math.canterbury.ac.nz/home/pub/133/">http://sage.math.canterbury.ac.nz/hom...</a></p>
https://ask.sagemath.org/question/10104/gradient-divergence-curl-and-vector-products/?comment=16894#post-id-16894I'm kind of disappointed now, since they are very easy to implement and are really important when working with vectors. I don't really want to define it myself every time I need it.Tue, 22 Oct 2013 01:33:11 +0200https://ask.sagemath.org/question/10104/gradient-divergence-curl-and-vector-products/?comment=16894#post-id-16894