More generally, suppose you are solving for w^n=1 (1), where w=(az+b)/(cz+d)=T(z) for some complex a,b,c,d with ad-bc not equal to zero (*).
Such maps T are called "fractional linear transformations" on the complex plane, and have lots of nice properties. One of these properties that is...