MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: A question about $Assumptions

  • To: mathgroup at
  • Subject: [mg68960] Re: [mg68909] A question about $Assumptions
  • From: Daniel Lichtblau <danl at>
  • Date: Fri, 25 Aug 2006 05:35:21 -0400 (EDT)
  • References: <>
  • Sender: owner-wri-mathgroup at

Led wrote:
> Mathematica 5.2 (Windows) gives:
> In[1]:=
> Integrate[ Cos[m*x] * Cos[n*x] ,{x,0,Pi}]
> Out[1]=
> \!\(\(m\ Cos[n\ Ï?]\ Sin[m\ Ï?] - n\ Cos[m\ Ï?]\ Sin[n\ Ï?]\)\/\(m\^2 -
> n\^2\)\)
> which is the expected result. But if instead one writes
> In[1]:=
> $Assumptions={{m,n}â??Integers};
> Integrate[ Cos[m*x] * Cos[n*x] ,{x,0,Pi}]
> Out[1]=
> 0
> the result is correct only if m~=n.
> What's the problem with $Assumptions?
> Shouldn't it be used that way?

Generally speaking Integrate will give results that may be wrong on a 
"small" subset in parameter space, for example a discrete set.

If you do something like

In[10]:= Integrate[Cos[m*x]*Cos[n*x], {x,0,Pi},

Out[10]= 0

you indeed get a result that is wrong on a "small" discrete subset of 
Z^2, to wit, the diagonal.

My view is one should not expect much from assumptions of integrality on 
parameters used in Limit, Series, or Integrate. If only because I've 
never had any good ideas for how to make them behave well.

Daniel Lichtblau
Wolfram Research

  • Prev by Date: General--Exponential simplifications by default
  • Next by Date: Re: How to handle Arrays that has functional parameters:
  • Previous by thread: A question about $Assumptions
  • Next by thread: Re: A question about $Assumptions