MathGroup Archive 2010

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

Search the Archive

Re: Correct answer for all n

  • To: mathgroup at smc.vnet.net
  • Subject: [mg113231] Re: Correct answer for all n
  • From: Daniel Lichtblau <danl at wolfram.com>
  • Date: Wed, 20 Oct 2010 04:06:04 -0400 (EDT)

Sam Takoy wrote:
> Hi,
> 
> Assuming[Element[n, Integers],
>   1/(2 \[Pi]) Integrate[Sin[a]*Exp[-I*n*a], {a, -Pi, Pi}]]
> 
> returns 0, where as for n = 1 the answer is not zero. Anyway to have 
> Mathematica acknowledge that automatically?
> 
> Many thanks in advance,
> 
> Sam

This came up earlier in the month.

http://forums.wolfram.com/mathgroup/archive/2010/Oct/msg00119.html

Recap:

(1) Integrality assumptions will invoke simplifiers that do not 
recognize special cases (which can be regarded, in some sense, as 
"nongeneric").

(2) If you forego that assumption, you can recover correct results for 
specific integer n using Limit. Example:

In[3]:= InputForm[ii =
   1/(2*Pi)*Integrate[Sin[a]*Exp[-I*n*a], {a,-Pi,Pi}]]
Out[3]//InputForm= (I*Sin[n*Pi])/((-1 + n^2)*Pi)

In[5]:= Limit[ii,n->0]
Out[5]= 0

In[7]:= InputForm[Limit[ii,n->-1]]
Out[7]//InputForm= I/2

Daniel Lichtblau
Wolfram Research



  • Prev by Date: Re: Sin*Cos + Log
  • Next by Date: Why so slow and not getting faster
  • Previous by thread: Correct answer for all n
  • Next by thread: Release dates for Mathematica versions