Permalink
Browse files

Merge and squash pull request #11316 from eltacodeldiablo/sci-nota-mu…

…lti-divide

Closes #11316

commit 7090ef7
Author: eltacodeldiablo <smiley.we@gmail.com>
Date:   Sun Jan 15 18:28:31 2012 -0500

    add in math-format util functions

commit ffc9e73
Author: eltacodeldiablo <smiley.we@gmail.com>
Date:   Sun Jan 15 18:09:43 2012 -0500

    changed multiply/divide hints
  • Loading branch information...
1 parent 0b0611d commit aa972a64fae98e546f5074c90bf3502d57627b03 @hzoo hzoo committed with beneater Mar 10, 2012
Showing with 97 additions and 0 deletions.
  1. +79 −0 exercises/multiplying_and_dividing_scientific_notation.html
  2. +18 −0 utils/math-format.js
@@ -0,0 +1,79 @@
+<!DOCTYPE html>
+<html data-require="math math-format">
+<head>
+ <meta charset="UTF-8" />
+ <title>Multiplying and Dividing Scientific Notation</title>
+ <script src="../khan-exercise.js"></script>
+</head>
+<body>
+ <div class="exercise">
+ <div class="vars">
+ <var id="DENOMINATOR">randRange( 1, 9 ) * Math.pow( 10, randRange( -5, 5 ) )</var>
+ <var id="QUOTIENT"> randRange( 1, 99 ) * Math.pow( 10, randRange( -5, 5 ) )</var>
+ <var id="NUMERATOR">DENOMINATOR * QUOTIENT</var>
+ </div>
+
+ <div class="problems">
+ <div id="divide">
+ <p class="question">
+ Express this quotient in scientific notation:
+ <code>\Large{\frac{<var>scientific( 3, NUMERATOR )</var>}
+ {<var>scientific( 1, DENOMINATOR )</var>}}</code></p>
+
+ <div class="solution" data-type="multiple">
+ <span class="sol base"><var>scientificMantissa( 2, QUOTIENT )</var></span>
+ <code> \times 10 </code>
+ <sup class="sol exp" style="width: 20px;"><var>scientificExponent( QUOTIENT )</var></sup>
+ </div>
+
+ <div class="hints">
+ <p>Start by collecting like terms together.</p>
+ <p><code>\Large{\frac{<var>scientificMantissa( 3, NUMERATOR )</var>}
+ {<var>scientificMantissa( 1, DENOMINATOR )</var>}}
+ \times\Large{\frac{10^{<var>scientificExponent( NUMERATOR )</var>}}
+ {10^{<var>scientificExponent( DENOMINATOR )</var>}}}</code></p>
+ <p>Then divide each term seperately. When dividing exponents with the same base, subtract their powers.</p>
+ <p><code><var>( scientificMantissa( 3, NUMERATOR ) / scientificMantissa( 1, DENOMINATOR ) ).toFixed( 2 )</var>
+ \times 10^{<var>scientificExponent( NUMERATOR )</var>\,-\,<var>scientificExponent( DENOMINATOR )</var>}</code></p>
+ <p><code><var>( scientificMantissa( 3, NUMERATOR ) / scientificMantissa( 1, DENOMINATOR ) ).toFixed( 2 )</var>
+ \times 10^{<var>scientificExponent( NUMERATOR ) - scientificExponent( DENOMINATOR )</var>}</code></p>
+ <div data-if="scientificExponent( QUOTIENT ) != scientificExponent( NUMERATOR ) - scientificExponent( DENOMINATOR )" data-unwrap>
+ <p> To write the answer correctly in scientific notation, the first number needs to be between 1 and 10. In this case, we need to multiply <var>current mantissa</var> by 10. </p>
+ <p> We split up the power of ten from the second term. </p>
+ <p><code>( <var>( scientificMantissa( 3, NUMERATOR ) / scientificMantissa( 1, DENOMINATOR ) ).toFixed( 2 )</var>
+ \times 10^{ 1 } ) \times 10^{<var>scientificExponent( NUMERATOR ) - scientificExponent( DENOMINATOR ) - 1</var>}</code></p>
+ <p><code><var>scientific( 2, QUOTIENT )</var></code></p></div>
+ </div>
+ </div>
+ <div id="multiply">
+ <p class="question">
+ Express this product in scientific notation:
+ <code>(<var>scientific( 2, QUOTIENT )</var>)\times (<var>scientific( 1, DENOMINATOR )</var>)</code></p>
+
+ <div class="solution" data-type="multiple">
+ <span class="sol base"><var>scientificMantissa( 3, NUMERATOR )</var></span>
+ <code> \times 10 </code>
+ <sup class="sol exp" style="width: 20px;"><var>scientificExponent( NUMERATOR )</var></sup>
+ </div>
+
+ <div class="hints">
+ <p>Start by collecting like terms together.</p>
+ <p><code>(<var>scientificMantissa( 2, QUOTIENT )</var>\times <var>scientificMantissa( 1, DENOMINATOR )</var>)
+ \times (10^{<var>scientificExponent( QUOTIENT )</var>}\times 10^{<var>scientificExponent( DENOMINATOR )</var>})</code></p>
+ <p>When multiplying exponents with the same base, add the powers together.</p>
+ <p><code><var>(scientificMantissa( 2, QUOTIENT ) * scientificMantissa( 1, DENOMINATOR ) ).toFixed( 1 )</var>
+ \times 10^{<var>scientificExponent( QUOTIENT )</var>\,+\,<var>scientificExponent( DENOMINATOR )</var>}</code></p>
+ <p><code><var>(scientificMantissa( 2, QUOTIENT ) * scientificMantissa( 1, DENOMINATOR ) ).toFixed( 1 )</var>
+ \times 10^{<var>scientificExponent( QUOTIENT ) + scientificExponent( DENOMINATOR )</var>}</code></p>
+ <div data-if="scientificExponent( NUMERATOR ) != scientificExponent( QUOTIENT ) + scientificExponent( DENOMINATOR )" data-unwrap>
+ <p> To write the answer correctly in scientific notation, the first number needs to be between 1 and 10. In this case, we need to multiply <var>current mantissa</var> by 10. </p>
+ <p> We split up the power of ten from the second term. </p>
+ <p><code>( <var>(scientificMantissa( 2, QUOTIENT ) * scientificMantissa( 1, DENOMINATOR ) ).toFixed( 1 )</var>
+ \times 10^{ 1 } ) \times 10^{<var>scientificExponent( QUOTIENT ) + scientificExponent( DENOMINATOR ) - 1</var>}</code></p>
+ <p><code><var>scientific( 3, NUMERATOR )</var></code></p></div>
+ </div>
+ </div>
+ </div>
+ </div>
+</body>
+</html>
View
@@ -511,5 +511,23 @@ jQuery.extend(KhanUtil, {
}
}
return ret;
+ },
+
+ scientificExponent: function( num ) {
+ return Math.floor(Math.log(Math.abs(num)) / Math.log(10))
+ },
+
+ scientificMantissa: function( precision, num ) {
+ var exponent = KhanUtil.scientificExponent( num );
+ var factor = Math.pow(10, exponent)
+ precision -= 1 // To account for the 1s digit
+ var mantissa = KhanUtil.roundTo(precision, num / factor).toFixed(precision)
+ return mantissa
+ },
+
+ scientific: function( precision, num ) {
+ var exponent = KhanUtil.scientificExponent( num )
+ var mantissa = KhanUtil.scientificMantissa( precision, num )
+ return "" + mantissa + "\\times 10^{"+exponent+"}"
}
});

0 comments on commit aa972a6

Please sign in to comment.