rand(2) ? randRange(2, 4) : randRange(2, 20) 24 randRange(1, DENOMINATOR - 1) BASE_ANGLE_NUMERATOR / DENOMINATOR * 2 * PI (function(){ if (EXPONENT === 2) { return randRange(1, 3); } else if (EXPONENT < 4) { return randRange(1, 2); } return 1; })() randFromArray( [ true, false ] ) polarForm( BASE_RADIUS, BASE_ANGLE, EULER_FORM ) polarForm( BASE_RADIUS, BASE_ANGLE, true ) cos( BASE_ANGLE ) * BASE_RADIUS sin( BASE_ANGLE ) * BASE_RADIUS eulerFormExponent( BASE_ANGLE ) piFraction( BASE_ANGLE, true ) BASE_ANGLE_NUMERATOR * EXPONENT ANGLE_MULTIPLE_NUMERATOR / DENOMINATOR * 2 * PI eulerFormExponent( BASE_ANGLE * EXPONENT ) piFraction( ANGLE_MULTIPLE, true ) pow(BASE_RADIUS, EXPONENT) ( BASE_ANGLE_NUMERATOR * EXPONENT ) % DENOMINATOR ANSWER_ANGLE_NUMERATOR / DENOMINATOR * 2 * PI piFraction( ANSWER_ANGLE, true ) piFraction( ANSWER_ANGLE, true ) polarForm( ANSWER_RADIUS, ANSWER_ANGLE, true ) polarForm( ANSWER_RADIUS, ANSWER_ANGLE, EULER_FORM ) piFraction( ANGLE_MULTIPLE - ANSWER_ANGLE, true )

\blue{ \large{x = BASE_REP}}

\orange{ \large{y = x^{EXPONENT}}}

\blue{x} is plotted in blue below. Change the angle and radius to plot \orange{y} in orange.

var size = 10; graphInit({ range: [[-size, size], [-size, size]], scale: 24, tickStep: 1, axisArrows: "<->" }); drawComplexChart(size, DENOMINATOR); circle( [ BASE_REAL, BASE_IMAG ], 1 / 4, { fill: KhanUtil.BLUE, stroke: "none" }); graph.currComplexPolar = new ComplexPolarForm(DENOMINATOR, size, EULER_FORM); redrawComplexPolarForm();
Radius: 1
Angle: 0
1
[ graph.currComplexPolar.getAngleNumerator(), graph.currComplexPolar.getRadius() ]
var angle = guess[0]; var radius = guess[1]; if (angle === 0 && radius === 1) { return ""; } return angle === ANSWER_ANGLE_NUMERATOR && radius === ANSWER_RADIUS;
redrawComplexPolarForm(guess[0], guess[1]);
redrawComplexPolarForm(guess[0], guess[1]);

All powers of 1 are 1.

First express \blue{x} in Euler form.

\large {\blue{BASE_REP} = \blue{BASE_EULER_REP}}

\large{(\blue{BASE_EULER_REP}) ^ {EXPONENT} = \blue{BASE_RADIUS}^{EXPONENT} (\blue{polarForm(1, BASE_ANGLE, true)}) ^ {EXPONENT}= \orange{coefficient(ANSWER_RADIUS)e ^ {EXPONENT \cdot BASE_E_EXPONENT}}}

So the radius of \orange{y} is ANSWER_RADIUS.

The angle of the result is \large{EXPONENT \cdot BASE_ANGLE_REP}, which is \large{ANGLE_MULTIPLE_REP}.

ANGLE_MULTIPLE_REP is more than 2 \pi. It is a common practice to keep complex number angles between 0 and 2 \pi, because e^{2 \pi i} = (e^{\pi i}) ^ 2 = (-1) ^ 2 = 1.

So subtract the nearest multiple of 2 \pi from the angle.

\large{ANGLE_MULTIPLE_REP - NEAREST_TWO_PI_MULTIPLE = ANSWER_ANGLE_REP}

\large{\orange{y = ANSWER_EULER}}

Converting this back from Euler form, we get \large{y = ANSWER}.