publicKhan/khan-exercises

Subversion checkout URL

You can clone with HTTPS or Subversion.

Older
100644 76 lines (76 sloc) 4.785 kb
  600eebb1 » smenks13  2011-11-04 New exercise: Completing the square 1 1 2 3  4e4cb9b1 » beneater  2012-04-10 lint: tabs->spaces and jQuery->$for exercises 4 5 Completing the square 1 6  600eebb1 » smenks13  2011-11-04 New exercise: Completing the square 1 7 8  4e4cb9b1 » beneater  2012-04-10 lint: tabs->spaces and jQuery->$ for exercises 9
10
11
12
13 randRangeNonZero( -10, 10 ) 14 randRange( -5, 5 ) * 2 + ( X1 % 2 ) 15 ( X1 + X2 ) * -1 16 X1 * X2 17 new Polynomial( 0, 2, [C, B, 1], "x" ) 18 POLY.text() 19
20

Solve for x by completing the square.

21

POLY_TEXT = 0

22
23
X1
24
X2
25
 725121ff » beneater  2013-02-21 Consolidate answer input box width CSS so it doesn't leak between exe… 26

 4e4cb9b1 » beneater  2012-04-10 lint: tabs->spaces and jQuery->\$ for exercises 27
28
29
30
31
32 X1 33
34
35

36
37
38
39
40
41
42

Begin by moving the constant term to the right side of the equation.

43

x^2 + Bx = C * -1

44
45
46

We complete the square by taking half of the coefficient of our x term, squaring it, and adding it to both sides of the equation. Since the coefficient of our x term is B, half of it would be B / 2, and squaring it gives us \color{blue}{pow( B / 2, 2 )}.

47

x^2 + Bx \color{blue}{ + pow( B / 2, 2 )} = C * -1 \color{blue}{ + pow( B / 2, 2 )}

48
49
50

We can now rewrite the left side of the equation as a squared term.

51

( x + B / 2 )^2 = C * -1 + pow( B / 2, 2 )

52
53
54
55

The left side of the equation is already a perfect square trinomial. The coefficient of our x term is B, half of it is B / 2, and squaring it gives us \color{blue}{pow( B / 2, 2 )}, our constant term.

56
57

Thus, we can rewrite the left side of the equation as a squared term.

58

( x + B / 2 )^2 = C * -1 + pow( B / 2, 2 )

59
60
61
62

Take the square root of both sides.

63

x + B / 2 = \pmsqrt( C * -1 + pow( B / 2, 2 ) )

64
65
66

Isolate x to find the solution(s).

67

x = -B / 2\pmsqrt( C * -1 + pow( B / 2, 2 ) )

68

x = -B / 2 + sqrt( C * -1 + pow( B / 2, 2 ) ) \text{ or } x = -B / 2 - sqrt( C * -1 + pow( B / 2, 2 ) )

69
70
71

x = -B / 2 + sqrt( C * -1 + pow( B / 2, 2 ) ) \text{ or } x = -B / 2 - sqrt( C * -1 + pow( B / 2, 2 ) )

72
73
74
 600eebb1 » smenks13  2011-11-04 New exercise: Completing the square 1 75  c2cb4db0 » spicyj  2011-12-08 Whitespace :) 76
Something went wrong with that request. Please try again.