randRange( 1, 4 ) (function() { switch ( EXP % 4 ) { case 0: return '1'; case 1: return 'i'; case 2: return '-1'; case 3: return '-i'; } })()

Simplify.

i ^ {EXP}

SOLUTION
  • 1
  • i
  • -1
  • -i

Anything to the first power is the number itself.

The most important property of the imaginary unit i is that \color{BLUE}{i ^ 2} = \color{ORANGE}{-1}.

i ^ 3 = (\color{ORANGE}{i ^ 2}) \cdot i = (\color{BLUE}{-1}) \cdot i = -i

i ^ 4 = (\color{ORANGE}{i ^ 2}) ^ 2 = (\color{BLUE}{-1}) ^ 2 = 1

i ^ EXP = SOLUTION

4 + randRange( 1, 30 ) (function() { switch ( EXP % 4 ) { case 0: return '1'; case 1: return 'i'; case 2: return '-1'; case 3: return '-i'; } })()

Simplify.

i ^ {EXP}

SOLUTION
  • 1
  • i
  • -1
  • -i

The most important property of the imaginary unit i is that \color{BLUE}{i ^ 2} = \color{ORANGE}{-1}.

When this property is plugged into i ^ 4, we get: i ^ 4 = (\color{BLUE}{i ^ 2}) ^ 2 = (\color{ORANGE}{-1}) ^ 2 = 1

So, we can reduce the exponent by multiples of 4 and have the same result.

The remainder after dividing EXP by 4 is EXP % 4, so i ^ {EXP} = i ^ {EXP % 4}.

Any number but zero to the zeroth power is one.

i ^ 0 = 1

Anything to the first power is the number itself.

i ^ 1 = i

As stated above, \color{BLUE}{i ^ 2} = \color{ORANGE}{-1}.

i ^ 3 = (\color{BLUE}{i ^ 2}) \cdot i = (\color{ORANGE}{-1}) \cdot i = -i

i ^ {EXP} = i ^ {EXP % 4} = SOLUTION.