Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Here is another option. I think you are trying to sum the roots of unity.

n=10
for i in range(1,n):
    v=solve(x^i - 1,x)
    roots=map(lambda q: q.rhs(),v)
    print roots
    sum=add(roots).n()
    print sum