Message: 3 Date: Thu, 12 Jun 2014 16:36:30 -0700 From: Bill Gosper <billgosper@gmail.com> .. Can anyone justify this? In[1467]:= Table[(Cot[(k \[Pi])/p] Sin[k \[Pi]])/p, {p, 4}] Out[1467]= {Cos[k \[Pi]], 1/2 Cot[(k \[Pi])/2] Sin[k \[Pi]], 1/3 Cot[(k \[Pi])/3] Sin[k \[Pi]], 1/4 Cot[(k \[Pi])/4] Sin[k \[Pi]]} In[1468]:= FullSimplify[%, k \[Element] Integers] Out[1468]= {(-1)^k, Cos[(k \[Pi])/2]^2, 0, 0} Millions(?) of users, dozens of years, yet things like In[1471]:= FullSimplify[{I^k - I^(5*k) + 1, I^k - I^(5*k) + one}, k \[Element] Integers] Out[1471]= {1 + I^k - I^(5 k), one} Sometimes it feels like reality rot. --rwg Axel Vogt> I do not understand that Mathematica notations: do you mean cot(k*(Pi)/p)*sin(k*(Pi))/p for p = 1 ... 4, k integer? <AV Exactly. E.g., for p=4, Out[1745]= 1/4 Cot[(k \[Pi])/4] Sin[k \[Pi]] In[1746]:= Table[Limit[%, k -> n], {n, 0, 8}] Out[1746]= {1, 0, 0, 0, 1, 0, 0, 0, 1} (which certainly isn't identically 0). Except for needing a Limit, this seems like a handy source of basis elements for period p sequences. But for any specific p, we can TrigExpand and cancel the 0/0: In[1747]:= FullSimplify[TrigExpand[%% /. k -> 4*k] /. k -> k/4] Out[1747]= Cos[(k \[Pi])/4]^2 Cos[(k \[Pi])/2] obviating the Limit: In[1748]:= Table[%, {k, 0, 8}] Out[1748]= {1, 0, 0, 0, 1, 0, 0, 0, 1} (Although the trigexpansion can get cumbersome for large p.) Returning to the question of what would be the correct behavior of In[1468]:= FullSimplify[%, k \[Element] Integers] above, there was a Macsyma convention of yore to always assume, if possible, that the user has not erred (e.g., computed 0/0). This would dictate returning 0, which is needlessly misleading. A non-wrong, but useless alternative would be Indeterminate. Probably Mma's best alternative would be a Piecewise selecting between 0 and Indeterminate. In any event, the following is definitely wrong: Out[1500]= Cot[(\[Pi] x)/3] Sin[\[Pi] x] In[1501]:= Assuming[n \[Element] Integers, Limit[%, x -> n]] Out[1501]= 0 In[1502]:= Limit[%%, x -> 3] Out[1502]= -3 --rwg