MathGroup Archive 2008

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

Search the Archive

Re: Why is Mathematica assuming k==l and how do I make it


Integrate[Cos[k alpha] Cos[l alpha], {alpha, -Pi, Pi}, 
 Assumptions -> {l == k, Element[{l, k}, Integers]}]

Pi

Integrate[Cos[k alpha] Cos[l alpha], {alpha, -Pi, Pi}, 
 Assumptions -> {l != k, Element[{l, k}, Integers]}]

0

Assuming[{l == k, Element[{k, l}, Integers]}, 
 Integrate[Cos[k alpha] Cos[l alpha], {alpha, -Pi, Pi}]]

Pi

Assuming[{l != k, Element[{k, l}, Integers]}, 
 Integrate[Cos[k alpha] Cos[l alpha], {alpha, -Pi, Pi}]]

0


Bob Hanlon

---- Aaron Fude <aaronfude at gmail.com> wrote: 

=============
As in

Assuming[Element[{k, l}, Integers] ,
 Integrate[Cos[k alpha] Cos[l alpha], {alpha, -Pi, Pi}]]

I get 0 whereas the answer is Pi if k=l;

Thanks!

Aaron


--

Bob Hanlon



  • Prev by Date: Re: Axis in two scales
  • Next by Date: Line Spacing and Page Layout
  • Previous by thread: Re: $Assumptions
  • Next by thread: Re: Why is Mathematica assuming k==l and how do I make it