How to simplify ((2+sqrt(3))/(sqrt(2)+sqrt(2+sqrt(3))) + (2-sqrt(3))/(sqrt(2)-sqrt(2-sqrt(3))))^2 to 2?



> Now we know maxima can do it ... but the user have to deal with
>
> 1/ know to load that precise module. How can they find it ?
> 2/ know how to ask maxima to use it as the expression
> > (%i3) ratsimp(scanmap(sqrtdenest, ratsimp(%)));
> does not appear as a simple one to me.
>
> How could I (and my student) have come to this ?

Well I overcomplicated it. It can be done simpler with

(%i1) load(sqdnst)$
(%i2) ((2+sqrt(3))/(sqrt(2)+sqrt(2+sqrt(3))) +
(2-sqrt(3))/(sqrt(2)-sqrt(2-sqrt(3))))^2$
(%i3) ratsimp(sqrtdenest(%));
(%o3) 2

So all you need to know is that the problem in the expression are
nested roots and that maxima has a function for dealing with them in
sqdnst package.

Andrej