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.Thu, 01 Oct 2020 09:52:15 +0200Evaluate a curl at a point?https://ask.sagemath.org/question/53665/evaluate-a-curl-at-a-point/I'm trying to create a curl example for my calc III students. I figured out how to compute the curl, but not how to evaluate it at a point. Can someone please advise? Thanks, Albert
from sage.manifolds.operators import *
E.<x,y,z> = EuclideanSpace()
v = E.vector_field(exp(x)*sin(y),-exp(x)*cos(y),0, name='v')
show(v.display())
curl_v = curl(v)
show(type(curl_v))
show(curl_v.display())Wed, 30 Sep 2020 18:46:55 +0200https://ask.sagemath.org/question/53665/evaluate-a-curl-at-a-point/Answer by rburing for <p>I'm trying to create a curl example for my calc III students. I figured out how to compute the curl, but not how to evaluate it at a point. Can someone please advise? Thanks, Albert</p>
<pre><code>from sage.manifolds.operators import *
E.<x,y,z> = EuclideanSpace()
v = E.vector_field(exp(x)*sin(y),-exp(x)*cos(y),0, name='v')
show(v.display())
curl_v = curl(v)
show(type(curl_v))
show(curl_v.display())
</code></pre>
https://ask.sagemath.org/question/53665/evaluate-a-curl-at-a-point/?answer=53666#post-id-53666It is shown on the bottom of the [reference manual page for vector fields](https://doc.sagemath.org/html/en/reference/manifolds/sage/manifolds/differentiable/vectorfield.html), using the [at](https://doc.sagemath.org/html/en/reference/manifolds/sage/manifolds/differentiable/tensorfield_paral.html#sage.manifolds.differentiable.tensorfield_paral.TensorFieldParal.at) method:
p = E((0,0,0), name='p')
show(curl_v.at(p).display())
$$\mathrm{curl}\left(v\right) = -2 e_{ z }$$
(For some reason, the point is not displayed in the notation. Not sure why this is. I would expect it as a subscript.)Wed, 30 Sep 2020 21:32:59 +0200https://ask.sagemath.org/question/53665/evaluate-a-curl-at-a-point/?answer=53666#post-id-53666Answer by UncountableSet for <p>I'm trying to create a curl example for my calc III students. I figured out how to compute the curl, but not how to evaluate it at a point. Can someone please advise? Thanks, Albert</p>
<pre><code>from sage.manifolds.operators import *
E.<x,y,z> = EuclideanSpace()
v = E.vector_field(exp(x)*sin(y),-exp(x)*cos(y),0, name='v')
show(v.display())
curl_v = curl(v)
show(type(curl_v))
show(curl_v.display())
</code></pre>
https://ask.sagemath.org/question/53665/evaluate-a-curl-at-a-point/?answer=53674#post-id-53674I was missing the `at()`. All of the vector calc stuff upto this point has been pretty easy, but these div and curl operators in sage are going to be really tough for the students. Much more complicated. I appreciate the help.
Wed, 30 Sep 2020 23:25:43 +0200https://ask.sagemath.org/question/53665/evaluate-a-curl-at-a-point/?answer=53674#post-id-53674Comment by eric_g for <p>I was missing the <code>at()</code>. All of the vector calc stuff upto this point has been pretty easy, but these div and curl operators in sage are going to be really tough for the students. Much more complicated. I appreciate the help.</p>
https://ask.sagemath.org/question/53665/evaluate-a-curl-at-a-point/?comment=53681#post-id-53681The method `at()` is presented in this [vector calculus tutorial](https://doc.sagemath.org/html/en/thematic_tutorials/vector_calculus/vector_calc_cartesian.html). The reason why you cannot just write `v(p)` is that the call operator `()` acting on a vector field is expecting a 1-form and returns the contraction with that 1-form (a scalar field).Thu, 01 Oct 2020 09:52:15 +0200https://ask.sagemath.org/question/53665/evaluate-a-curl-at-a-point/?comment=53681#post-id-53681