I am want to derive some of the equations for parabolas with vertex at (h,k). I wrote the equation below directly from the definition. I'm having a hard time obtaining any of the standard forms for parabolas from this definition. For example: y = a(x-h)^2 +K is one such equation I would like to derive. I need to know if I'm setting this up right.

$\displaystyle p=\sqrt{(x-h)^2+[y-(k+p)]^2}$

$\displaystyle p^2=(x-h)^2+y^2-2y(k+p) + (k+p)^2$

$\displaystyle (x-h)^2=-y^2+2yk-k^2+2p(y-k)$

$\displaystyle (x-h)^2=-(y-k)^2+2p(y-k)$

As you can see I'm having trouble converting this into either form:

$\displaystyle (x-h)^2=4p(y-k)$

$\displaystyle y=a(x-h)^2+k$

Where a =1/4p