Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

New exercise: Completing the square 1

  • Loading branch information...
commit 600eebb145dd9a24fb9fc649ca5bf551f3fe08bb 1 parent b18ce49
@smenks13 smenks13 authored marcia committed
Showing with 68 additions and 0 deletions.
  1. +68 −0 exercises/completing_the_square_1.html
View
68 exercises/completing_the_square_1.html
@@ -0,0 +1,68 @@
+<!DOCTYPE html>
+<html data-require="math polynomials expressions math-format">
+<head>
+ <meta charset="UTF-8" />
+ <title>Completing the square 1</title>
+ <script src="../khan-exercise.js"></script>
+</head>
+<body>
+ <div class="exercise">
+ <div class="problems">
+ <div id="original" data-weight="5">
+ <div class="vars">
+ <var id="X1">randRangeNonZero( -10, 10 )</var>
+ <var id="X2" data-ensure="X1 !== X2">randRange( -5, 5 ) * 2 + ( X1 % 2 )</var>
+ <var id="B">( X1 + X2 ) * -1</var>
+ <var id="C">X1 * X2</var>
+ <var id="POLY">new Polynomial( 0, 2, [C, B, 1], "x" )</var>
+ <var id="POLY_TEXT">POLY.text()</var>
+ </div>
+ <p class="question">Solve for <code>x</code> by completing the square.</p>
+ <p><code><var>POLY_TEXT</var> = 0</code></p>
+ <div class="solution" data-type="set">
+ <div class="set-sol"><var>X1</var></div>
+ <div class="set-sol"><var>X2</var></div>
+ <div class="input-format">
+ <p><code>x = \quad</code><span class="entry"></span> <code>\quad \text{or} \quad</code> <span class="entry"></span></p>
+ </div>
+ </div>
+
+ <div class="hints">
+ <div data-if="C !== 0">
+ <p>Begin by moving the constant term to the right side of the equation.</p>
+ <p><code>x^2 <span data-if="B !== 0"> + <var>B</var>x</span> = <var>C * -1</var></code></p>
+ </div>
+ <div data-if="B !== 0">
+ <p>We complete the square by taking half of the coefficient of our <code>x</code> term, squaring it, and adding it to both sides of the equation. Since the coefficient of our <code>x</code> term is <code><var>B</code></var>, half of it would be <code><var>B / 2</var></code>, and squaring it gives us <code>\color{blue}{<var>pow( B / 2, 2 )</var>}</code>.</p>
+ <p><code>x^2 + <var>B</var>x \color{blue}{ + <var>pow( B / 2, 2 )</var>} = <var>C * -1</var> \color{blue}{ + <var>pow( B / 2, 2 )</var>}</code></p>
+ </div>
+ <div data-if="B !== 0">
+ <p>We can now rewrite the left side of the equation as a squared term.</p>
+ <p><code>( x + <var>B / 2</var> )^2 = <var>C * -1 + pow( B / 2, 2 )</var></code></p>
+ </div>
+ <div>
+ <p>Take the square root of both sides.</p>
+ <p><code>x <span data-if="B !== 0"> + <var>B / 2</var></span> = <span data-if="sqrt( C * -1 + pow( B / 2, 2 ) ) !== 0">\pm</span><var>sqrt( C * -1 + pow( B / 2, 2 ) )</var></code></p>
+ </div>
+ <div data-if="B !== 0">
+ <p>Isolate <code>x</code> to find the solution(s).</p>
+ <p data-if="sqrt( C * -1 + pow( B / 2, 2 ) ) !== 0"><code>x = <var>-B / 2</var>\pm<var>sqrt( C * -1 + pow( B / 2, 2 ) )</var></code></p>
+ <p><code>x = <var>-B / 2 + sqrt( C * -1 + pow( B / 2, 2 ) )</var><span data-if="sqrt( C * -1 + pow( B / 2, 2 ) ) !== 0"> \text{ or } x = <var>-B / 2 - sqrt( C * -1 + pow( B / 2, 2 ) )</var></span></code></p>
+ </div>
+ <div data-else>
+ <p><code>x = <var>-B / 2 + sqrt( C * -1 + pow( B / 2, 2 ) )</var><span data-if="sqrt( C * -1 + pow( B / 2, 2 ) ) !== 0"> \text{ or } x = <var>-B / 2 - sqrt( C * -1 + pow( B / 2, 2 ) )</var></span></code></p>
+ </div>
+ </div>
+ </div>
+ <div id="one-root" data-type="original" data-weight="1">
+ <div class="vars">
+ <var id="X2">X1</var>
+ </div>
+ <div class="solution" data-type="multiple">
+ <p><code>x = \quad</code><span class="sol"><var>X1</var></span></p>
+ </div>
+ </div>
+ </div>
+ </div>
+</body>
+</html>
Please sign in to comment.
Something went wrong with that request. Please try again.