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

*To*: mathgroup at smc.vnet.net*Subject*: [mg92613] Re: [mg92588] Why is Mathematica assuming k==l and how do I make it*From*: Bob Hanlon <hanlonr at cox.net>*Date*: Wed, 8 Oct 2008 06:25:34 -0400 (EDT)*Reply-to*: hanlonr at cox.net

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