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, 26 Feb 2021 14:12:17 +0100Differential forms and chain rulehttps://ask.sagemath.org/question/55909/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.Thu, 25 Feb 2021 18:55:17 +0100https://ask.sagemath.org/question/55909/differential-forms-and-chain-rule/Comment by Emmanuel Charpentier for <p>Is there any way to use the chain rule on differential forms in Sage e.g. d(1/z) = -z^(-2)dz ?</p>
<p>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 ?</p>
<p>Sorry for the somewhat naive question, I am new to Sage.</p>
https://ask.sagemath.org/question/55909/differential-forms-and-chain-rule/?comment=55916#post-id-55916The 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.Thu, 25 Feb 2021 21:53:02 +0100https://ask.sagemath.org/question/55909/differential-forms-and-chain-rule/?comment=55916#post-id-55916Answer by eric_g for <p>Is there any way to use the chain rule on differential forms in Sage e.g. d(1/z) = -z^(-2)dz ?</p>
<p>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 ?</p>
<p>Sorry for the somewhat naive question, I am new to Sage.</p>
https://ask.sagemath.org/question/55909/differential-forms-and-chain-rule/?answer=55922#post-id-55922Building 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
Fri, 26 Feb 2021 14:12:17 +0100https://ask.sagemath.org/question/55909/differential-forms-and-chain-rule/?answer=55922#post-id-55922