Rationalizing the denominator et al.



Try ratsimp with algebraic : true

(%i1) algebraic : true$
(%i2) ratsimp(test1=1/sqrt(2));
(%o2) test1=sqrt(2)/2
(%i3) ratsimp(test2=2*sqrt(2-sqrt(2))/sqrt(2));
(%o3) test2=sqrt(2-sqrt(2))*sqrt(2)

BW

maxima-bounces at math.utexas.edu wrote on 11/30/2007 12:53:41 PM:

>    I have two expressions, test1=1/sqrt(2) and
> test2=2*sqrt(2-sqrt(2))/sqrt(2), which I would like Maxima to display as
> sqrt(2)/2 and sqrt(2*(sqrt(2)-1)), respectively.  Both involve 
rationalizing
> the denominator, and the second involves pulling terms inside a radical 
(a
> la rootscontract) and factoring inside.  Is there a straightforward way 
to
> obtain these results?  My six attempts in Maxima 5.13.0 for test1 
failed:
>    ratsimp(test1);
>    rat(test1);
>    test1,ratalgdenom=true;
>    test1,algebraic=true;
>    radcan(test1);
>    test1,radexpand=true;
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima