integrate returns undefined



Richard Fateman wrote:
> Not so clear a bug.
> (n-m)/(n-m) simplifies to 1.
> But if you know n=m, then you have 0/0.  So is it a bug if (n-m)/(n-m) -->
> 1?
>
> Answer: maybe. But not clear :)
>
> RJF
>   

I still say that this looks very much to me like a bug. The user has
asked for the answer to

integrate( cos(m*x)*cos(n*x), x, 0, 2*%pi  )


and the user has then responded with further information that says that
n==m. The only reasonable conclusion given than information is that
Maxima should return the same result as the earlier simplification.

It would appear that perhaps the integration algorithim is 'throwing up'
the need for this answer about whether or not n-m==0, but that answer
should be back-substituted into the initial problem and the whole result
should be re-evaluated, eliminating the 'undefined' result that comes
from the 0/0 thing that appears to be happening somewhere in there, right?

It looks like the additional information received by maxima about n==m
is nothing being used early enough in the solution process.

Cheers
JP