On Sat, Mar 17, 2012 at 15:40, Barton Willis <willisb at unk.edu> wrote:
> Uses new and old have reason to be confused between simplification or
> evaluation:
> (%i4) :lisp($integrate (list (list 'mtimes) 5 (list (list '$f) 'x)) 'x))
> ((%INTEGRATE) ((MTIMES) 5 (($F) X)) X)
> (%i4) :lisp(take '(%integrate) (list (list 'mtimes) 5 (list (list '$f)
> 'x)) 'x)
> ((MTIMES SIMP) 5 ((%INTEGRATE SIMP) (($F SIMP) X) X))
>
Not sure what your point is here. Yes, there is a simplification
'integrate( freeof_var*..., var) => freeof_var * 'integrate(..., var), just
as there is a simplification abs(non_neg*...) => non_neg*abs(...). I
suppose the confusion is that the integral (noun-form) and the "calculate
an antiderivative" subroutine are spelled the same -- but would it really
be less confusing if we had integral(...) vs. integrate(...), limit(...)
vs. find_limit(...), etc.?
Further:
>
> (%i1) load(abs_integrate)$
> (%i2) assume(aa>0)$...
>
I don't think this is an inconsistency, just a garden-variety bug in
abs_integrate (which is after all in contrib, so not expected to be as
robust as core Maxima):
(%i1) display2d:false$
(%o1) false
(%i2) integrate(1/(abs(x)+1),x,-aa,aa);
(%o2) 'integrate(1/(abs(x)+1),x,-aa,aa)
(%i3) assume(aa>0);
(%o3) [aa > 0]
(%i4) integrate(1/(abs(x)+1),x,-aa,aa);
(%o4) 'integrate(1/(abs(x)+1),x,-aa,aa)
(%i5) is(aa>0);
(%o5) true <<< no problem with regular integrate
(%i6) load(abs_integrate);
(%o6)
"C:/PROGRA~2/MAXIMA~1.1-G/share/maxima/5.25.1/share/contrib/integration/abs_integrate.mac"
(%i7) is(aa>0);
(%o7) true
(%i8) integrate(1/(abs(x)+1),x,-aa,aa);
Is aa positive, negative, or zero? <<< should know this!!
p;
(%o8) 2*log(aa+1)
(%i9) is(aa>0);
(%o9) unknown <<< why was fact deleted?
-s