Re: "Assuming"

*To*: mathgroup at smc.vnet.net*Subject*: [mg85928] Re: "Assuming"*From*: "David W.Cantrell" <DWCantrell at sigmaxi.net>*Date*: Thu, 28 Feb 2008 02:44:23 -0500 (EST)*Organization*: NewsReader.Com Subscriber*References*: <20080221171506.200$2n_-_@newsreader.com> <200802221221.HAA08545@smc.vnet.net> <200802251237.HAA22859@smc.vnet.net> <200802261243.HAA22523@smc.vnet.net> <3185411B-C98F-476F-9C77-FBC32FE719D2@mimuw.edu.pl> <47C49E87.600@wolfram.com> <fq3ba0$g78$1@smc.vnet.net>

Andrzej Kozlowski <akoz at mimuw.edu.pl> wrote: > On 27 Feb 2008, at 00:19, Daniel Lichtblau wrote: [snip] > > Here is an example of the behavior in question. I do not pass > > judgement on whether it should be regarded as a bug or a feature. I > > simply wanted to give a concrete example where the behavior arises > > and is difficult to supress. > > > > In[2]:= i1 = Integrate[Sin[m*x]*Sin[n*x], {x,0,2*Pi}, Assumptions- > > >Element[{m,n},Reals]]; > > > > Check what happens when we assign n->1 and then take limit as m->1. > > > > In[3]:= l1 = Limit[i1 /. n->1, m->1] > > Out[3]= Pi > > > > That was fine. Yes, that limit was fine. But i1 was not valid for all m and n. And indeed it is that very lack of validity when |m| = |n| which is the common reason for wishing to find a limit such as l1. This situation can be avoided if we use an antiderivative for Sin[m*x]*Sin[n*x] which is valid for all m and n: x/2 (Sinc[(m - n) x] - Sinc[(m + n) x]) Then, applying Newton-Leibniz, we would have gotten i1alt = Pi (Sinc[2 (m - n) Pi] - Sinc[2 (m + n) Pi]) as an alternative for the definite integral, valid for all m and n. > > Now see what happens if we assign n->1 and simplify > > under assumption that m is an arbitrary integer. > > > > In[4]:= l2 = Simplify[i1 /. n->1, Element[m,Integers]] > > Out[4]= 0 In[13]:= Simplify[i1alt /. n -> 1, Element[m, Integers]] Out[13]= Pi (Sinc[2 (-1 + m) Pi] - Sinc[2 (1 + m) Pi]) In[14]:= FullSimplify[%, Element[m, Integers]] Out[14]= 0 Thus, Simplify to 0 happened to have been suppressed, but FullSimplify still gave 0, which I would call a misdemeanor. > Unless I am missing something obvious (which is possible as I have not > yet fully woken up) the problem amounts simply to this: > > x = (1/2)*(Sin[2*(m - 1)*Pi]/(m - 1) - Sin[2*(m + 1)*Pi]/(m + 1)); > > In[2]:= Limit[x, m -> 1] > Out[2]= Pi > > In[3]:= Limit[x, m -> 1, Assumptions -> Element[m, Integers]] > Out[3]= 0 > > The last answer maybe slightly dubious because it is not perfectly > clear in what sense the limit is taken here. But it seems to me a very > minor point and no cause for concern ? Your In[3] and Daniel's In[4] are asking for different things, a fact which you probably already noticed, having been awake longer now. David

**References**:**Re: "Assuming"***From:*Andrzej Kozlowski <akoz@mimuw.edu.pl>

**Re: "Assuming"***From:*"Mariano Suárez-Alvarez" <mariano.suarezalvarez@gmail.com>

**Re: Re: "Assuming"***From:*Daniel Lichtblau <danl@wolfram.com>