[Maxima] tellsimp and abs

Barton Willis willisb at unk.edu
Sun Jan 14 06:19:08 CST 2007

```Consider:

(%i1) tellsimp(abs(a),a-1)\$
(%i2) abs(a);
(%o2) a-1  <-- OK

(%i3) abs([a]);
(%o3) [abs(a)]  <-- not OK

(%i4) expand(%,0);  <-- shouldn't need to expand
(%o4) [a-1]

I believe this (putative) bug is caused by the fact that
'simpabs' calls itself instead of calling 'simplifya.'
As a general rule, 'simplifya' is the only function
that should directly call a simplifying function. True or false?

Three more things:

(1) Since Maxima lists don't correspond to any one
particular mathematical object, I think it's wrong for 'abs' to
automatically map over a list. When listarith == true, then OK
map 'abs' over lists. Agree or disagree?

(2) The reflection simplification for abs doesn't work when the CL
special 'expandp' is 't' (look at signum1). I don't have an example
where this causes a problem. Nevertheless, we could change simpabs
to use the reflection rule scheme defined in trigi.lisp. The test
suite is OK with this change. OK or gratuitous?

(3) Do we really want abs to call cabs whenever the expression
contains an %i? Consider these 'simplifications' (yeech!)

(%i1) abs(asin(x+%i));
Is  x   positive, negative, or zero? pos;
(%o1)
abs(log((x-sqrt(sqrt((2-x^2)^2+4*x^2)+x^2-2)/sqrt(2))^2+(sqrt(sqrt((2-x^2)^2+4*x^2)-x^2+2)/sqrt(2)-1)^2))/2

(%i2) abs((x+%i)^7);
(%o2) sqrt((x^7-21*x^5+35*x^3-7*x)^2+(7*x^6-35*x^4+21*x^2-1)^2)
(%i3)

Barton
```