Re: "Assuming"

*To*: mathgroup at smc.vnet.net*Subject*: [mg85935] Re: "Assuming"*From*: Andrzej Kozlowski <akoz at mimuw.edu.pl>*Date*: Thu, 28 Feb 2008 02:48:00 -0500 (EST)*References*: <20080227092600.592$XT_-_@newsreader.com>

On 27 Feb 2008, at 15:26, David W. Cantrell wrote: > [Message also posted to: comp.soft-sys.math.mathematica] > > 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 Actually, Daniel's In[4] and my In[3] are (essentially) equivalent, since what happens when my In[3] is evaluated by Mathematica is that first Daniel's In[4] is evaluated, returning 0 and then the Limit of 0 is taken as m goes to Infinity, returning again 0. The Limit is therefore irrelevant except for the problem of mathematical interpretation of what it all actually means, since of course the assumption that m is an integer and the assumption that m ->1 are incompatible in Mathematica, which does not consider limits of sequences. As it was very early in the morning I could not see anything else in Daniel's message that was problematic and could not understand what the point of his example was. I think I can see that now, but I have to confess I am still quite unable to take it at all seriously. Andrzej Kozlowski

**Re: How to select terms wanted in a series**

**Re: Finding a continuous solution of a cubic**

**Re: "Assuming"**

**Equation reference**