Given that $x^2-3x+5=(x-p)^2+q$ for all values of $x$, calculate the value of $p$ and of $q$.
A book example tells me to firstly convert the L.H.S to the form of the R.H.S by completing the square.
How to convert it? Can anyone explain me how to do it? Can you show me the steps? HELP!
You always have to take half of the linear coefficient, put that in the bracket and subtract the square of half the coefficient to make up for it:
$$\begin{align} x^2\color{red}{-3}x+5 &=\left(x+\frac{\color{red}{-3}}{2}\right)^2-\left(\frac{\color{red}{-3}}{2}\right)^2+5\\ &=\left(x-\frac{3}{2}\right)^2 - \frac{9}{4} + \frac{20}{4}\\ &=\left(x-\frac{3}{2}\right)^2+\frac{11}{4} \end{align} $$
The reason for this is the binomial formula:
$$(x+\color{red}{a})^2=x^2+2\color{red}{a}x+\color{red}{a}^2$$