# Get denominator with hold=True

t2=x.mul(1/(x^2-x),hold=True) t2.denominator()

results in x-1 instead of x*(x-1) or x^2-x. Is there any other way to obtain x^2-x?

add a comment

Get denominator with hold=True

**
asked 2021-04-25 22:05:18 +0200 **

Anonymous

t2=x.mul(1/(x^2-x),hold=True) t2.denominator()

results in x-1 instead of x*(x-1) or x^2-x. Is there any other way to obtain x^2-x?

add a comment

0

To find out about the possible extra arguments of a method you could access its documentation with a question mark. Here

```
sage: t2.denominator?
Docstring:
Return the denominator of this symbolic expression
INPUT:
* "normalize" -- (default: "True") a boolean.
If "normalize" is "True", the expression is first normalized to
have it as a fraction before getting the denominator.
If "normalize" is "False", the expression is kept and if it is not
a quotient, then this will just return 1.
```

Hence in your situation you could do

```
sage: t2.denominator(normalize=False)
x^2 - x
```

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

Asked: ** 2021-04-25 22:03:53 +0200 **

Seen: **32 times**

Last updated: **Apr 25**

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.