Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
""" Vectors over callable symbolic rings
AUTHOR: -- Jason Grout (2010)
EXAMPLES::
sage: f(r, theta, z) = (r*cos(theta), r*sin(theta), z) sage: f.parent() Vector space of dimension 3 over Callable function ring with arguments (r, theta, z) sage: f (r, theta, z) |--> (r*cos(theta), r*sin(theta), z) sage: f[0] (r, theta, z) |--> r*cos(theta) sage: f+f (r, theta, z) |--> (2*r*cos(theta), 2*r*sin(theta), 2*z) sage: 3*f (r, theta, z) |--> (3*r*cos(theta), 3*r*sin(theta), 3*z) sage: f*f # dot product (r, theta, z) |--> r^2*cos(theta)^2 + r^2*sin(theta)^2 + z^2 sage: f.diff()(0,1,2) # the matrix derivative [cos(1) 0 0] [sin(1) 0 0] [ 0 0 1]
TESTS::
sage: f(u,v,w) = (2*u+v,u-w,w^2+u) sage: loads(dumps(f)) == f True
"""
#***************************************************************************** # Copyright (C) 2010 Jason Grout <jason-sage@creativetrax.com> # # Distributed under the terms of the GNU General Public License (GPL) # # This code is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # The full text of the GPL is available at: # # http://www.gnu.org/licenses/ #*****************************************************************************
""" Returns the string representation of the vector
EXAMPLES::
sage: f(u,v,w) = (2*u+v,u-w,w^2+u) sage: f (u, v, w) |--> (2*u + v, u - w, w^2 + u) sage: r(t) = (cos(t), sin(t)) sage: r t |--> (cos(t), sin(t)) """ else:
""" Returns the latex representation of the vector
EXAMPLES::
sage: f(u,v,w) = (2*u+v,u-w,w^2+u) sage: f (u, v, w) |--> (2*u + v, u - w, w^2 + u) sage: latex(f) \left( u, v, w \right) \ {\mapsto} \ \left(2 \, u + v,\,u - w,\,w^{2} + u\right) sage: r(t) = (cos(t), sin(t)) sage: r t |--> (cos(t), sin(t)) sage: latex(r) t \ {\mapsto}\ \left(\cos\left(t\right),\,\sin\left(t\right)\right) """ else: |