trigsign/signum still doesn't work in the latest 5.23.2 Maxima. I'll send a bug message to the maxima mailing list. At 04:25 PM 3/15/2011, you wrote:
Hmmm... In Maxima 5.19.1 (8/17/2009 -- I haven't updated to the latest version in a while), I find that trigsign is 'true' by default, but it doesn't work. The documentation sez trigsign allows asinh(-x) to become -asinh(x), which works, but the Maxima simplifier apparently doesn't recognize signum() as a sign function suitable for movement.
I guess Maxima needs some work. I'll download the latest Maxima & see if this has been fixed.
Thanks!
[Of course, this doesn't provide the complete answer to my question, but it will help.]
At 04:06 PM 3/15/2011, Bill Gosper wrote:
Over the years, I've had occasion to use Macsyma/Maxima to produce formulae that were then utilized in my computer code (Lisp/C/...). While these symbolic algebra tools are extremely useful, there is one area where symbolic algebra systems could be improved quite a lot -- the handling of signs (e.g., +/-).
While Maxima does a pretty good job of understanding the absolute value function ('abs'), it doesn't seem to know very much about the intimately related "sign" ('signmum') function. For example, although 'asinh' is a perfectly good odd function, Maxima doesn't know how to move 'signum' in and out of the 'asinh' function.
Dealing with 'signum' in a high quality way should be considerably easier than attempting to handle 'if-then-else' expressions (aka "()?:" expressions in C/C++, etc.). But there are occasions where symbolic algebra systems would be extremely helpful if they could handle such if-then-else expressions. The alternative is pretty ugly: it may be necessary to create a software "harness" and then evaluate the alternative expressions with every conceivable boolean combination -- a strategy that quickly blows up exponentially, but it is still better if this strategy is implemented mechanically, to make sure that all combinations are checked.
I haven't had a lot of experience with other symbolic algebra systems. Do Maple & Mathematica (or any others) do a better job of handling these signum and/or if-then-else expressions?
Alternatively, has anyone here had any experience in teaching the Macsyma/Maxima simplifier about such expressions, so that I could expand its capabilities ?
In Macsyma 2.4,
(c16) TRIGSIGN;
(d16) true
(c17) ASINH(SIGNUM(A)*B);
(d17) signum(a) asinh(b)
(c18) BLOCK([TRIGSIGN : FALSE],ASINH(SIGNUM(A)*B));
(d18) asinh(signum(a) b)
(c19) ASINH(SIGNUM(A)*B*(-1)^INTEGER);
integer (d19) signum(a) asinh(b) (- 1)
(c20) MAKELIST(THETA[K](-X,Q),K,1,4);
(d20) [- theta (x, q), theta (x, q), theta (x, q), theta (x, q)] 1 2 3 4
with similar control by trigsign. I actually saw a proposal to remove trigsign from Maxima. I wonder if those people know what they're doing. (They should maybe collect a bunch of Macsyma code and notebooks, and just string search to see if anybody uses such-and-such symbol. I found 14 *conversational* uses of trigsign in my .mfes.) --rwg