MathGroup Archive 2006

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

Search the Archive

A question about $Assumptions


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?


  • Prev by Date: Installing Mathematica via SMS
  • Next by Date: Re: reading all the files in one directory
  • Previous by thread: Re: Installing Mathematica via SMS
  • Next by thread: Re: A question about $Assumptions