pw.mac version 2.3.1



Barton,

pw.mac was built to work with the default values of the various million's of Maxima flags.  I suggest you don't use algexact:true 
and that it's on you to find fault in pw.mac for trying that.  Maybe I should say that somewhere in the help.

Rich


----- Original Message ----- 
From: "Barton Willis" <willisb at unk.edu>
To: "Richard Hennessy" <rvh2007 at comcast.net>
Cc: "Maxima List" <maxima at math.utexas.edu>
Sent: Saturday, December 20, 2008 7:54 AM
Subject: Re: [Maxima] pw.mac version 2.3.1


By the way:

(%i15) ratprint : false$
(%i16) f(x)  := 1+signum(x^3-23*x^2-71*x-11)$

(%i17) pwdefint(f(x),x,-5,10), algexact :false;
(%o17) 4.888402276042864

(%i18) pwdefint(f(x),x,-5,10), algexact :true;
(%o18) 0

(%i19) [f(-5), f(-2), f(-1), f(0)];
(%o19) [0,2,2,0]

What's the story? The equation x^3-23*x^2-71*x-11 = 0 has three real roots,
but
the roots expressed in terms of radicals involves %i. So Maxima wrongly
assumes
that these solutions are nonreal.

(%i48) algsys([x^3-23*x^2-71*x-11 = 0],[x]), algexact : true, realonly :
true;
(%o48) []

(%i49) algsys([x^3-23*x^2-71*x-11 = 0],[x]), algexact : false, realonly :
true;
(%o49) [[x=25.77153920619555],[x=-0.16366897755369],[x=-2.607870115575124]]

Possible cures:

 (1) return a noun form for signum arguments of degree 3 or more;

 (2) locally set algexact to false and be happy with decimal approximations
     --this is risky, some real roots might have a tiny, but spurious,
     imaginary part;

 (3) use nroots to do a better job of detecting the number of roots -- this
     might fail
     for polynomials with floating point coefficients (you could first
     apply rationalize).

For abs_integrate, I took the easy route (1).

Barton