I read somewhere that you can get the coordinates for the peak of a quadratic equation by just rearranging the equation. I forgot how it was done though. Something like

$\displaystyle y=(x+p)^2+q$

is this correct? and how would you do for

$\displaystyle y=2x^2-4x+a^2-a$

? Thanks for any advice.