This is the answer, according to Wolfram Alpha http://www.wolframalpha.com/input/?i=sum(sin(n*x)%2C+(n%2C+1%2C+N))&dataset=. I guess the value at 0 has to be taken as a limit.
The Sum means that SymPy can't do it. SymPy doesn't have the algorithms to compute this summation. Its summation algorithms are not particularly strong. There are classes of summations that it can compute, and this apparently isn't in one of them. Aaron Meurer On Sun, Jan 4, 2015 at 3:43 AM, Gaurav Dhingra <axyd0...@gmail.com> wrote: > I came across something which i think should have been solved by sympy: > > > from sympy import > > > *> x, y, z = symbols('x y z')> n, N = symbols('n N', integer=True)> > summation(sin(n*x), (n, 1, N)) > Sum(sin(n*x), (n, 1, N)) # so it returns the expression as it is > > > > > I expected the answer to be a *piece-wise* function, what's the catch in > this ? > > -- > You received this message because you are subscribed to the Google Groups > "sympy" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sympy+unsubscr...@googlegroups.com. > To post to this group, send email to sympy@googlegroups.com. > Visit this group at http://groups.google.com/group/sympy. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sympy/bf7ddc6d-485a-4bf4-92a9-4c26ad02180b%40googlegroups.com > <https://groups.google.com/d/msgid/sympy/bf7ddc6d-485a-4bf4-92a9-4c26ad02180b%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscr...@googlegroups.com. To post to this group, send email to sympy@googlegroups.com. Visit this group at http://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAKgW%3D6K6KQjKu30gSJVZw9%2BYoZgLzGPUvd8MCM-f9QBx1uQeOg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.