________________________________________
>From: Edwin Woollett
>mydefint2 does 2d integration using integrate twice.
>Calls separate and mydefint1.
> An attempt to define functions which result in minimal questions about the variables of integration.
The integrand (first argument to mydefin1) is automatically simplified in the current context; thus
(%i2) (assume(x < 0), mydefint1(abs(x),x,0,1));
(%o2) -1/2
No amount of quoting changes this. If this bothers you (first simplify in global context and second in the context defined by the definite integral), you could specify
the integrand as a lambda form, or you could write your code in Common Lisp as a defmspec function.
Also, your code forgets all assumptions that involve the variable of integration. If the global context is (0 < x, x < a) and x is the integration variable, the body of
mydefinit1 will not be able deduce that a is positive, for example.
--bw