I've been stuck on this for the past few hours. For context, you can refer to this thread, and in particular this answer which makes sense, but skips over all the steps.
How does
$5x^2-4Nx+2N^2=$
Become
$5(x-\frac{2N}{5})^2+\frac{6N^2}{5}$?
I've been stuck on this for the past few hours. For context, you can refer to this thread, and in particular this answer which makes sense, but skips over all the steps.
How does
$5x^2-4Nx+2N^2=$
Become
$5(x-\frac{2N}{5})^2+\frac{6N^2}{5}$?
On
$$5x^2-4Nx+2N^2 = 5(x^2-\frac{4N}{5}x) \;+ 2N^2$$ Now, you add the square of half the $\frac{4N}{5}x$ term, without the $x$. But you also subtract it to balance the equation on the outside (Remember the 5 on the outside of the parentheses) $$5(x^2-\frac{4N}{5}x \;+(\frac{4N}{10})^2)\;+2N^2-5(\frac{4N}{10})^2$$ $$5(x-\frac{4N}{10})^2\;+2N^2-5(\frac{4N}{10})^2$$ Simplifying, $$5(x-\frac{2N}{5})^2+\frac{6N^2}{5}$$
First let $P(x)$ be the polynomial you want,then we can factor out of the 5 $$P(x)=5\left(x^2-\frac45Nx+\frac25N^2\right)=5\left(x^2-2\cdot\frac25Nx+\frac25N^2\right)$$ Now since $$(a+b)^2=a^2+2ab+b^2$$ So $$P(x)=5\left(\underbrace{x^2-2\cdot\frac25 Nx\color{red}{+\frac4{25}N^2}}_{\left(x-\frac{2N}{5}\right)^2}\color{red}{-\frac4{25}N^2}+\frac25N^2\right)=5\left(\left(x-\frac{2N}5\right)^2+\frac6{25}N^2\right)\\\boxed{P(x)=5\left(x-\frac{2N}{5}\right)^2+\frac65N^2}$$