<s>[INST] How to factorize $2x^2-9x+9$ by completing the square? I know that $x^2-bx+c=(x-k)^2=x^2-2kx+k^2$ if it is a complete square. If not we create one by adding and subtracting $\left(\frac{b}{2}\right)^2$
I tried $$2\left(x^2-\frac{9}{2}x+\frac{9}{2}\right)=2\left(x^2-\frac{9}{2}x+\left(\frac{9/2}{2}\right)^2-\left(\frac{9/2}{2}\right)^2+\frac{9}{2}\right)$$
What am I missing and what is the best way to factorize when we have coefficients?(Is this the right term, ($a x^2$)?)
 [/INST] Make the polynomial equal to $0$ to find the roots so that you can factorise.
$$2x^2-9x+9=0$$
$$x^2-\frac{9x}{2}+\frac{9}{2}=0$$
$$x^2-\frac{9x}{2}=\frac{-9}{2}$$
To create a trinomial square on the left side of the equation, find a value that is equal to the square of half of b.
$$(\frac{b}{2})^2=(\frac{-9}{4})^2$$
Add the term to each side of the equation.
You get:
$$(x-\frac{9}{4})^2=\frac{9}{16}$$
$$x=\frac{9}{4} \pm \frac{3}{4}$$
$$\implies x=3,\frac{3}{2}$$
Hence, ($x$-$\frac{3}{2}$)($x$-$3$) is your answer.
</s>