An “easy” solution to the Einstein equation (in free space) is the spherically symmetric Schwarzschild solution. The pdf bellow shows how one can use the diffgeom module in order to get the equations describing this solution.

One starts with the most general spherically symmetrical metric and by using Einstein equation deduces the equations that must be fulfilled by the components of the metric (in the chosen basis).

## Aaron Meurer

/ 23.07.2012Nice notebook. Are you going to include it in one of your pull requests?

## Stefan Krastanov

/ 23.07.2012It should be in my latest open pull request. It is still a WIP, though, as it is not a self-contained PR.

## Comer Duncan

/ 31.07.2012Can you share the ipython nb, assuming that is what I am seeing? Good to see examples, especially as WIP goes.

## rico fischer

/ 12.12.2012In step 9 is missing the rest of the terminal input, so it is impossible to define diffgeom_simplify.

## Stefan Krastanov

/ 12.12.2012The notebook is actually shipped in the example folder of sympy. Or you can get it here http://nbviewer.ipython.org/urls/raw.github.com/sympy/sympy/master/examples/intermediate/schwarzschild.ipynb

The simplify filter itself is: diffgeom_simplify = lambda a: a.subs(zip(cs.coord_functions(), cs._dummies)).simplify().subs(zip(cs._dummies, cs.coord_functions()))

What it does is to substitute the fields with dummy symbols, simplify them and substitute the fields back.