Simple Complex Number Problem: $1 = -1$ [duplicate]

Solution 1:

You need to pay attention to branches of multivalued functions, e.g. see the Wikipedia explanation here. Similar less-trivial questions often arise when symbolic mathematical sotfware systems exhibit bugs due to failure to stay on principal branches, e.g. see this thread where John McKay asks what your favorite system returns for $(-1)^{5/9} - (-1)^{2/9} - (-1)^{8/9}$. You may find such discussions instructive.

For the reader who may be interested in algorithms see for example

Thomas Breuer. [email protected]
Integral Bases for Subfields of Cyclotomic Fields. AAECC 8, 1997, 279-289 http://www.springerlink.com/content/qnuu0knap4fl3kjt/fulltext.pdf

Abstract. Integral bases of cyclotomic fields are constructed that allow to determine easily the smallest cyclotomic field in which a given sum of roots of unity lies. For subfields of cyclotomic fields integral bases are constructed that consist of orbit sums of Galois groups on roots of unity. These bases are closely related to the bases of the enveloping cyclotomic fields mentioned above. In both situations bases over the rationals and over cyclotomic fields are treated.