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
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]:
> ⎧π