Ask Your Question

# Simplifying when solving Einstein equation

Hello

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:

eq1=EE[0,0]

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:

eq1.denominator()

But it does not work.Thanks

edit retag close merge delete

## Comments

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

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)


produces:

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)


## 1 Answer

Sort by » oldest newest most voted

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():

eq1.expr().denominator()

more

## Your Answer

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

Add Answer

## Stats

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

Seen: 59 times

Last updated: Jan 27