# How Do I Perform a Coordinate Transformation on a Metric Tensor?

I entered my coordinates like this:

M = Manifold(3, 'M', structure='Lorentzian')
X.<t,p,ph> = M.chart(r't p ph:\phi')
X


Then defined my metric-tensor like this:

g = M.metric()
g[0,0], g[1,1] = -1, 1
g[2,2] = (5*p^2+4*t^2)
g.display()


How to transform the metric under the coordinate change of r=sqrt(5*p^2+4*t^2)? And once I do that, can the Christoffel symbols be calculated from the new metric instead of the old one, and in terms of t and r?

edit retag close merge delete

Sort by » oldest newest most voted

First introduce the coordinate transformation as a new chart Y on M, with some transition map from chart X:

Y.<t,r,ph> = M.chart(r't r:(0,+oo) ph:\phi')
X_to_Y = X.transition_map(Y, (t, sqrt(5*p^2 + 4*t^2), ph))
X_to_Y.set_inverse(t, sqrt(r^2 - 4*t^2)/sqrt(5), ph)
X_to_Y.display()
X_to_Y.inverse().display()


Then simply write

g.display(Y)


to get the expression of the metric $g$ in terms of the coordinates $(t, r, \phi)$. To get the component $g_{00}$ in the associated coordinate frame, write

g[Y.frame(), 0, 0, Y]


Finally, the Christoffel symbols of g with respect to the chart Y = $(t, r, \phi)$ are accessible via

g.christoffel_symbols_display(Y)


Note that only the non-zero and non-redundant components are displayed. To get all non-zero components, including the redundant ones (i.e. those that can be deduced from the symmetry on the last two indices), write

 g.christoffel_symbols_display(Y, only_nonredundant=False)


To get an individual Christoffel symbol, like $\Gamma^r_{\ t r}$, type

g.christoffel_symbols(Y)[[1,0,1]].expr(Y)


More details in the documentation.

more

What if I get the message that says no starting chart could be found?

( 2022-12-22 07:05:13 +0100 )edit

Does X_to_Y.set_inverse(t, sqrt(r^2 - 4*t^2)/sqrt(5), ph) solve that problem?

( 2022-12-22 07:09:52 +0100 )edit
1

The code from your question + the code from the answer give the correct solution

( 2022-12-22 10:22:39 +0100 )edit

Excellent. Thank you!

( 2022-12-22 16:18:43 +0100 )edit

## Stats

Seen: 980 times

Last updated: Dec 20 '22