multiple evaluations & integrate



No function in Maxima should substitute variable or function values, or
apply functions, unless that is its principal and explicit definition (e.g.
"apply"). So the integrate example is certainly a bug.(*)

Beyond that, it is an abomination for *any* Maxima internal code to be
calling "$ev", which is a kitchen-sink user-level convenience function with
bizarre behavior.

The use case here is that Risch apparently returns solveable integrals.
 Why is it doing this in the first place?  Why is it using the sledgehammer
that is ev(,nouns) rather than just evaluating integrals?  Well, part of
the answer is that there is no easy way to reevaluate *only* the nounified
integrals in an expression.  Quite a mess.

(*) This also suggests that subst(lambda([x]...),...) should *not* in
principle perform the lambda application.  Not sure whether "but it's so
handy" is a good enough excuse....

                -s


On Sat, Jun 8, 2013 at 7:04 AM, Barton Willis <willisb at unk.edu> wrote:

>  OK:
>
>   (%i2) integrate(sin(2 *asin(a*x)), x);
>   (%o2) ((1-a^2*x^2)^(3/2)+sqrt(1-a*x)*sqrt(a*x+1)*(5*a^2*x^2-5))/(6*a)
>
> Not OK:
>
>   (%i3) (a:b,b:c,c:d,d:e,e:f,f:g,g:h,h:i)$
>
>   (%i4) integrate(sin(2 *asin(a*x)), x);
>   (%o4) ((1-f^2*x^2)^(3/2)+sqrt(1-f*x)*sqrt(f*x+1)*(5*f^2*x^2-5))/(6*f)
>
> In risch.lisp, I see things such as
>
>   (let ((*in-risch-p* t))  (meval (list '($ev) result '$nouns)))
>
> I'm not sure that appending '$noeval fixes the (putative) bug.
>
> I think (%o4) shows a bug. Is the Maxima  evaluation policy clearly
> documented?
>
>
>
>
>  --Barton
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>
>