Ask Your Question

CD's profile - activity

2024-01-03 10:32:56 +0200 received badge  Popular Question (source)
2019-09-28 20:21:05 +0200 commented answer Transformation of derivative under a change of chart

Thanks, but this is not exactly what I want. From what I can understand, this option gives the same result, except that the notation is a bit more awkward.

What I want is to transform the nabla that contain derivative wrt x y z to an expression for nabla with derivatives wrt lambda theta and r. I do not want derivative with respect to complicated expression like $\dfrac{\partial (...) }{\partial ( r \sin \theta)}$.

In theory, this could be done using the standard transformation rule for partial derivative , i.e something of the form

$$ \frac{\partial }{\partial \tilde{x}^i} = \frac{\partial x^j}{\partial \tilde{x}^i } \frac{\partial }{\partial x_j} $$

Is there something equivalent in sage for the transformation of connection coefficient ?

2019-09-27 21:21:47 +0200 received badge  Editor (source)
2019-09-27 21:19:19 +0200 asked a question Transformation of derivative under a change of chart

Consider the following code. When it display the connection coefficient in the Y frame at the end, we obtain derivative expressions that are quite complicated (for example derivative with respect to "r sin(\theta)". I would rather expect simpler expressions containing derivatives with respect to \lambda, \theta or r alone. Like what I would obtain by applying the "textbook" transformation rules for the partial derivatives.

M = Manifold(4, 'M', latex_name=r'\mathcal{M}')
X.<t,x,y,z> = M.chart()
U = M.open_subset('U', coord_def={X: (y!=0, x<0)})
X_U = X.restrict(U)
var('l', latex_name='\lambda')
Y.<t,l,th,r> = U.chart(r't:(0,+oo) l:(0,pi) th:(0,2*pi):\theta r:(0,+oo)')

Omega = var('Omega')
transit_Y_to_X = Y.transition_map(X_U, [t, r*cos(th)*cos(l+Omega*t), r*cos(th)*sin(l+Omega*t), r*sin(th)])
transit_Y_to_X.set_inverse(t, atan2(y, x) - Omega*t, atan2(z, sqrt(x^2+y^2)), sqrt(x^2+y^2+z^2))

nabla = M.affine_connection('nabla', r'\nabla') 
phi = M.scalar_field(function('Phi', latex_name='\Phi')(x, y, z), name='phi', latex_name='\phi')
e = X_U.frame()

nabla[1,0,0] = e[1](phi).expr()
nabla.display(coordinate_labels=False, only_nonredundant=True)

nabla.display(frame=Y.frame(), chart=Y, coordinate_labels=False, only_nonredundant=True)
2019-09-27 21:05:26 +0200 commented answer Display connection coefficients under a change of chart

Thanks a lot. I also applied your patch and the computation is much faster. I have a question on the results, but I will ask separately.

2019-09-27 20:58:28 +0200 received badge  Scholar (source)
2019-09-27 17:04:08 +0200 received badge  Student (source)
2019-09-26 22:45:49 +0200 asked a question Display connection coefficients under a change of chart

I want to define the connection components as the derivative of a scalar field in one frame and calculate their values in another frame.

M = Manifold(4, 'M', latex_name=r'\mathcal{M}')
X.<t,x,y,z> = M.chart()
U = M.open_subset('U', coord_def={X: (y!=0, x<0)})
X_U = X.restrict(U)
var('l', latex_name='\lambda')
Y.<t,l,th,r> = U.chart(r't:(0,+oo) l:(0,pi) th:(0,2*pi):\theta r:(0,+oo)')
Omega = var('Omega')
transit_Y_to_X = Y.transition_map(X_U, [t, r*cos(th)*cos(l+Omega*t), r*cos(th)*sin(l+Omega*t), r*sin(th)])

nabla = M.affine_connection('nabla', r'\nabla') 
phi = M.scalar_field(function('Phi', latex_name='\Phi')(x, y, z), name='phi', latex_name='\phi')

e = X_U.frame()

nabla[1,0,0] = e[1](phi).expr()

Then

nabla.display(coordinate_labels=False, only_nonredundant=True)

show that the coefficients are good in the X_U chart, but the change of coordinate fail

nabla.display(frame=Y.frame(), chart=Y, coordinate_labels=False, only_nonredundant=True)

What is wrong ?