Revision history [back]

How to Rationalize the Denominator of a Fraction ?

How to Rationalize the Denominator of a Fraction ?

Hi, experts.

Is there any way to rationalize the denomintor of a fraction ? For example, after difining a variable 'a' as follows: a = 1 / (2 * sqrt(2) + 3) I tried typing b=a.simplify_full(); b; c=a.simplify_factorial(); c; d=a.simplify_radical(); d; e=a.simplify_rational(); e;

As a result, all of the above commands return 1/(2sqrt(2) + 3), which is the same as a, though I expect any of them to return "3 - 2sqrt(2)" or "-2*sqrt(2) + 3".

I know Sage uses Maxima and Maxima can do this by typing ratsimp(a), algebraic: true;

Is there any way to rationalize the denominator with Sage ?

Thanks in advance. -Tatsuya

How to Rationalize the Denominator of a Fraction ?

How to Rationalize the Denominator of a Fraction ?

? Hi, experts.

Hi, experts.

Is there any way to rationalize the denomintor of a fraction ? For example, after difining a variable 'a' as follows: a = 1 / (2 * sqrt(2) + 3) I tried typing b=a.simplify_full(); b; c=a.simplify_factorial(); c; d=a.simplify_radical(); d; e=a.simplify_rational(); e;

e;

As a result, all of the above commands return 1/(2sqrt(2) 1/(2*sqrt(2) + 3), which is the same as a, though I expect any of them to return "3 - 2sqrt(2)" 2*sqrt(2)" or "-2*sqrt(2) + 3".

I know Sage uses Maxima and Maxima can do this by typing ratsimp(a), algebraic: true;

true;

Is there any way to rationalize the denominator with Sage ?

?

Thanks in advance. -Tatsuya

-Tatsuya

How to Rationalize the Denominator of a Fraction ?

How to Rationalize the Denominator of a Fraction ?

Hi, experts.

Is there any way to rationalize the denomintor of a fraction ?
For example, after difining a variable 'a' as follows:
a = 1 / (2 * sqrt(2) + 3)
I tried typing
b=a.simplify_full(); b;
c=a.simplify_factorial(); c;
e=a.simplify_rational(); e;

As a result, all of the above commands return 1/(2*sqrt(2) + 3),
which is the same as a, though I expect any of them
to return "3 - 2*sqrt(2)" or "-2*sqrt(2) + 3".

I know Sage uses Maxima and Maxima can do this by typing
ratsimp(a), algebraic: true;

Is there any way to rationalize the denominator with Sage ?

-Tatsuya

How to Rationalize the Denominator of a Fraction ?

Hi, experts. experts.

Is there any way to rationalize the denomintor of a fraction ? ?
For example, after difining a variable 'a' as follows: I tried

a = 1 / (2 * sqrt(2) + 3)
I tried typing
b=a.simplify_full();
b = a.simplify_full(); b;
c=a.simplify_factorial(); c = a.simplify_factorial(); c;
e=a.simplify_rational(); e = a.simplify_rational(); e;
As a result,

expecting any of them to return "3 - 2*sqrt(2)" or "-2*sqrt(2) + 3".

However, all of the above commands return 1/(2*sqrt(2) + 3), which 3),
whose denominator is the same as a, though I expect any of them not rational.
to return "3 - 2*sqrt(2)" or "-2*sqrt(2) + 3".
I know Sage uses Maxima and Maxima can do this rationalize the denominator
by typing typing

ratsimp(a), algebraic: true;

Is there any way to rationalize the denominator with Sage ? ?

Thanks in advance. -Tatsuya

-Tatsuya

How to Rationalize the Denominator of a Fraction ?

Hi, experts.

Is there any way to rationalize the denomintor of a fraction ?

For example, I tried

a = 1 / (2 * sqrt(2) + 3)

b = a.simplify_full(); b;
c = a.simplify_factorial(); c;
d = a.simplify_radical(); d;
e = a.simplify_rational(); e;

expecting any of them to return "3 - 2*sqrt(2)" or "-2*sqrt(2) + 3".

However, all of the above commands return 1/(2*sqrt(2) + 3),
whose denominator is not rational.

I know know
(1)
Sage uses Maxima and Maxima.
(2) Standalone version of
Maxima can rationalize the denominator
by typing

"ratsimp(a), algebraic: true;

true;".
(3) Sage accepts "maxima.ratsimp(a)", but I don't know how to pass the Maxima option "algebraic: true;" to Sage.

Is there any way to rationalize the denominator with Sage ?