posible bug - clashing variable names in integrals



On 10/4/09, Barton Willis <willisb at unk.edu> wrote:

>>integral(integral(f(x),x,a,b)*g(x),x,c,d)
>>
>>into
>>
>>integral(f(x),x,a,b)*(integral(g(x),x,a,b)
>
> I tried declare(integrate,outative). That doesn't work.

Maybe this example actually shows a bug in integrate:
freeof(x, 'integrate(f(x), x, a, b)) => true, and in fact the
Lisp function ?freeof is called by integrate and returns true,
but integrate doesn't exploit that to pull out 'integrate(f(x), x, a, b)
from the outer integral. That seems like a bug in integrate,
do you agree?

> I wrote the code that does is(equal(lambda([x], f(x)), lambda([y], f(y))))
> --> true. So naturally, I agree that is(equal(integrate(f(x),x,a,b), integrate(f
> (y),y,a,b))) --> true is better than unknown.

As an aside, since I think freeof is the key predicate here, not equal,
I agree that integrate nouns should be comparable by equal.
(I'm not sure how the test should go, maybe substitute the formal
variable by a gensym or something, but I'm sure we can invent a
suitable test if we agree how it should work.)

best

Robert Dodier