# Differential forms and chain rule

Is there any way to use the chain rule on differential forms in Sage e.g. d(1/z) = -z^(-2)dz ?

From what I've understood in the reference manual, differential forms are defined via a manifold and coordinate charts which doesn't seem to allow it. I am working with forms that can be arbitrarily big, so I think it would be better for me to treat this as a purely algebraic object with no reference to any charts, but I guess this cannot be avoided ?

Sorry for the somewhat naive question, I am new to Sage.

edit retag close merge delete

The basic abilities of Sage include the use of chain rule :

sage: f=function("f")
sage: diff(1/f(x),x)
-diff(f(x), x)/f(x)^2


This entails the solution of your differential form, reformulated as an ordinary differential equation :

sage: S=desolve(E,f(x),x) ; S
_C - x
sage: var("_C")
_C
sage: bool(E.substitute_function(f, S.function(x)))
True


But this is outside the differential geometry framework, so I'm not sure that I address your question.

( 2021-02-25 21:53:02 +0200 )edit

Sort by ยป oldest newest most voted

Building on @Emmanuel_Charpentier's comment, the closest thing you can do to use the chain rule with unspecified differential forms is something like

sage: E.<x,y> = EuclideanSpace()
sage: z = E.scalar_field(function('Z')(x,y), name='z')
sage: z.display()
z: E^2 --> R
(x, y) |--> Z(x, y)
sage: diff(z)
1-form dz on the Euclidean plane E^2
sage: diff(z).display()
dz = d(Z)/dx dx + d(Z)/dy dy
sage: diff(1/z)
1-form d1/z on the Euclidean plane E^2
sage: diff(1/z).display()
d1/z = -d(Z)/dx/Z(x, y)^2 dx - d(Z)/dy/Z(x, y)^2 dy
sage: diff(1/z) == -1/z^2 * diff(z)
True
sage: diff(z).wedge(diff(1/z))
2-form dz/\d1/z on the Euclidean plane E^2
sage: diff(z).wedge(diff(1/z)).display()
dz/\d1/z = 0


But as you can see, all computations use the underlying coordinates (x,y), even in assessing coordinate-free statements like in

sage: diff(1/z) == -z^(-2) * diff(z)
True

more