Ask Your Question

Covariant Derivative gives Error, why? (SAGE 7.5.1)

asked 2017-03-01 16:28:32 +0100

Claudia gravatar image

updated 2017-03-02 03:14:22 +0100

kcrisman gravatar image

This simple code gives an Error:

f = function('f')


polar.<R,Phi> = B.chart(R'R:(0,+oo) Phi:(0,2*pi):\Phi')

G = B.riemannian_metric('G')









Error: TypeError: unable to convert R to an integer

This Error doesn't occur either if I avoid the square root in S[1,1]=R^(0.5), for example by writing S[1,1]=R^(0.4) or if I avoid the dependence of the derivative of f in the first entry of the metric, for example by writing G[1,1]=f(R)^2.

This Error also doesn't occur in older Sage versions, for example Sage 7.1

Thanks a lot for help!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-03-02 10:32:32 +0100

eric_g gravatar image

updated 2017-03-02 22:34:58 +0100

This is a known bug, related to some recent change in the treatment of derivatives of symbolic functions, cf. this discussion. In your case, the bug shows up because of both G[1,1]=diff(f(R),R) and the square root in S[1,1]=R^(0.5).

A fix is under preparation; hopefully it will be included in Sage 7.6.

EDIT: the fix is ready, cf. the comment below

edit flag offensive delete link more


Thanks Eric, now that I know it is a bug, i will for now use an older version of Sage. Many greetings!

Claudia gravatar imageClaudia ( 2017-03-02 11:18:17 +0100 )edit

The fix is ready, as Trac ticket 22503. Without waiting for Sage 7.6, you can already use it in Sage 7.5.1 by running the following commands from your Sage root directory:

git remote add trac git:// -t master
git pull trac public/manifolds/bug-22503
./sage -b
eric_g gravatar imageeric_g ( 2017-03-02 22:25:03 +0100 )edit

Great, I did, it works.

Claudia gravatar imageClaudia ( 2017-03-03 14:39:05 +0100 )edit

The fix is now available in the just released Sage 7.6.

eric_g gravatar imageeric_g ( 2017-03-28 14:51:15 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2017-03-01 16:28:32 +0100

Seen: 489 times

Last updated: Mar 02 '17