integrate returns undefined



Here is the simplest way I think.

(%i6) answer:limit(integrate(sin(m*x)*sin(n*x),x,0,2*%pi),n,m);
(%o6) %pi
(%i7) answer:limit(integrate(sin(m*x)*sin(n*x),x,0,2*%pi),n,m+c);
(%o7) 0

This integral cannot be treated as the differences between the 
antiderivitive.  It is a limit problem.


----- Original Message ----- 
From: "Richard Hennessy" <rvh2007 at comcast.net>
To: "John Pye" <john.pye at anu.edu.au>; <fateman at cs.berkeley.edu>
Cc: "'Edwin Woollett'" <woollett at charter.net>; <maxima at math.utexas.edu>
Sent: Thursday, September 11, 2008 10:51 AM
Subject: Re: [Maxima] integrate returns undefined


> Here is a complete work-around that works
>
> (%i1) declare([m,c],integer);
> (%o1) done
> (%i2) assume(n>0,m>0,notequal(c,0));
> (%o2) [n>0,m>0,notequal(c,0)]
> (%i3) answer:''(integrate(sin(m*x)*sin(n*x),x,0,2*%pi));
> (%o3) (m*sin(2*%pi*n))/(n^2-m^2)
> (%i4) limit(answer,n,m);
> (%o4) %pi
> (%i5) limit(answer,n,m+c);
> (%o5) 0
>
> FWIW.
>
> Rich
>
>
> ----- Original Message ----- 
> From: "John Pye" <john.pye at anu.edu.au>
> To: <fateman at cs.berkeley.edu>
> Cc: "'Edwin Woollett'" <woollett at charter.net>; <maxima at math.utexas.edu>
> Sent: Thursday, September 11, 2008 9:23 AM
> Subject: Re: [Maxima] 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
>>
>> _______________________________________________
>> Maxima mailing list
>> Maxima at math.utexas.edu
>> http://www.math.utexas.edu/mailman/listinfo/maxima
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima