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.Sat, 03 Apr 2021 20:34:41 +0200Evaluating a form field at a point on vectorshttps://ask.sagemath.org/question/56483/evaluating-a-form-field-at-a-point-on-vectors/I am having trouble matching up terminology in my textbook (Hubbard's *Vector Calculus*) against SageMath operators. I'd like to understand how to solve the following example problem with Sage:
> Let `phi = cos(x z) * dx /\ dy` be a 2-form on `R^3`. Evaluate it at the point `(1, 2, pi)` on the vectors `[1, 0, 1], [2, 2, 3]`.
The expected answer is:
```
cos (1 * pi) * Matrix([1, 2], [0, 2]).det() = -2
```
So far I have pieced together the following:
E.<x,y,z> = EuclideanSpace(3, 'E')
f = E.diff_form(2, 'f')
f[1, 2] = cos(x * z)
point = E((1,2,pi), name='point')
anchor = f.at(point)
v1 = vector([1, 0, 1])
v2 = vector([2, 2, 3])
show(anchor(v1, v2))
which fails with the error:
> `TypeError: the argument no. 1 must be a module element`
To construct a vector in `E`, I tried:
p1 = E(v1.list())
p2 = E(v2.list())
show(anchor(p1, p2))
but that fails with the same error. What's the right way to construct two vectors in `E`?ripple_carrySat, 03 Apr 2021 20:34:41 +0200https://ask.sagemath.org/question/56483/2 sets of coordinates in EuclideanSpace?https://ask.sagemath.org/question/55500/2-sets-of-coordinates-in-euclideanspace/Hello,
I would like to work with 2 vectors in EuclideanSpace each having x1,y1,z1 and x2,y2,z2 coordinates. I will be needing to switch back and forth between cartesian and spherical coordinates as well.
As an example, say, (r1,0,0) -> (x1,y1,z1) while (r2,0,0)->(x2,y2,z2) in the same EuclideanSpace.
How would one work with multiple vectors (with independent coordinates) in EuclideanSpace?
Should one define 2 chart for spherical coordinates and 2 for cartesian coordinates?
Or should one create 2 different EuclideanSpace and combine them (if possible)?
curios_mindFri, 29 Jan 2021 21:28:08 +0100https://ask.sagemath.org/question/55500/