Skip to content
This repository
Newer
Older
100644 76 lines (76 sloc) 4.785 kb
600eebb1 » smenks13
2011-11-04 New exercise: Completing the square 1
1 <!DOCTYPE html>
2 <html data-require="math polynomials expressions math-format">
3 <head>
4e4cb9b1 » beneater
2012-04-10 lint: tabs->spaces and jQuery->$ for exercises
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>Completing the square 1</title>
6 <script src="../khan-exercise.js"></script>
600eebb1 » smenks13
2011-11-04 New exercise: Completing the square 1
7 </head>
8 <body>
4e4cb9b1 » beneater
2012-04-10 lint: tabs->spaces and jQuery->$ for exercises
9 <div class="exercise">
10 <div class="problems">
11 <div id="original" data-weight="5">
12 <div class="vars">
13 <var id="X1">randRangeNonZero( -10, 10 )</var>
14 <var id="X2" data-ensure="X1 !== X2">randRange( -5, 5 ) * 2 + ( X1 % 2 )</var>
15 <var id="B">( X1 + X2 ) * -1</var>
16 <var id="C">X1 * X2</var>
17 <var id="POLY">new Polynomial( 0, 2, [C, B, 1], "x" )</var>
18 <var id="POLY_TEXT">POLY.text()</var>
19 </div>
20 <p class="question">Solve for <code>x</code> by completing the square.</p>
21 <p><code><var>POLY_TEXT</var> = 0</code></p>
22 <div class="solution" data-type="set">
23 <div class="set-sol"><var>X1</var></div>
24 <div class="set-sol"><var>X2</var></div>
25 <div class="input-format">
725121ff » beneater
2013-02-21 Consolidate answer input box width CSS so it doesn't leak between exe…
26 <p><code>x = {}</code><span class="entry short32"></span><code>\quad\text{or}\quad x = {}</code><span class="entry short32"></span></p>
4e4cb9b1 » beneater
2012-04-10 lint: tabs->spaces and jQuery->$ for exercises
27 </div>
28 </div>
29 </div>
30 <div id="one-root" data-type="original" data-weight="1">
31 <div class="vars">
32 <var id="X2">X1</var>
33 </div>
34 <div class="solution" data-type="multiple">
35 <p><code>x = \quad</code><span class="sol"><var>X1</var></span></p>
36 </div>
37 </div>
38 </div>
39 <div class="hints">
40 <div data-if="X1 !== X2" data-unwrap>
41 <div data-if="C !== 0">
42 <p>Begin by moving the constant term to the right side of the equation.</p>
43 <p><code>x^2 <span data-if="B !== 0"> + <var>B</var>x</span> = <var>C * -1</var></code></p>
44 </div>
45 <div data-if="B !== 0">
46 <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</var></code>, 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>
47 <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>
48 </div>
49 <div data-if="B !== 0">
50 <p>We can now rewrite the left side of the equation as a squared term.</p>
51 <p><code>( x + <var>B / 2</var> )^2 = <var>C * -1 + pow( B / 2, 2 )</var></code></p>
52 </div>
53 </div>
54 <div data-else data-unwrap>
55 <p>The left side of the equation is already a perfect square trinomial. The coefficient of our <code>x</code> term is <code><var>B</var></code>, half of it is <code><var>B / 2</var></code>, and squaring it gives us <code>\color{blue}{<var>pow( B / 2, 2 )</var>}</code>, our constant term.</p>
56 <div>
57 <p>Thus, we can rewrite the left side of the equation as a squared term.</p>
58 <p><code>( x + <var>B / 2</var> )^2 = <var>C * -1 + pow( B / 2, 2 )</var></code></p>
59 </div>
60 </div>
61 <div>
62 <p>Take the square root of both sides.</p>
63 <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>
64 </div>
65 <div data-if="B !== 0">
66 <p>Isolate <code>x</code> to find the solution(s).</p>
67 <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>
68 <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>
69 </div>
70 <div data-else>
71 <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>
72 </div>
73 </div>
74 </div>
600eebb1 » smenks13
2011-11-04 New exercise: Completing the square 1
75 </body>
c2cb4db0 » spicyj
2011-12-08 Whitespace :)
76 </html>
Something went wrong with that request. Please try again.