# Khan/khan-exercises

### Subversion checkout URL

You can clone with
or
.
Fetching contributors…

Cannot retrieve contributors at this time

136 lines (133 sloc) 7.647 kB
 Dividing complex numbers
randRange( -5, 5 ) randRange( -5, 5 ) randRange( -5, 5 ) randRange( -5, 5 ) B_REAL * B_REAL + B_IMAG * B_IMAG ( A_REAL * B_REAL ) + ( A_IMAG * B_IMAG ) ( A_IMAG * B_REAL ) - ( A_REAL * B_IMAG ) fraction( REAL_NUMERATOR, DENOMINATOR, true, true ) fraction( IMAG_NUMERATOR, DENOMINATOR, true, true ) complexFraction( REAL_NUMERATOR, DENOMINATOR, IMAG_NUMERATOR, DENOMINATOR ) REAL_NUMERATOR / DENOMINATOR IMAG_NUMERATOR / DENOMINATOR roundTo( 2, ANSWER_REAL_UNROUNDED ) roundTo( 2, ANSWER_IMAG_UNROUNDED ) complexNumber( A_REAL, A_IMAG ) complexNumber( B_REAL, B_IMAG ) "\\color{" + ORANGE + "}{" + A_REP + "}" "\\color{" + BLUE + "}{" + B_REP + "}" "\\color{" + ORANGE + "}{" + A_REAL + "}" "\\color{" + ORANGE + "}{" + A_IMAG + "}" "\\color{" + BLUE + "}{" + B_REAL + "}" "\\color{" + BLUE + "}{" + B_IMAG + "}" -B_IMAG "\\color{" + BLUE + "}{" + negParens( B_CONJUGATE_IMAG ) +"}" complexNumber( B_REAL, B_CONJUGATE_IMAG ) "\\color{" + BLUE + "}{" + CONJUGATE + "}"

Divide the following complex numbers. You can round the real and imaginary parts of the result to 2 decimal digits.

Complex number division is converted to complex multiplication using the denominator's complex conjugate.

\qquad \dfrac{A_REP_COLORED}{B_REP_COLORED} = \dfrac{A_REP_COLORED}{B_REP_COLORED} \cdot \dfrac{CONJUGATE_COLORED}{CONJUGATE_COLORED}

The denominator is simplified by (a + b) \cdot (a - b) = a^2 - b^2.

\qquad \dfrac{(A_REP_COLORED) \cdot (CONJUGATE_COLORED)} {(B_REP_COLORED) \cdot (CONJUGATE_COLORED)} = \dfrac{(A_REP_COLORED) \cdot (CONJUGATE_COLORED)} {(B_REAL_COLORED)^2 - (\color{BLUE}{B_IMAGi})^2}

Note that the denominator now doesn't contain any imaginary unit multiples, so it is a real number, simplifying the problem to complex number multiplication.

The squares in the denominator are evaluated and subtracted.

\qquad \dfrac{(A_REP_COLORED) \cdot (CONJUGATE_COLORED)} {(B_REAL_COLORED)^2 - (B_IMAG_COLOREDi)^2} =

\qquad \dfrac{(A_REP_COLORED) \cdot (CONJUGATE_COLORED)} {B_REAL * B_REAL + B_IMAG * B_IMAG} =

\qquad \dfrac{(A_REP_COLORED) \cdot (CONJUGATE_COLORED)} {B_REAL * B_REAL + B_IMAG * B_IMAG}

Afterwards, the numerator is multiplied using the distributive property.

\qquad \dfrac{(A_REP_COLORED) \cdot (CONJUGATE_COLORED)} {DENOMINATOR} =

\qquad \dfrac{(A_REAL_COLORED \cdot \color{BLUE}{negParens( B_REAL )}) + (A_IMAG_COLORED \cdot \color{BLUE}{negParens( B_REAL )} i) + (A_REAL_COLORED \cdot \color{BLUE}{ B_CONJUGATE_IMAG_COLORED }i) + (A_IMAG_COLORED \cdot \color{BLUE}{ B_CONJUGATE_IMAG_COLORED } i^2)} {DENOMINATOR}

All multiplications are evaluated.

\qquad \dfrac{(A_REAL * B_REAL) + (A_IMAG * B_REALi) + (A_REAL * B_CONJUGATE_IMAGi) + (A_IMAG * B_CONJUGATE_IMAG i^2)} {DENOMINATOR}

Finally, the fraction is simplified.

\qquad \dfrac{A_REAL * B_REAL + A_IMAG * B_REALi + A_REAL * B_CONJUGATE_IMAGi - A_IMAG * B_CONJUGATE_IMAG} {DENOMINATOR} = \dfrac{REAL_NUMERATOR + IMAG_NUMERATORi} {DENOMINATOR} = ANSWER

The real part of the result is REAL_FRACTION, which is (rounded to 2 decimal places) ANSWER_REAL.

The imaginary part of the result is IMAG_FRACTION, which is (rounded to 2 decimal places) ANSWER_IMAG.

Something went wrong with that request. Please try again.