# Khan/khan-exercises

Older
100644 82 lines (81 sloc) 4 KB
 600eebb New exercise: Completing the square 1 smenks13 authored Nov 4, 2011 1 2 3 65eec09 Content-Type meta tag for libxml2 compatibility spicyj authored Jan 4, 2012 4 600eebb New exercise: Completing the square 1 smenks13 authored Nov 4, 2011 5 Completing the square 1 6 9061159 Add short class to input marcia authored Nov 9, 2011 7 600eebb New exercise: Completing the square 1 smenks13 authored Nov 4, 2011 12 13 14
15
16
17
18 randRangeNonZero( -10, 10 ) 19 randRange( -5, 5 ) * 2 + ( X1 % 2 ) 20 ( X1 + X2 ) * -1 21 X1 * X2 22 new Polynomial( 0, 2, [C, B, 1], "x" ) 23 POLY.text() 24
25

Solve for x by completing the square.

26

POLY_TEXT = 0

27
28
X1
29
X2
30
9061159 Add short class to input marcia authored Nov 9, 2011 31

600eebb New exercise: Completing the square 1 smenks13 authored Nov 4, 2011 32
33
34
35
36
37 X1 38
39
40

41
42
43
0256043 changed hint for one-root problem type, formatted answer input area smenks13 authored Nov 9, 2011 44
45
46
47

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

48

x^2 + Bx = C * -1

49
50
51

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 )}.

52

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

53
54
55

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

56

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

57
58
59
60

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.

61
62

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

63

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

64
65
66
67

Take the square root of both sides.

68

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

69
70
71

Isolate x to find the solution(s).

72

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

73

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

74
75
76

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

77
78
600eebb New exercise: Completing the square 1 smenks13 authored Nov 4, 2011 79
80 c2cb4db Whitespace :) spicyj authored Dec 8, 2011 81
Something went wrong with that request. Please try again.