[sympy] inconsistent treatment of cosine zero

2015-10-18 Thread Bill McLean
This behaviour seems strange. The case k=0 is handled correctly when integrating cos(k*x), but not cos(k*pi*x). In [1]: integrate(cos(k*x),(x,0,pi)) Out[1]: ⎧π for k = 0 ⎨ ⎩0 otherwise In [2]: integrate(cos(k*pi*x),(x,0,1)) Out[2]: 0 -- You received this message because you are

Re: [sympy] inconsistent treatment of cosine zero

2015-10-19 Thread Aaron Meurer
For me they both give Piecewise results in SymPy 0.7.6.1. Aaron Meurer On Sun, Oct 18, 2015 at 10:21 PM, Bill McLean wrote: > This behaviour seems strange. The case k=0 is handled correctly when > integrating cos(k*x), but not cos(k*pi*x). > > In [1]: integrate(cos(k*x),(x,0,pi)) > Out[1]: > ⎧π