Contact Us!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

| Download
Project: Lifshitz BH
Views: 222
%typeset_mode True M = Manifold(2, 'M') X.<x,y> = M.chart()
g = M.riemannian_metric('g') g[0,0], g[1,1] = 1,1 g.display()
g=dxdx+dydy\displaystyle g = \mathrm{d} x\otimes \mathrm{d} x+\mathrm{d} y\otimes \mathrm{d} y
R.<t> = RealLine() c = M.curve([2*cos(t), sin(t)], (t, 0, 2*pi), name='c') print c
Curve c in the 2-dimensional differentiable manifold M
c.display()
c:(0,2π)Mt(x,y)=(2cos(t),sin(t))\displaystyle \begin{array}{llcl} c:& \left( 0 , 2 \, \pi \right) & \longrightarrow & M \\ & t & \longmapsto & \left(x, y\right) = \left(2 \, \cos\left(t\right), \sin\left(t\right)\right) \end{array}
c.plot()
v = c.tangent_vector_field() print v v.display()
Vector field c' along the Real interval (0, 2*pi) with values on the 2-dimensional differentiable manifold M
c=2sin(t)x+cos(t)y\displaystyle {c'} = -2 \, \sin\left(t\right) \frac{\partial}{\partial x } + \cos\left(t\right) \frac{\partial}{\partial y }
show(c.plot() + v.plot(chart=X, scale=0.5))
g(v,v) # does not work !
Error in lines 1-1 Traceback (most recent call last): File "/projects/sage/sage-6.10/local/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 905, in execute exec compile(block+'\n', '', 'single') in namespace, locals File "", line 1, in <module> File "/projects/sage/sage-6.10/local/lib/python2.7/site-packages/sage/manifolds/differentiable/tensorfield_paral.py", line 1399, in __call__ dom_resu = dom_resu.intersection(arg._domain) File "/projects/sage/sage-6.10/local/lib/python2.7/site-packages/sage/manifolds/subset.py", line 734, in intersection "the two subsets do not belong to the same manifold") ValueError: the two subsets do not belong to the same manifold
print g.parent()
Free module T^(0,2)(M) of type-(0,2) tensors fields on the 2-dimensional differentiable manifold M
print g.parent().base_module()
Free module X(M) of vector fields on the 2-dimensional differentiable manifold M
print v.parent()
Free module X((0, 2*pi),c) of vector fields along the Real interval (0, 2*pi) mapped into the 2-dimensional differentiable manifold M
g.parent().base_module() == v.parent()
False\displaystyle \mathrm{False}
gc = c.pullback(g) print gc
Field of symmetric bilinear forms c_*(g) on the Real interval (0, 2*pi)
gc.display()
cg=(3cos(t)2+4)dtdt\displaystyle c_*g = \left( -3 \, \cos\left(t\right)^{2} + 4 \right) \mathrm{d} t\otimes \mathrm{d} t
gc(v,v) # does not work either
Error in lines 1-1 Traceback (most recent call last): File "/projects/sage/sage-6.10/local/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 905, in execute exec compile(block+'\n', '', 'single') in namespace, locals File "", line 1, in <module> File "/projects/sage/sage-6.10/local/lib/python2.7/site-packages/sage/manifolds/differentiable/tensorfield_paral.py", line 1404, in __call__ return FreeModuleTensor.__call__(self_r, *args_r) File "/projects/sage/sage-6.10/local/lib/python2.7/site-packages/sage/tensor/modules/free_module_tensor.py", line 2095, in __call__ self.common_basis(arg) # to trigger some change of components File "/projects/sage/sage-6.10/local/lib/python2.7/site-packages/sage/tensor/modules/free_module_tensor.py", line 1495, in common_basis "free module") TypeError: the two tensors are not defined on the same free module