Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 82 lines (81 sloc) 4.912 kb
600eebb Scott Menke New exercise: Completing the square 1
smenks13 authored
1 <!DOCTYPE html>
2 <html data-require="math polynomials expressions math-format">
3 <head>
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
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>
7 <style type="text/css">
8 #answer_area .short input[type=text] {
9 width: 60px;
10 }
11 </style>
600eebb Scott Menke New exercise: Completing the square 1
smenks13 authored
12 </head>
13 <body>
4e4cb9b Ben Eater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
14 <div class="exercise">
15 <div class="problems">
16 <div id="original" data-weight="5">
17 <div class="vars">
18 <var id="X1">randRangeNonZero( -10, 10 )</var>
19 <var id="X2" data-ensure="X1 !== X2">randRange( -5, 5 ) * 2 + ( X1 % 2 )</var>
20 <var id="B">( X1 + X2 ) * -1</var>
21 <var id="C">X1 * X2</var>
22 <var id="POLY">new Polynomial( 0, 2, [C, B, 1], "x" )</var>
23 <var id="POLY_TEXT">POLY.text()</var>
24 </div>
25 <p class="question">Solve for <code>x</code> by completing the square.</p>
26 <p><code><var>POLY_TEXT</var> = 0</code></p>
27 <div class="solution" data-type="set">
28 <div class="set-sol"><var>X1</var></div>
29 <div class="set-sol"><var>X2</var></div>
30 <div class="input-format">
31 <p><code>x = \quad</code><span class="entry short"></span><code>\quad \text{or} \quad x = \quad</code><span class="entry short"></span></p>
32 </div>
33 </div>
34 </div>
35 <div id="one-root" data-type="original" data-weight="1">
36 <div class="vars">
37 <var id="X2">X1</var>
38 </div>
39 <div class="solution" data-type="multiple">
40 <p><code>x = \quad</code><span class="sol"><var>X1</var></span></p>
41 </div>
42 </div>
43 </div>
44 <div class="hints">
45 <div data-if="X1 !== X2" data-unwrap>
46 <div data-if="C !== 0">
47 <p>Begin by moving the constant term to the right side of the equation.</p>
48 <p><code>x^2 <span data-if="B !== 0"> + <var>B</var>x</span> = <var>C * -1</var></code></p>
49 </div>
50 <div data-if="B !== 0">
51 <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>
52 <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>
53 </div>
54 <div data-if="B !== 0">
55 <p>We can now rewrite the left side of the equation as a squared term.</p>
56 <p><code>( x + <var>B / 2</var> )^2 = <var>C * -1 + pow( B / 2, 2 )</var></code></p>
57 </div>
58 </div>
59 <div data-else data-unwrap>
60 <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>
61 <div>
62 <p>Thus, we can rewrite the left side of the equation as a squared term.</p>
63 <p><code>( x + <var>B / 2</var> )^2 = <var>C * -1 + pow( B / 2, 2 )</var></code></p>
64 </div>
65 </div>
66 <div>
67 <p>Take the square root of both sides.</p>
68 <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>
69 </div>
70 <div data-if="B !== 0">
71 <p>Isolate <code>x</code> to find the solution(s).</p>
72 <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>
73 <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>
74 </div>
75 <div data-else>
76 <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>
77 </div>
78 </div>
79 </div>
600eebb Scott Menke New exercise: Completing the square 1
smenks13 authored
80 </body>
c2cb4db Ben Alpert Whitespace :)
spicyj authored
81 </html>
Something went wrong with that request. Please try again.