It sounds intimidating, doesn't it? Actually, there aren't that many steps; they're just weird. Ready?
Your function is:
f(X) = X² + 5X - 2
To complete the square, slide that final 2 over a little to make extra room...
f(X) = X² + 5X -2
...and then calculate the number that uses that room. You must first factor out the leading coefficient, if there is one. In this case, it's 1, so no problem. Continue by taking half of the middle value, in this case 5.
That gets you 5 / 2 = 2.5 Now square it:
2.5² = 6.25
Now, add that to your expression...and subtract it as well so you haven't actually done anything:
f(X) = X² + 5X + 6.25 -2 - 6.25 Now, simplify:
f(X) = X² + 5X + 6.26 -8.25 Why did we do that? To factor the first thre terms, and ignore the final one!
f(X) = (X + 2.5) (X + 2.5) -8.25 It's easier than it seems; remember that 2.5 we found? That number
will always be the one you get while factoring.
f(X) = (X + 2.5)² - 8.25 This means that h = -2.5, because it was in the form "X - h".
Also, k = -8.25. To pit it simply, you always get an opposite h to what you
see, but the k is always the same as it looks.
(h,k) = (-2.5 , -8.25)