# Gradient, Divergence, Curl and vector products

Are there implementations of vector product and the nabla operator yet? I can't find anything.

Gradient, Divergence, Curl and vector products

asked **
2013-10-21 05:40:22 -0500
**

Anonymous

Are there implementations of vector product and the nabla operator yet? I can't find anything.

add a comment

3

Sorry for the update - believe it or not, after *years* this was finally implemented (as a method, not function) in Trac 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
```

1

I 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/hom...

Asked: **
2013-10-21 05:40:22 -0500
**

Seen: **3,848 times**

Last updated: **Nov 19 '15**

how to run maxima code in Sage?

Define vector valued function of a vector of symbolic variables?

Replace all numbers < e-n by 0

Given a direction vector and a point, how to draw a 3d line?

interact PB on W10 notebook SageMath 8.7

Checking what the span is for a vector

Yet another linear combination

What's the vector equivalent to Pythons list addition? `[1,2]+[3,4]=[1,2,3,4]`

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.