# Khan/khan-exercises

Fetching contributors…
Cannot retrieve contributors at this time
327 lines (297 sloc) 16.7 KB
 Multiplying and dividing complex numbers in polar form
24 randFromArray( [ true, false ] )
randRange(1, 10) randRange(1, 10) A_RADIUS * B_RADIUS

Multiply the following complex numbers:

\left(A_REP\right) \cdot \left(B_REP\right)

The first number is plotted in blue and the second number is plotted in green. Your current answer will be plotted in orange.

graphInit({ range: [ [ -10, 10 ], [ -10 ,10 ] ], scale: 20, tickStep: 1, axisArrows: "<->" }); drawComplexChart( 10, DENOMINATOR ); circle( [A_REAL, A_IMAG], 1 / 4, { fill: KhanUtil.BLUE, stroke: "none" }); circle( [B_REAL, B_IMAG], 1 / 4, { fill: KhanUtil.GREEN, stroke: "none" }); graph.currComplexPolar = new ComplexPolarForm( DENOMINATOR, 10, USE_EULER_FORM ); redrawComplexPolarForm();
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]);

Multiplying complex numbers in polar forms can be done by multiplying the lengths and adding the angles.

The first number, A_REP, has angle A_ANGLE_REP and radius A_RADIUS_REP.

The second number, B_REP, has angle B_ANGLE_REP and radius B_RADIUS_REP.

The sum of the angles is A_ANGLE_REP + B_ANGLE_REP = INTERMEDIATE_ANGLE_REP.

The angle INTERMEDIATE_ANGLE_REP is more than 2 \pi. A complex number goes a full circle if its angle is increased by 2 \pi, so it goes back to itself. Because of that, angles of complex numbers are convenient to keep between 0 and 2 \pi.

INTERMEDIATE_ANGLE_REP - 2 \pi = ANSWER_ANGLE_REP

The angle of the result is A_ANGLE_REP + B_ANGLE_REP = ANSWER_ANGLE_REP.

The radius of the result is ANSWER_RADIUS_REP and the angle of the result is ANSWER_ANGLE_REP.

24 randFromArray( [ true, false ] )

Divide the following complex numbers:

\Large{\dfrac{A_REP}{B_REP}}

\dfrac{A_REP}{B_REP}

The dividend is plotted in blue and the divisor is plotted in green. Your current answer will be plotted in orange.

graphInit({ range: [ [ -10, 10 ], [ -10, 10 ] ], scale: 20, tickStep: 1, axisArrows: "<->" }); drawComplexChart( 10, DENOMINATOR ); circle( [A_REAL, A_IMAG], 1 / 4, { fill: KhanUtil.BLUE, stroke: "none" }); circle( [B_REAL, B_IMAG], 1 / 4, { fill: KhanUtil.GREEN, stroke: "none" }); graph.currComplexPolar = new ComplexPolarForm( DENOMINATOR, 10, USE_EULER_FORM ); redrawComplexPolarForm();
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]);

Dividing complex numbers in polar forms can be done by dividing the radii and subtracting the angles.

The dividend, A_REP, has angle A_ANGLE_REP and radius A_RADIUS_REP.

The divisor, B_REP, has angle B_ANGLE_REP and radius B_RADIUS_REP.