Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I need a differential geometry tool for Mathematica. Is there any add-on?

Unfortunately, Mathematica does not include such functionality or I can not find it.

share|improve this question
3  
Please be more specific. What exactly do you want to do? –  Yves Klett Mar 6 '12 at 10:32
1  
I've heard that this book is pretty good, and the authors developed some Mathematica framework for differential geometry which comes with the book. Did not have a chance to get my hands on it though. –  Leonid Shifrin Mar 6 '12 at 10:33
    
If you are trying to do tensor calculations, you may want to look at John Lee's Ricci package. He also mentions the commercial package MathTensor on that page. –  Michael Wijaya Mar 6 '12 at 10:35
3  
@user450 In the future, it is useful if you include information as to what you have already looked at (such as the Ricci package) or considered, and what you found missing. –  tkott Mar 6 '12 at 15:07
1  
I recommend xAct package for tensor calculus (not only for this) xact.es, there are big chances that is similar to the future Mathematica built-in functionality. –  Artes Mar 7 '12 at 3:06
show 5 more comments

3 Answers

Atlas 2 for Mathematica is the add-on for doing modern differential geometry calculations.

The tool is available on DigiArea website and Wolfram Research website. The tool works with Mathematica 8 and Mathematica 9.

Calculations are coordinate free

  • First of all in the atlas tool all calculations are coordinate free. That means calculations are performed in terms of tensors, vectors and p-forms. Not their components!

    For example conformally flat metric tensor of sphere is presented as:

    conformally flat metric tensor

    where conformally flat metric tensor are coframe 1-forms and symbol - tensor product operator.


Standard differential geometry notations

  • Secondly, the package uses standard differential geometry notations for exterior derivative, covariant differentiation, tensor product etc. It is really helpful to see the same results/formulas on the screen and in my textbooks.

    • Example with Lie derivative calculation:

    conformally flat metric tensor

    • Example with exterior derivative calculation:

    conformally flat metric tensor

    • Example with tensor product calculation:

    conformally flat metric tensor

  • Atlas is very user-friendly and doesn't bog down with a lot of programming which is really importance for people interested in learning.

  • There are a lot of predefined operators to declare various DG objects.
    Just for example Invariants operator automatically calculates invariants of a mapping:

    • for an embedding of a curve - the curve's normalized moving frame and the curve's curvatures
    • for an embedding or immersion - the second fundamental form and mean curvature vector
    • for a submersion - A and T invariants, the mean curvature vector of corresponding fibers, the integrability obstruction of corresponding horizontal distribution and the riemannian obstruction (if the submersion is not a riemannian one).


Visualization of n-dimensional objects

  • The package has Visualize function that visualizes n-dimensional differential geometry objects using different Mathematica plot functions. The function allows quickly visualize an object and its projections. See some examples.

    For example visualization of projections for Mobius strip. Visualize Mobius strip Visualize Mobius strip


Differential Geometry Library

For instance:


Graphical user interfaces

  • There is a bunch of neat applications which included into the tool:
    • Atlas palette - Mathematica palette, allows manipulate, visualize and calculate entities for any of the objects from the library.
      • extends the keyboard with typesetting of characters and atlas symbols
      • gives access to the differential geometry library
      • generates notebook for any of the library objects that fully prepared to calculate differential geometry quantities for this entity
    • Atlas Wizard - solves differential geometry problems on the fly even if you have a little knowledge in the topic.

Video and Screencasts

share|improve this answer
add comment

The modern differential geometry is a vast subject and while not specified exactly what you need the question is a bit too general. I would rather point out a few references.

If you are looking for a package for tensor calculus, especially in General Relativity, the best choice is xAct made by José M. Martín-García (as far as I know he actually develops built-in functionality for the future versions of Mathematica):

However if you need something straightforward and concise, look at this implementation below of a few fundamental objects in differential geometry. You need a metric g and a coordinate system xx on an open set of a 4-dimentional (riemannian or lorentzian) manifold (but it is a straightforward to define these objects for other dimentions) as an input, eg.

xx = {t, x, theta, phi};
g  = { { -E^(2 nu[x]), 0, 0, 0}, {0, E^(2 lambda[x]), 0, 0}, 
       {0, 0, x^2, 0},           {0, 0, 0, x^2 Sin[theta]^2}};

The above is a Lorentzian metric tensor (in a given map) of a static spherically symmetric four dimentional manifold, and the following are the inverse metric, Christoffel symbol of the second kind, Riemann and Ricci curvature tensors and the Ricci scalar with brief descriptions of their usage:

enter image description here

    InverseMetric[ g_, xx_] := 
        Block[{ res }, 
                res = Simplify[ Inverse[g] ];
                res
            ]

enter image description here

    ChristoffelSymbol[g_, xx_] := 
        Block[{n, ig, res}, 
               n = 4;
               ig = InverseMetric[ g, xx]; 
               res = Table[(1/2)*Sum[ ig[[i,s]]*(-D[ g[[j,k]], xx[[s]]] + 
                                                  D[ g[[j,s]], xx[[k]]] 
                                                + D[ g[[s,k]], xx[[j]]]), 
                                      {s, 1, n}], 
                           {i, 1, n}, {j, 1, n}, {k, 1, n}];
               res
             ]

enter image description here

    RiemannTensor[g_, xx_] := 
        Block[{n, Chr, res}, 
               n   = 4;
               Chr = ChristoffelSymbol[ g, xx];
               res = Table[  D[ Chr[[i,k,m]], xx[[l]]] 
                           - D[ Chr[[i,k,l]], xx[[m]]]
                           + Sum[ Chr[[i,s,l]]*Chr[[s,k,m]], {s, 1, n}]
                           - Sum[ Chr[[i,s,m]]*Chr[[s,k,l]], {s, 1, n}], 
                            {i, 1, n}, {k, 1, n}, {l, 1, n}, {m, 1, n}]; 
               res
             ]

enter image description here

    RicciTensor[g_, xx_] :=
        Block[{Rie, res, n}, 
               n = 4; 
               Rie = RiemannTensor[ g, xx]; 
               res = Table[ Sum[ Rie[[ s,i,s,j]], 
                                 {s, 1, n}], {i, 1, n}, {j, 1, n}]; 
               res
             ]   

enter image description here

    RicciScalar[g_, xx_] := 
        Block[{Ricc,ig, res, n}, 
               n = 4;
               Ricc = RicciTensor[ g, xx];
               ig = InverseMetric[ g, xx];
               res = Sum[ ig[[s,i]] Ricc[[s,i]], {s, 1, n}, {i, 1, n}];
               Simplify[res]
            ]     

This is not an optimal implementation, but it is a good point to start building your own package. You could think about introducing a functional definition of the covariant derivative as well as lower and upper indices of covariant and contravariant tensors. One of the common difficulties with this is the multiplicity of definitions and conventions for Riemann and Ricci tensors etc, and that's why I added descriptions of the given functions.

Besides of the above I recommend to look at the Wolfram Demonstrations :

e.g.

One should also look at the geometry section of

Next it would be even more helpful and strongly recommended to look at these articles (some of them are particularly devoted to differential geometry topics, others only deal with useful geometric techniques) in the Mathematica Journal :

share|improve this answer
add comment

You may want to look, also, at David Park's Tensorial application as well as the associated TensorForms subpackage. See: http://home.comcast.net/~djmpark/TensorialPage.html

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.