Game Development Reference
In-Depth Information
Completing the Square
Working with the basic form of the quadratic equation the previous section
afforded, you gain some sense of what it is to complete the square of an expres-
sion to solve a quadratic equation. For starters, recall that these two equations
represent standard forms of polynomials that incorporate squares:
2
¼ a 2
þ 2 ab þ b 2
ða þ bÞ
2
¼ a 2
2 ab þ b 2
ða bÞ
Generally, completing the square begins with examining an equation to discover
whether you can rewrite it in a way that allows you to make a perfect square on
the left side of the equal sign. To understand how this works, consider the
following equation:
a 2
6 a 12 ¼ 0
This is a standard quadratic equation. To make it so that it represents the square
of two expressions, you begin by considering the first two terms. The first term is
a square. The second term might represent the combined square roots of two
squares. (The variable a , for example, is the square root of a 2 .) The third term,
however, does not easily fit into this scheme. For this reason, you move 12 to the
right side of the equal sign:
a 2
6 a ¼ 12
You then find a term that you can add to the left side of the equation that allows
you to create a perfect square. To arrive at this number, you use an expression you
derive from the standard form of the quadratic equation. Accordingly, the second
term of the standard equation is bx. If you divide b , the coefficient of x , by 2 and
square the result, then you arrive at an expression that completes the square. Here
is how this approach unfolds for the equation at hand:
2
2
6
2
6
2
a 2
6 a þ
¼ 12 þ
Add half the coefficient squared
:
a 2
6 a þ 3 2
¼ 12 þ 3 2
a 2
6 a þ 9 ¼ 12 þ 9
a 2
6 a þ 9 ¼ 21
2
ða 3 Þ
¼ 21
Search WWH ::




Custom Search