unsimplifed result from expand



Am Samstag, den 26.03.2011, 09:32 -0500 schrieb Barton Willis:
> I thought that expand returned a simplified expression; maybe it does not:
> 
>  (%i241) (1-sqrt(5))^3-4*(1-sqrt(5))^2+8;
>  (%o241) (1-sqrt(5))^3-4*(1-sqrt(5))^2+8
> 
>  (%i242) expand(%);
>  (%o242) 5^(3/2)-5^(3/2)
> 
>  (%i243) expand(%,0,0);
>  (%o243) 0
> 
> Ratexpand crunches this to zero without the additional simplification:
> 
>  (%i244) ratexpand((1-sqrt(5))^3-4*(1-sqrt(5))^2+8);
>  (%o244) 0
> 
> --Barton

This problem might be related to a further bug I have observed some time
ago:

(%i4) sqrt(2)+sqrt(2)+sqrt(2);
(%o4) 2^(3/2)+sqrt(2)

(%i6) ratsimp(%);
(%o6) 3*sqrt(2)

The problem is in simplus and related functions. We have code in
simptimes to simplify powers of integers. simplus has to be extended
accordingly. I have already tested some algorithm, which works for the
case above, but it is not general enough.

Dieter Kaiser