Ask Your Question

Revision history [back]

How am I able to take the gradient of a symbolic function twice?

I have introduced a Euclidean space using

E.<x,y,z> = EuclideanSpace()

then defined a symbolic function using

f(x,y) = x^2 + y^2

then I introduce the manifold library and take the gradient

from sage.manifolds.operators import *
grad(f)

which give me the expected result, however if I try to take the gradient again, I am met with an error:

'FreeModule_ambient_field_with_category.element_class' object has no attribute 'gradient'

I have no idea what this means. I am not very experience with mathematical spaces and fields and all that fun stuff yet, so I was wondering if someone could help me understand what this means and how to get around it.

Thanks!