# christoffel symbols of the second kind: how exactly to calculate?

Hello, I have a function f(u,v) = ( cos(v)sin(u), sin(u)sin(v), cos(u) ) which describes a sphere in R3.

How can I calculate the Christoffel symbols of the second kind? I didn't understand the examples I saw so far. I have no idea on how to proceed. Thank you for your efforts, Best wishes Hans

edit retag close merge delete

Sort by ยป oldest newest most voted

From: sage/src/sage/calculus/test.py

def christoffel(i,j,k,vars,g):
s = 0
ginv = g^(-1)
for l in range(g.nrows()):
s = s + (1/2)*ginv[k,l]*(g[j,l].diff(vars[i])+g[i,l].diff(vars[j])-\
g[i,j].diff(vars[l]))
return s

var('th ph')
g = matrix(SR, [[1,0],[0,sin(th)^2]])
for i in [0,1]:
for j in [0,1]:
for k in[0,1]:
print((i,j,k),christoffel(i,j,k, [th,ph], g))

(0, 0, 0) 0
(0, 0, 1) 0
(0, 1, 0) 0
(0, 1, 1) cos(th)/sin(th)
(1, 0, 0) 0
(1, 0, 1) cos(th)/sin(th)
(1, 1, 0) -cos(th)*sin(th)
(1, 1, 1) 0


SageManifolds version:

S2=manifolds.Sphere(2)
Phi=S2.embedding()
sph.<th,ph>=S2.spherical_coordinates()
E=S2.ambient()
g=E.metric()
g1 = S2.metric('g1')
g1.set( Phi.pullback(g))
nab = g1.connection()
nab.display(coordinate_labels=False,only_nonzero=False)

more

Explanations in the comment above

( 2023-05-27 11:41:06 +0200 )edit

Thank you very very much for your efforts1 Best wishes Hans

( 2023-05-29 13:13:05 +0200 )edit