As part of my research into quadratics, I am trying to show algebraically the following equation :
$${x^2-3\sqrt2 x + 4} = 0$$
alternatively shown as $x^2 - 3 \cdot 2^{\frac{1}{2}}x + 4 = 0$
Now, my question is... how is it possible for the above equation to end up as $\left(x-\dfrac{3}{\sqrt{2}}\right)^2 - \dfrac{1}{2} =0$
If it helps, inputting the above into wolframalpha may reduce the confusion.
$$ \begin{align} \left(x-\frac{3}{\sqrt{2}}\right)^2 - \frac{1}{2} &= \left(x-\frac{3}{\sqrt{2}}\right)\left(x-\frac{3}{\sqrt{2}}\right) - \frac{1}{2} \\ \\ &= x^2 - \frac{3}{\sqrt{2}}x - \frac{3}{\sqrt{2}}x + \frac{9}{2} - \frac{1}{2} \\ \\ &= x^2 - \frac{2\cdot 3}{\sqrt{2}}x + \frac{8}{2} \\ \\ &= x^2 - 3\sqrt{2}x + 4 \end{align} $$