Nested sqrt functions



Am Samstag, den 29.08.2009, 17:13 -0700 schrieb Richard Fateman:

> Try expr,z=%i;
> rectform(%);
> 
>  --->   -2*%i

Most of the problems are present, because of simplifications like
sqrt(1/z) --> 1/sqrt(z). We get different (more correct) results when we
switch off radexpand:

(%i35) expr:sqrt(sqrt(1-z^2)-1)/sqrt(1-sqrt(1-z^2))
             -sqrt(-z^2)/sqrt(z^2),radexpand:false;
(%o35) sqrt(sqrt(1-z^2)-1)/sqrt(1-sqrt(1-z^2))-sqrt(-z^2)/sqrt(z^2)

(%i36) rectform(expr),z=2;
(%o36) 0
(%i37) rectform(expr),z=-2;
(%o37) 0
(%i38) rectform(expr),z=%i;
(%o38) 0

For a more general complex value rectform does not give a simple answer,
therefore we calculate an approximation:

(%i39) rectform(expr),z=1+%i,bfloat;
(%o39) -1.179622910384696b-17

If I am right all examples with nested square roots are constructed in a
way to give zero for all positive and negative real and complex values.

But again we get for this example:

(%i49) radcan(expr);
(%o49) -2*%i

To switch off radexpand does not change the result in this case. This
might be a problem of the simplifier, which does not handle the sqrt
function carefully.

Dieter Kaiser