ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 07 Jun 2013 12:36:47 +0200Changing notation in differential formshttps://ask.sagemath.org/question/10204/changing-notation-in-differential-forms/Dear all:
I'm trying to compute the curvature of a Schwarzschild metric using differential forms (Cartan formalism),
sage: reset()
sage: var('t,r,theta,phi')
sage: coords = [t,r,theta, phi]
sage: U = CoordinatePatch((t,r,theta, phi))
sage: Omega = DifferentialForms(U)
sage: X = function('X', r, latex_name=r"\Xi")
sage: f = exp(X)
sage: vi =[]
sage: for i in xrange(len(coords)):
... vi.append(DifferentialForm(Omega,1))
sage: vi[0][0] = f
sage: vi[1][1] = 1/f
sage: vi[2][2] = r
sage: vi[3][3] = r*sin(theta)
sage: dvi=[]
sage: for i in xrange(len(coords)):
... dvi.append(diff(vi[i]))
...
sage: dvi
[-e^X(r)*D[0](X)(r)*dt/\dr, 0, dr/\dtheta, sin(theta)*dr/\dphi + r*cos(theta)*dtheta/\dphi]
I'd like to know if it's possible to manipulate the result in a way that:
- the term `D[0](X)(r)` in the last line could be written as `X'(r)` or just `X'`.
- the `dvi` is expressed in terms of the `vi`-forms instead of the `Omega`-basis.
Any help is thanked.DoxFri, 07 Jun 2013 12:36:47 +0200https://ask.sagemath.org/question/10204/