Solve for x if $z$ is a complex number such that $z^2+z+1=0$ I was given a task to solve this equation for $x$: 
$$\frac{x-1}{x+1}=z\frac{1+i}{1-i}$$
for a complex number $z$ such that $z^2+z+1=0$.
Solving this for $x$ is trivial but simplifying solution using the given condition is what's bothering me. Thanks ;)

$$\frac{x-1}{x+1}=z\frac{1+i}{1-i}=z\frac{(1+i)^2}{(1+i)(1-i)}=zi$$
Applying componendo and dividend, $$x=\frac{1+zi}{1-zi}=\frac{(1+zi)^2}{(1-zi)(1+zi)}=\frac{1-z^2+2iz}{-z}=-2i+z-z^2$$ as $z^2+z+1=0\implies z^3=1$
