Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Differential forms on non-standard spherical coordinates

I'd like to compute an exterior derivative in spherical coordinates. So far I have the following:

E.<x,y,z> = EuclideanSpace(3)
Ec.<r,theta,phi> = E.spherical_coordinates()

EcM = Ec.manifold()

EcM.set_default_frame(EcM.spherical_frame())
EcM.set_default_chart(EcM.spherical_coordinates())

F = function('F')
show(F)
F_1 = function('F_r')(r, theta, phi)
F_2 = function('F_theta')(r, theta, phi)
F_3 = function('F_phi')(r, theta, phi)


psi = EcM.diff_form(2, 'psi')

psi[2, 3] = F_1
psi[1, 3] = -F_2
psi[1, 2] = F_3

show(psi.display())

res = psi.exterior_derivative()
show(res.display())

which works for the spherical coordinate transformation that is the default for Euclidean space. But, I see that Sagemath has a different spherical coordinate map than I do:

> print(E.coord_change(E.spherical_coordinates(), E.cartesian_coordinates()).display())
x = r*cos(phi)*sin(theta)
y = r*sin(phi)*sin(theta)
z = r*cos(theta)

Instead, I'd like:

x = r * cos(theta) * cos(phi)
y = r * sin(theta) * sin(phi)
z = r * sin(phi)

How can I supply a different change of coordinates function for this case?

Differential forms on non-standard spherical coordinates

I'd like to compute an exterior derivative in spherical coordinates. So far I have the following:

E.<x,y,z> = EuclideanSpace(3)
Ec.<r,theta,phi> = E.spherical_coordinates()

EcM = Ec.manifold()

EcM.set_default_frame(EcM.spherical_frame())
EcM.set_default_chart(EcM.spherical_coordinates())

F = function('F')
show(F)
F_1 = function('F_r')(r, theta, phi)
F_2 = function('F_theta')(r, theta, phi)
F_3 = function('F_phi')(r, theta, phi)


psi = EcM.diff_form(2, 'psi')

psi[2, 3] = F_1
psi[1, 3] = -F_2
psi[1, 2] = F_3

show(psi.display())

res = psi.exterior_derivative()
show(res.display())

which works for the spherical coordinate transformation that is the default for Euclidean space. But, I see that Sagemath has a different spherical coordinate map than I do:

> print(E.coord_change(E.spherical_coordinates(), E.cartesian_coordinates()).display())
x = r*cos(phi)*sin(theta)
y = r*sin(phi)*sin(theta)
z = r*cos(theta)

Instead, I'd like:

x = r * cos(theta) * cos(phi)
y = r * sin(theta) * sin(phi)
cos(phi)
z = r * sin(phi)

How can I supply a different change of coordinates function for this case?

click to hide/show revision 3
retagged

Differential forms on non-standard spherical coordinates

I'd like to compute an exterior derivative in spherical coordinates. So far I have the following:

E.<x,y,z> = EuclideanSpace(3)
Ec.<r,theta,phi> = E.spherical_coordinates()

EcM = Ec.manifold()

EcM.set_default_frame(EcM.spherical_frame())
EcM.set_default_chart(EcM.spherical_coordinates())

F = function('F')
show(F)
F_1 = function('F_r')(r, theta, phi)
F_2 = function('F_theta')(r, theta, phi)
F_3 = function('F_phi')(r, theta, phi)


psi = EcM.diff_form(2, 'psi')

psi[2, 3] = F_1
psi[1, 3] = -F_2
psi[1, 2] = F_3

show(psi.display())

res = psi.exterior_derivative()
show(res.display())

which works for the spherical coordinate transformation that is the default for Euclidean space. But, I see that Sagemath has a different spherical coordinate map than I do:

> print(E.coord_change(E.spherical_coordinates(), E.cartesian_coordinates()).display())
x = r*cos(phi)*sin(theta)
y = r*sin(phi)*sin(theta)
z = r*cos(theta)

Instead, I'd like:

x = r * cos(theta) * cos(phi)
y = r * sin(theta) * cos(phi)
z = r * sin(phi)

How can I supply a different change of coordinates function for this case?