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
(1) Sage uses Maxima.
(2) Standalone version of Maxima can rationalize the denominator by typing "ratsimp(a), algebraic: 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 ?
Thanks in advance.
-Tatsuya