posible bug - clashing variable names in integrals



2009/10/3 Leo Butler <l.butler at ed.ac.uk>

> I think this makes perfect sense. f(z) and g(z) are syntactically equal
> (the short story is they both evaluate to z^2). On the other hand, Maxima
> does not integrate
> functions, it integrates expressions. For example
>

Perhaps the problem is with the documentation.  The documentation for 'is'
clearly states that it only returns 'false' if the predicate is provably
false.   This would seem to imply that if it returns 'false' for a predicate
'A = B' it doesn't just mean that A and B are not syntactically equal, it
means that A and B are provably not equivalent.

f(x) := x*y;
>
> yields two different integrals if one integrates v. x vs. v. y.
> So, Maxima will return 'unknown' for the test
>

Yes, but that's quite different from the example I gave, in which the two
integrals are identical apart from the name of the integration variable.

Nathaniel



> is(equal(A,B));
>
> too.
>
> Leo
>
>
>
>
>
> < <
> < <
> < < 2009/10/3 Nathaniel Virgo <nathanielvirgo at gmail.com>
> < <
> < < > Hi
> < < >
> < < > I just came across the following.  Should it be considered a bug?
> < < >
> < < >
> < < > this works fine:
> < < >
> < < > (%i10) C:integrate(g(y),y,c,d);
> < < > (%o10) integrate(g(y),y,c,d)
> < < >
> < < > (%i11) A: integrate(C*f(x),x,a,b);
> < < > (%o11) integrate(f(x),x,a,b)*integrate(g(y),y,c,d)
> < < >
> < < > it has successfully taken the constant outside the integral
> < < >
> < < > (%i12) B: C*'integrate(f(x),x,a,b);
> < < > (%o12) integrate(f(x),x,a,b)*integrate(g(y),y,c,d)
> < < >
> < < > so A and B are the same
> < < >
> < < > (%i13) is(A=B);
> < < > (%o13) true
> < < >
> < < > however, if I do the following, which should be exactly equivalent,
> it
> < < > fails:
> < < >
> < < > (%i14) C:integrate(g(x),x,c,d);
> < < > (%o14) integrate(g(x),x,c,d)
> < < >
> < < > (%i15) A: integrate(C*f(x),x,a,b);
> < < > (%o15) integrate(f(x)*integrate(g(x),x,c,d),x,a,b)
> < < >
> < < > it has failed to realise that the x in the subexpression is a
> different
> < < > variable from the x in the outer integral, so it keeps the constant
> inside
> < < > the integral
> < < >
> < < > (%i16) B: C*'integrate(f(x),x,a,b);
> < < > (%o16) integrate(f(x),x,a,b)*integrate(g(x),x,c,d)
> < < >
> < < > (%i17) is(A=B);
> < < > (%o17) false
> < < >
> < < > ...and it now thinks the two expressions A and B are provably not the
> same,
> < < > even though they are in fact equivalent.  It would be ok (although a
> bit
> < < > lame) if it answered "maybe" here, but it seems to me that "false" is
> just
> < < > incorrect.
> < < >
> < < >
> < < > Nathaniel
> < < >
> < < >
> < <
> <
> < Nathaniel,
> < You slide between equal and equivalent and are not clearly
> < distinguishing between the two. Maxima does. From
> <
> < ? =
> <
> <  `is(<a> = <b>)' evaluates `<a> = <b>' to `true' when <a> and <b>
> <      are syntactically equal (that is, identical).  Expressions can be
> <      equivalent and not syntactically equal.
> <
> < Try
> <
> < is(equal(A,B));
> <
> <
> < Leo
> <
> < --
> < The University of Edinburgh is a charitable body, registered in
> < Scotland, with registration number SC005336.
> <
> < _______________________________________________
> < Maxima mailing list
> < Maxima at math.utexas.edu
> < http://www.math.utexas.edu/mailman/listinfo/maxima
> <
> <
>
> --
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
>
>