<s>[INST] $5x^2−10x+7$ in completed square form? I was studying quadratic equations and practicing to solve them using the technique of completing the squares. 
My answer was as follows: 
$$5x^2−10x=−7$$
$$5x^2−10x+25=18$$
$$x(x-5)^2−5(x-5)=18$$
$$\boldsymbol{(x-5)^2-18=0}$$ 
The answer in the book is: 
$$\boldsymbol{5(x-1)^2+2=0}$$ 
I'm confused. I just started with these sums today. Could you please tell me where I've gone wrong? 
 [/INST] Generally we look for a zero on the right side of the equation. This is standard form and allows everyone to work in the same way, consistently.
If we do not have an equation but just a quadratic polynomial, put it in normal descending order.
$5x^2−10x+7 = 0 \ \ $   is the standard equation form.
$P(x) = 5x^2−10x+7 \ \ $ is the standard polynomial form
Completing the square is the reverse of squaring a binomial. You should remember that  $(x-h)^2 = x^2 - 2hx + h^2$ and so $a(x-h)^2 = ax^2 - 2ahx + ah^2$
We want to work backwards from the right side to the left side. We start by identifying $a$, which is the coefficient of $x^2$.
In your problem, $5x^2−10x+7 = 0 \ \ $, $a = 5$
In the multiplication we multiplied by $a$ so here, working backwards we divide or factor out the $a$. It is a matter of choice whether you divide the constant term or not -- it needs to be adjusted later anyway.
$5(x^2 - 2x) + 7 = 0 \ \ $ OR $5(x^2 -2x + 7/5) = 0$
Now we need to identify the $h$. In the multiplication above the coefficient of the $x$ term (after removing $a$) was $-2h$. So $h$ = coefficient of x divided by $-2$. In your example, $h = (-2/-2) = 1
Finally in the perfect square multiplication above, there is an $h^2$ term. We need to add this in. 
But we need to balance the books. We can't just go sticking in a term out of nowhere. There are two general methods:
(a) If you have a quadratic equation $= 0 \ \ $ then you can add the same thing both sides, $h^2 = h^2$.
(b) In any form you can always add zero and the value will not change. The expression $h^2 - h^2$ is a fancy form of zero.
We found $h = 1$ so we add either $1^2 = 1^2$ or zero $= 1^2 - 1^2$. We add this inside the parenthesis because it will be part of the $(x - h)^2$ (If you add both sides be careful to have a factor of $a$ on the right to match the left.)
This adding $h^2$ is completing the square.
$5(x^2 - 2x + 1 - 1)  + 7 = 0 \ \ $ OR $5(x^2 -2x + 1 - 1 + 7/5) = 0$
Now we have a perfect square. We know it factors as a square because we built it that way. 
We separate out the remaining constant term and simplify.
$5(x^2 - 2x + 1) + 5( - 1)  + 7 = 0 \ \ $ OR $5(x^2 -2x + 1) + 5( - 1 + 7/5) = 0$
$5(x- 1)^2 -5  + 7 = 0 \ \ $ OR $5(x-1)^2 + 5( - 5/5 + 7/5) = 0$
$5(x- 1)^2 + 2 = 0 \ \ $ 
There is the same answer as your text and arrived at logically :-)
Study and learn this system.
</s>