Ask Your Question

Revision history [back]

When dealing with vector fields on an Euclidean space E, you should employ the method E.vector_field() and not the generic function vector(). Back to your example, this gives

sage: E = EuclideanSpace(3)
sage: Ecoords = E.cartesian_coordinates()
sage: Ecoords
Chart (E^3, (x, y, z))
sage: Ecoords[:]
(x, y, z)
sage: v = E.vector_field(Ecoords[:])
sage: v.display()
x e_x + y e_y + z e_z
sage: scalarfield = norm(v)
sage: scalarfield.display()
E^3 → ℝ
(x, y, z) ↦ sqrt(x^2 + y^2 + z^2)