Loading [MathJax]/jax/output/HTML-CSS/jax.js
Ask Your Question
0

Simplifying when solving Einstein equation

asked 4 years ago

Omar Medbau gravatar image

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

Preview: (hide)

Comments

Welcome to Ask Sage! Thank you for your question!

slelievre gravatar imageslelievre ( 4 years ago )

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

slelievre gravatar imageslelievre ( 4 years ago )

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)
slelievre gravatar imageslelievre ( 4 years ago )

1 Answer

Sort by » oldest newest most voted
1

answered 4 years ago

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

eq1.expr().denominator()
Preview: (hide)
link

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 4 years ago

Seen: 366 times

Last updated: Jan 27 '21