cas complex tests



Am Freitag, den 12.11.2010, 05:29 -0600 schrieb Barton Willis:
> -----maxima-bounces at math.utexas.edu wrote: -----
> 
> >The wrong result -4/3 of the first example integrate(sqrt((x^2-2*x +1)/x),x,0,1) is an old problem. 
> 
> Trace simpexpt and evaluate integrate(sqrt(x - 2 + 1/x,x,0,1). You'll see
> 
>  1" Enter "?simpexpt[((x-1)^2/x)^(1/2),1,false]
>  1" Exit  "?simpexpt(x-1)/sqrt(x)
> 
> Since 0 < x < 1 (presumably), this simplification seems bogus.
> 
> --Barton

By default the simplification of Maxima is more correct:

(%i1) sqrt((x-1)^2/x);
(%o1) sqrt(1/x)*abs(x-1)

(%i2) assume(x>0,x<1);
(%o2) [x > 0,x < 1]

(%i3) sqrt((x-1)^2/x);
(%o3) (1-x)/sqrt(x)

One source of problems is the option variable $radexpand:

(%i4) sqrt((x-1)^2/x),radexpand:all;
(%o4) (x-1)/sqrt(x)

The integral of sqrt((x^2-2*x+1)/x) is done by rischint. I suppose that
rischint changes the default simplification by setting flags like
$radexpand.

Dieter Kaiser