ASKSAGE: Sage Q&A Forum - Latest question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sat, 08 Oct 2011 20:25:35 -0500How to Rationalize the Denominator of a Fraction ?http://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
supertatSat, 08 Oct 2011 20:25:35 -0500http://ask.sagemath.org/question/8362/Radical in the denominator?http://ask.sagemath.org/question/7494/radical-in-the-denominator/Is there any way I can get a general complex number to display with the radical in the denominator, rather than having it rationalized? For example (1+i)/sqrt(2).Mike WittSun, 10 Oct 2010 06:00:07 -0500http://ask.sagemath.org/question/7494/