ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 12 Mar 2012 05:55:24 +0100divide numerator and denominator by certain valuehttps://ask.sagemath.org/question/8785/divide-numerator-and-denominator-by-certain-value/Hi,
is it somehow possible to divide the numerator and denominator of a fraction by the same value? For example, (a*b + c)/(b*d + a + c) gets (a + c/b)/(d + a/b + c/b) if I divide it by b. matthjesMon, 12 Mar 2012 05:55:24 +0100https://ask.sagemath.org/question/8785/How to Rationalize the Denominator of a Fraction ?https://ask.sagemath.org/question/8362/how-to-rationalize-the-denominator-of-a-fraction/Hi, experts.<br/>
<br/>
Is there any way to rationalize the denomintor of a fraction ?<br/>
<br/>
For example, I tried<br/>
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`". <br/>
However, all of the above commands return `1/(2*sqrt(2) + 3)`,<br/>
whose denominator is not rational.<br/>
<br/>
I know<br/>
(1) Sage uses Maxima.<br/>
(2) Standalone version of Maxima can rationalize the denominator by typing "`ratsimp(a), algebraic: true;`".<br/>
(3) Sage accepts "`maxima.ratsimp(a)`", but I don't know how to pass the Maxima option "`algebraic: true;`" to Sage.<br/>
Is there any way to rationalize the denominator with Sage ?<br/>
<br/>
Thanks in advance.<br/>
-Tatsuya
supertatSun, 09 Oct 2011 03:25:35 +0200https://ask.sagemath.org/question/8362/