Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

136 lines (133 sloc) 7.647 kB
<!DOCTYPE html>
<html data-require="math math-format">
<head>
<meta charset="UTF-8" />
<title>Dividing complex numbers</title>
<script src="../khan-exercise.js"></script>
</head>
<body>
<div class="exercise">
<div class="vars" data-ensure="B_REAL !== 0 || B_IMAG !== 0"> <!-- safeguard against division by zero -->
<var id="A_REAL">randRange( -5, 5 )</var>
<var id="A_IMAG">randRange( -5, 5 )</var>
<var id="B_REAL">randRange( -5, 5 )</var>
<var id="B_IMAG">randRange( -5, 5 )</var>
<var id="DENOMINATOR">B_REAL * B_REAL + B_IMAG * B_IMAG</var>
<var id="REAL_NUMERATOR">( A_REAL * B_REAL ) + ( A_IMAG * B_IMAG )</var>
<var id="IMAG_NUMERATOR">( A_IMAG * B_REAL ) - ( A_REAL * B_IMAG )</var>
<var id="REAL_FRACTION">fraction( REAL_NUMERATOR, DENOMINATOR, true, true )</var>
<var id="IMAG_FRACTION">fraction( IMAG_NUMERATOR, DENOMINATOR, true, true )</var>
<var id="ANSWER">complexFraction( REAL_NUMERATOR, DENOMINATOR, IMAG_NUMERATOR, DENOMINATOR )</var>
<var id="ANSWER_REAL_UNROUNDED">REAL_NUMERATOR / DENOMINATOR</var>
<var id="ANSWER_IMAG_UNROUNDED">IMAG_NUMERATOR / DENOMINATOR</var>
<var id="ANSWER_REAL">roundTo( 2, ANSWER_REAL_UNROUNDED )</var>
<var id="ANSWER_IMAG">roundTo( 2, ANSWER_IMAG_UNROUNDED )</var>
<var id="A_REP">complexNumber( A_REAL, A_IMAG )</var>
<var id="B_REP">complexNumber( B_REAL, B_IMAG )</var>
<var id="A_REP_COLORED">"\\color{" + ORANGE + "}{" + A_REP + "}"</var>
<var id="B_REP_COLORED">"\\color{" + BLUE + "}{" + B_REP + "}"</var>
<var id="A_REAL_COLORED">"\\color{" + ORANGE + "}{" + A_REAL + "}"</var>
<var id="A_IMAG_COLORED">"\\color{" + ORANGE + "}{" + A_IMAG + "}"</var>
<var id="B_REAL_COLORED">"\\color{" + BLUE + "}{" + B_REAL + "}"</var>
<var id="B_IMAG_COLORED">"\\color{" + BLUE + "}{" + B_IMAG + "}"</var>
<var id="B_CONJUGATE_IMAG">-B_IMAG</var>
<var id="B_CONJUGATE_IMAG_COLORED">"\\color{" + BLUE + "}{" + negParens( B_CONJUGATE_IMAG ) +"}"</var>
<var id="CONJUGATE">complexNumber( B_REAL, B_CONJUGATE_IMAG )</var>
<var id="CONJUGATE_COLORED">"\\color{" + BLUE + "}{" + CONJUGATE + "}"</var>
</div>
<div class="problems">
<div>
<p class="question">Divide the following complex numbers. You can round the real and imaginary parts of the result to 2 decimal digits.</p>
<p>
<code>\qquad \dfrac{<var>A_REP_COLORED</var>}{<var>B_REP_COLORED</var>}</code>
</p>
<div class="solution" data-type="complexNumberSeparate">
[ <var>ANSWER_REAL_UNROUNDED</var>, <var>ANSWER_IMAG_UNROUNDED</var> ]
</div>
<div class="hints">
<p>
Complex number division is converted to complex multiplication using the denominator's complex conjugate.
</p>
<p>
<code>\qquad \dfrac{<var>A_REP_COLORED</var>}{<var>B_REP_COLORED</var>} =
\dfrac{<var>A_REP_COLORED</var>}{<var>B_REP_COLORED</var>} \cdot
\dfrac{<var>CONJUGATE_COLORED</var>}{<var>CONJUGATE_COLORED</var>}
</code>
</p>
<div>
<p>
The denominator is simplified by <code>(a + b) \cdot (a - b) = a^2 - b^2</code>.
</p>
<code>
\qquad \dfrac{(<var>A_REP_COLORED</var>) \cdot (<var>CONJUGATE_COLORED</var>)}
{(<var>B_REP_COLORED</var>) \cdot (<var>CONJUGATE_COLORED</var>)} =
\dfrac{(<var>A_REP_COLORED</var>) \cdot (<var>CONJUGATE_COLORED</var>)}
{(<var>B_REAL_COLORED</var>)^2 - (\color{<var>BLUE</var>}{<var>B_IMAG</var>i})^2}
</code>
<p>
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.<br />
</p>
</div>
<div>
<p>
The squares in the denominator are evaluated and subtracted.
</p>
<p><code>
\qquad \dfrac{(<var>A_REP_COLORED</var>) \cdot (<var>CONJUGATE_COLORED</var>)}
{(<var>B_REAL_COLORED</var>)^2 - (<var>B_IMAG_COLORED</var>i)^2} =
</code></p>
<p><code>
\qquad \dfrac{(<var>A_REP_COLORED</var>) \cdot (<var>CONJUGATE_COLORED</var>)}
{<var>B_REAL * B_REAL</var> + <var>B_IMAG * B_IMAG</var>} =
</code></p>
<p><code>
\qquad \dfrac{(<var>A_REP_COLORED</var>) \cdot (<var>CONJUGATE_COLORED</var>)}
{<var>B_REAL * B_REAL + B_IMAG * B_IMAG</var>}
</code></p>
</div>
<div>
<p>
Afterwards, the numerator is multiplied using the distributive property.
</p>
<p><code>
\qquad \dfrac{(<var>A_REP_COLORED</var>) \cdot (<var>CONJUGATE_COLORED</var>)}
{<var>DENOMINATOR</var>} =
</code></p>
<p><code>
\qquad \dfrac{(<var>A_REAL_COLORED</var> \cdot \color{<var>BLUE</var>}{<var>negParens( B_REAL )</var>}) + (<var>A_IMAG_COLORED</var> \cdot \color{<var>BLUE</var>}{<var>negParens( B_REAL )</var>} i) + (<var>A_REAL_COLORED</var> \cdot \color{<var>BLUE</var>}{<var> B_CONJUGATE_IMAG_COLORED </var>}i) + (<var>A_IMAG_COLORED</var> \cdot \color{<var>BLUE</var>}{<var> B_CONJUGATE_IMAG_COLORED </var>} i^2)}
{<var>DENOMINATOR</var>}
</code></p>
<p>
All multiplications are evaluated.
</p>
<code>
\qquad \dfrac{(<var>A_REAL * B_REAL</var>) + (<var>A_IMAG * B_REAL</var>i) + (<var>A_REAL * B_CONJUGATE_IMAG</var>i) + (<var>A_IMAG * B_CONJUGATE_IMAG</var> i^2)}
{<var>DENOMINATOR</var>}
</code>
</div>
<div>
<p>
Finally, the fraction is simplified.
</p>
<code>
\qquad \dfrac{<var>A_REAL * B_REAL</var> + <var>A_IMAG * B_REAL</var>i + <var>A_REAL * B_CONJUGATE_IMAG</var>i - <var>A_IMAG * B_CONJUGATE_IMAG</var>}
{<var>DENOMINATOR</var>} =
\dfrac{<var>REAL_NUMERATOR</var> + <var>IMAG_NUMERATOR</var>i}
{<var>DENOMINATOR</var>} =
<var>ANSWER</var>
</code>
</div>
<div>
<p>
The real part of the result is <code><var>REAL_FRACTION</var></code>, which is (rounded to 2 decimal places) <code><var>ANSWER_REAL</var></code>.
</p>
<p>
The imaginary part of the result is <code><var>IMAG_FRACTION</var></code>, which is (rounded to 2 decimal places) <code><var>ANSWER_IMAG</var></code>.
</p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.