Simplify powers of $i$ (#644)

Simplify powers of $i$ (#644)

Use i2=−1i^2 = -1, i3=−ii^3 = -i, i4=1i^4 = 1, and cyclic pattern.