Is there a computer algebra method to compute the curvature of a Riemannian metric on the plane when the metric tensor has long entries $E,F,G$

The computation by hand is very complicated and long.

I would like to apply this possible software to calculate the Gaussian curvature described in the following posts:

A curvature description for center condition for quadratic vector field

Limit cycles as closed geodesics(2)

Finding a 1-form adapted to a smooth flow

I computed by hand, for two particular vector fields

$V=y\partial_x-x\partial_y$ and $V=y\partial_x -(x+x^2)\partial_y$

Now I need try other vector fields so I need computer help.

Thank you for your help, comments or answers.


Try SageManifolds http://sagemanifolds.obspm.fr/

See this example (there are several others) for how to compute the curvature tensor from the metric


Hint: it's just

R = g.riemann()

EDIT: Here's a complete example

You can open the CoCalc worksheet here:


M = Manifold(2, 'M', r'\mathbb{R}^2')
coords.<x,y> = M.chart()
g = M.riemannian_metric('g', latex_name=r'g')

E(x, y) = e^(x + y)
F(x, y) = e^(x^2 + y^2)
G(x, y) = e^(x + y)

g[0, 0] = E
g[0, 1] = F
g[1, 1] = G

R = g.riemann()

  • $\begingroup$ Thank you very much for your very interesting answer. $\endgroup$ – Ali Taghavi Aug 24 '17 at 9:34

There is some Maple code at


It is a fairly straightforward translation of the definitions. I am not clear whether that is what you need. If not, perhaps you could be more specific.

  • $\begingroup$ Thank you so much for this codes. I try to apply these. $\endgroup$ – Ali Taghavi Aug 15 '17 at 13:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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