$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? 
 A: Hint: In full generality, this is the technique for completing the square (we assume $a\neq0$, otherwise it's linear, not quadratic):
$$ax^2+bx+c=0$$
$$ax^2+bx = -c$$
$$4a(ax^2+bx)=-4ac$$
$$4a^2x^2+4abx = -4ac$$
$$(4a^2x^2+4abx) +b^2= (-4ac)+b^2$$
$$4a^2x^2+4abx + b^2 = b^2-4ac$$
$$(2ax + b)^2 = b^2-4ac$$
An easy way to remember this is that the goal is to construct the discriminant $b^2-4ac$ on the right side. You build it up in steps (look how the right side evolves at each stage).
A: Usually, if it's an equation, then we can divide both sides to get a quadratic term of the form $x^2$ instead of $ax^2$:
\begin{eqnarray*}
5x^2 -10x &=& -7 \\
x^2 - 2x &=& - \frac{7}{5} \\ \\
\left(x-1\right)^2-1 &=& -\frac{7}{5} \\ \\
\left(x-1\right)^2 &=& - \frac{2}{5}
\end{eqnarray*}
This has no real roots. You are welcome - because it's an equation - to multiply both sides by $5$:
$$5(x-1)^2 = -2 \implies 5(x-1)^2 + 2 = 0$$
This is a rather odd mixture of methods. If you're solving the equation $5x^2-10x=-7$ then you can solve from $(x-1)^2 = -\frac{2}{5}$ (allowing complex numbers). There's no need to re-introduce the factor of $5$. If you're completing the square on the expression $5x^2-10x+7$ then you can't just divide by $5$, and you need to take out common factors. Then you get 
$$5x^2-10x+7 \equiv 5(x-1)^2+2$$
A: $5x^2$ is not a term that can be used when completing a square. The leading coefficient (the number that the $x^2$ term is multiplied by) must be a square. Your best bet here would be to divide every term by 5. Then try to complete the square.
You should also get in the habit of checking your work. Multiply out $(x-5)^2$ and you will see it does not equal what you started with.
A: We know that $ax^2+bx+c=0$ and we want to get this form $a(x+d)^2+e=0$.
This is a shortcut: $d=\frac{b}{2a}$ and $e=c-\frac{b^2}{4a}$.
Then we know that $5x^2-10x+7=0$, here we can see that $a=5,b=-10,$ and $c=7$.
So we simply substitute and we get $d=\frac{-10}{2(5)}$ and $e= 7-\frac{(-10)^2}{4(5)}$.
Now we simplify and we get $d=-1$ and $e=7-5 \rightarrow 2$. So our final answer is:
$5(x-1)^2+2=0$.
The other way is by leaving the equation as :
$5x^2-10x+( )=-7$ now factor 5 and we get $5(x^2-2x+( ))=-7$
Then we can use the following information that $(\frac{b}{2})^2$=$(\frac{2}{2})^2=1$
So we get $5(x^2-2x+1-1)=-7$ we take out the -1 since we know that $(x^2-2x+1)=(x-1)^2$
we get $5(x^2-2x+1)-5=-7 \rightarrow 5(x-1)^2+2=0$.
A: 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.
