I know this was a few months ago but I was also struggling with trying to transform expressions like 1/(sqrt(10)+sqrt(5)) into ones with a rational denominator.

It turns out with simplification on or say one just did ev(...,simp) with simplification off, then one can force 1/sqrt(2) into sqrt(2) as with the following example.

simp:true;

aa:sqrt(2)/2;

aa:rat(aa),algebraic; /*which should return sqrt(2)/2 albeit in the form

Using ?print() I can see the following

aa will look like ((MEXPT SIMP) 2 ((RAT SIMP) -1 2)) after the assignment

After using rat it's the more complicated

((MRAT SIMP (((MEXPT RATSIMP) 2 ((RAT) 1 2))) (#:|2^(1/2)428|)) (#:|2^(1/2)428| 1 1) . 2)

with some kind of rules I don't understand at the end.

Same example with simp false:

simp:false;

aa:sqrt(2)/2,simp; /*or aa:1/sqrt(2)*/

aa:rat(aa),algebraic;

Apologies that you probably have already figured this out in the meantime.

It turns out with simplification on or say one just did ev(...,simp) with simplification off, then one can force 1/sqrt(2) into sqrt(2) as with the following example.

simp:true;

aa:sqrt(2)/2;

aa:rat(aa),algebraic; /*which should return sqrt(2)/2 albeit in the form

Using ?print() I can see the following

aa will look like ((MEXPT SIMP) 2 ((RAT SIMP) -1 2)) after the assignment

After using rat it's the more complicated

((MRAT SIMP (((MEXPT RATSIMP) 2 ((RAT) 1 2))) (#:|2^(1/2)428|)) (#:|2^(1/2)428| 1 1) . 2)

with some kind of rules I don't understand at the end.

Same example with simp false:

simp:false;

aa:sqrt(2)/2,simp; /*or aa:1/sqrt(2)*/

aa:rat(aa),algebraic;

Apologies that you probably have already figured this out in the meantime.

**Edit:**There was some other differences using ratsimp rather than rat.

simp:false;

aa:sqrt(2)/2,simp;

aa:ratsimp(aa),algebraic;

produces 2^(1/2)/2 as in ((MTIMES RATSIMP) ((RAT) 1 2) ((MEXPT) 2 ((RAT) 1 2)))

where as

simp:true;

aa:sqrt(2)/2,simp;

aa:ratsimp(aa),algebraic;

doesn't seem to change anything ((MEXPT SIMP) 2 ((RAT SIMP) -1 2))

I'm using Maxima 5.42.2 as that may be important, who knows.