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.Wed, 24 Nov 2021 11:39:28 +0100Using dz /\ dx convention in SageManifoldshttps://ask.sagemath.org/question/59836/using-dz-dx-convention-in-sagemanifolds/ Several books on Differential Forms in Electrodynamics use the convention that the dx,dz basis is defined as $dz \wedge dx$ and not $dx \wedge dz$, for example the Faraday two-form expressed in this way
$$F = -E_x\, dt \wedge dx - E_y\, dt \wedge dy - E_z\, dt \wedge dz + B_x\, dy \wedge dz + B_y\, dz \wedge dx + B_z\, dx \wedge dy$$
I can't seem to find anything in the SageManifolds documentation on defining either a manifold or a form to use this convention. Is it possible to directly use this convention in SageManifolds ?Fri, 19 Nov 2021 15:55:05 +0100https://ask.sagemath.org/question/59836/using-dz-dx-convention-in-sagemanifolds/Comment by eric_g for <p>Several books on Differential Forms in Electrodynamics use the convention that the dx,dz basis is defined as $dz \wedge dx$ and not $dx \wedge dz$, for example the Faraday two-form expressed in this way</p>
<p>$$F = -E_x\, dt \wedge dx - E_y\, dt \wedge dy - E_z\, dt \wedge dz + B_x\, dy \wedge dz + B_y\, dz \wedge dx + B_z\, dx \wedge dy$$</p>
<p>I can't seem to find anything in the SageManifolds documentation on defining either a manifold or a form to use this convention. Is it possible to directly use this convention in SageManifolds ?</p>
https://ask.sagemath.org/question/59836/using-dz-dx-convention-in-sagemanifolds/?comment=59865#post-id-59865SageMath is correct in computing the exterior derivative, simply your initialization of $F$ is not: the `F[1,3]` term should be `F[1,3] = - B_y(u,v,w, T)` instead of `F[1,3] = B_y(u,v,w, T)`.Sun, 21 Nov 2021 15:43:49 +0100https://ask.sagemath.org/question/59836/using-dz-dx-convention-in-sagemanifolds/?comment=59865#post-id-59865Comment by Donald_Munro for <p>Several books on Differential Forms in Electrodynamics use the convention that the dx,dz basis is defined as $dz \wedge dx$ and not $dx \wedge dz$, for example the Faraday two-form expressed in this way</p>
<p>$$F = -E_x\, dt \wedge dx - E_y\, dt \wedge dy - E_z\, dt \wedge dz + B_x\, dy \wedge dz + B_y\, dz \wedge dx + B_z\, dx \wedge dy$$</p>
<p>I can't seem to find anything in the SageManifolds documentation on defining either a manifold or a form to use this convention. Is it possible to directly use this convention in SageManifolds ?</p>
https://ask.sagemath.org/question/59836/using-dz-dx-convention-in-sagemanifolds/?comment=59847#post-id-59847Yes I'm aware that they are alternating products, however:
1 Its less error prone if you don't have to remember to swap signs
and
2 the exterior derivative seems to be incorrect in $dt \wedge dz \wedge dx$ term
Eg the correct term is $\left(\frac{\partial E_x}{\partial z}-\frac{\partial E_z}{\partial x}+\frac{\partial B_y}{\partial t}\right)dt \wedge dz \wedge dx$ [1]
but Sage gives
$(\frac{\partial\,By}{\partial t}-\frac{\partial\,Ex}{\partial z}+\frac{\partial\,Ez}{\partial x})dt \wedge dx \wedge dz=$
$(\frac{\partial\,Ex}{\partial z}-\frac{\partial\,Ez}{\partial x}-\frac{\partial\,By}{\partial t}) dt \wedge dz \wedge dx$
See next comment for the code as I'm running out of chars
[1] A Visual Introduction to Differential Forms and Calculus on Manifolds, Fortney, J.P, Springer 20Sat, 20 Nov 2021 17:28:20 +0100https://ask.sagemath.org/question/59836/using-dz-dx-convention-in-sagemanifolds/?comment=59847#post-id-59847Comment by Donald_Munro for <p>Several books on Differential Forms in Electrodynamics use the convention that the dx,dz basis is defined as $dz \wedge dx$ and not $dx \wedge dz$, for example the Faraday two-form expressed in this way</p>
<p>$$F = -E_x\, dt \wedge dx - E_y\, dt \wedge dy - E_z\, dt \wedge dz + B_x\, dy \wedge dz + B_y\, dz \wedge dx + B_z\, dx \wedge dy$$</p>
<p>I can't seem to find anything in the SageManifolds documentation on defining either a manifold or a form to use this convention. Is it possible to directly use this convention in SageManifolds ?</p>
https://ask.sagemath.org/question/59836/using-dz-dx-convention-in-sagemanifolds/?comment=59848#post-id-59848Sorry, I could not the editor to do a markdown code display with4 tilde's. The code is at:
[link text](https://gist.github.com/donaldmunro/61a5e886dd69e2e4d6d69442e7997ae5)
https://gist.github.com/donaldmunro/61a5e886dd69e2e4d6d69442e7997ae5Sat, 20 Nov 2021 17:28:47 +0100https://ask.sagemath.org/question/59836/using-dz-dx-convention-in-sagemanifolds/?comment=59848#post-id-59848Comment by Masacroso for <p>Several books on Differential Forms in Electrodynamics use the convention that the dx,dz basis is defined as $dz \wedge dx$ and not $dx \wedge dz$, for example the Faraday two-form expressed in this way</p>
<p>$$F = -E_x\, dt \wedge dx - E_y\, dt \wedge dy - E_z\, dt \wedge dz + B_x\, dy \wedge dz + B_y\, dz \wedge dx + B_z\, dx \wedge dy$$</p>
<p>I can't seem to find anything in the SageManifolds documentation on defining either a manifold or a form to use this convention. Is it possible to directly use this convention in SageManifolds ?</p>
https://ask.sagemath.org/question/59836/using-dz-dx-convention-in-sagemanifolds/?comment=59840#post-id-59840I suppose you already knows that $dz\wedge dx=- dx\wedge dz$ as far $dx$ and $dz$ are 1-forms. With this in mind the only difference is a change in a sign.Fri, 19 Nov 2021 18:58:39 +0100https://ask.sagemath.org/question/59836/using-dz-dx-convention-in-sagemanifolds/?comment=59840#post-id-59840Answer by eric_g for <p>Several books on Differential Forms in Electrodynamics use the convention that the dx,dz basis is defined as $dz \wedge dx$ and not $dx \wedge dz$, for example the Faraday two-form expressed in this way</p>
<p>$$F = -E_x\, dt \wedge dx - E_y\, dt \wedge dy - E_z\, dt \wedge dz + B_x\, dy \wedge dz + B_y\, dz \wedge dx + B_z\, dx \wedge dy$$</p>
<p>I can't seem to find anything in the SageManifolds documentation on defining either a manifold or a form to use this convention. Is it possible to directly use this convention in SageManifolds ?</p>
https://ask.sagemath.org/question/59836/using-dz-dx-convention-in-sagemanifolds/?answer=59866#post-id-59866At the moment, there is no option in Sage leading to the display you are asking for. It could be implemented of course, via an optional keyword of the method `display` of differential forms. This simply requires some work, including tests and documentation. Would you agree to implement this feature ? If yes, please take a look at the [contribute page](https://sagemanifolds.obspm.fr/contrib.html).Sun, 21 Nov 2021 15:51:27 +0100https://ask.sagemath.org/question/59836/using-dz-dx-convention-in-sagemanifolds/?answer=59866#post-id-59866Comment by eric_g for <p>At the moment, there is no option in Sage leading to the display you are asking for. It could be implemented of course, via an optional keyword of the method <code>display</code> of differential forms. This simply requires some work, including tests and documentation. Would you agree to implement this feature ? If yes, please take a look at the <a href="https://sagemanifolds.obspm.fr/contrib.html">contribute page</a>.</p>
https://ask.sagemath.org/question/59836/using-dz-dx-convention-in-sagemanifolds/?comment=59937#post-id-59937Very good!Wed, 24 Nov 2021 11:39:28 +0100https://ask.sagemath.org/question/59836/using-dz-dx-convention-in-sagemanifolds/?comment=59937#post-id-59937Comment by Donald_Munro for <p>At the moment, there is no option in Sage leading to the display you are asking for. It could be implemented of course, via an optional keyword of the method <code>display</code> of differential forms. This simply requires some work, including tests and documentation. Would you agree to implement this feature ? If yes, please take a look at the <a href="https://sagemanifolds.obspm.fr/contrib.html">contribute page</a>.</p>
https://ask.sagemath.org/question/59836/using-dz-dx-convention-in-sagemanifolds/?comment=59884#post-id-59884Thanks, I'll have a look at the source.Mon, 22 Nov 2021 16:40:02 +0100https://ask.sagemath.org/question/59836/using-dz-dx-convention-in-sagemanifolds/?comment=59884#post-id-59884