Ask Your Question

Simplifying when solving Einstein equation

asked 2021-01-27 18:37:30 +0200


I'm solving Einstein equation in vacuum. I already computed the Ricci tensor. For example, de first Ricci component is saved in the following variable eq1:


The denominator of the component should vanish since since the other part of the equation is zero. How can I extract numerator of the expression. I have tried:


But it does not work.Thanks

edit retag flag offensive close merge delete


Welcome to Ask Sage! Thank you for your question!

slelievre gravatar imageslelievre ( 2021-01-27 18:47:57 +0200 )edit

Please provide code that can be copied and pasted in a fresh Sage session to reproduce the problem.

slelievre gravatar imageslelievre ( 2021-01-27 18:48:16 +0200 )edit

To display blocks of code or error messages in Ask Sage, skip a line above and below, and do one of the following (all give the same result):

  • indent all code lines with 4 spaces
  • select all code lines and click the "code" button (the icon with '101 010')
  • select all code lines and hit ctrl-K

For instance, typing

If we define `f` by

    def f(x, y, z):
        return x * y * z

then `f(2, 3, 5)` returns `30` but `f(2*3*5)` gives:

    TypeError: f() takes exactly 3 arguments (1 given)


If we define f by

def f(x, y, z):
    return x * y * z

then f(2, 3, 5) returns 30 but f(2*3*5) gives:

TypeError: f() takes exactly 3 arguments (1 given)
slelievre gravatar imageslelievre ( 2021-01-27 18:48:48 +0200 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2021-01-27 19:34:41 +0200

eric_g gravatar image

EE[0,0] is a chart function, which does not have any method denominator(). To access to the underlying symbolic expression, on which you can invoke denominator(), use expr():

edit flag offensive delete link more

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: 2021-01-27 18:37:30 +0200

Seen: 59 times

Last updated: Jan 27