In the case of quadratic's I could write my own deduction routine that checks the discriminent to count the number of roots. I
don't know if there is a discriminent for cubic's but I guess there is one and if there is I could try that. If it is not too
complicated then it might not affect the performance of pwdefint for cubic's arguments. I don't think it is a good idea to make
pwdefint slower just to handle cubic arguments. I think I just want to keep it simple. When there are floating point or bfloat
discriminents then I don't know. I can research it further.
Rich
----- Original Message -----
From: "Richard Hennessy" <rvh2007 at comcast.net>
To: "Barton Willis" <willisb at unk.edu>
Cc: "Maxima List" <maxima at math.utexas.edu>
Sent: Saturday, December 20, 2008 9:08 AM
Subject: Re: [Maxima] pw.mac version 2.3.1
Another solution might be to write my own deduction mechanism for pwdefint but I doubt it is worth it in this case. I think maybe I
should change the 3 to a 2 and be happy with that.
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
_______________________________________________
Maxima mailing list
Maxima at math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima