I've been following along a series of videos on Khan Academy for how to find a equation of a parabola given the directrix and focus. One of the problems reads like this:
Write the equation for a parabola with a focus at $(-8,-1)$ and a directrix at $y=-4$.
The solution that they propose is picking any point $P = (x, y)$ on the parabola and using the fact that the distance of $P$ to the focus is the same as the distance from $P$ to the directrix :
The distance between $(x,y)$ and $(-8,-1)$ is $\sqrt{(x+8)^2+(y+1)^2}$
Similarly, the distance between $(x,y)$ and the line $y=-4$ is $\sqrt{(y+4)^2}$
Deriving the formula by equating the distances
$\sqrt{(y+4)^2}$ = $\sqrt{(x+8)^2+(y+1)^2}$ = ...
Now, I was wondering why do we pick an abstract point $(x, y)$? As when we know the directrix and the focus, we can find the the vertex, in this case $(-8, -2.5)$ and make use of that fact.
I googled around a bit and found other videos about the same concept, but they use a different formula which seems to make use of the vertex:
$(y - k)^2 = 4a(x-h)$
$(x-h)^2 = 4a(y-k)$
Where is that formula coming from and what's the difference between the two approaches? In the end, they should result in the same equation I suppose.
Yes, you are correct that they would result in the same equation. In the case of parabolas that have directrices that are parallel to one of the axes, you would think that the second method is better because in the first equation we have squares and roots and large expressions on both sides.
But the reason the second method was introduced in at this stage is to make the expression of the parabola look beautiful and easy on the eyes that can be directly obtained if we know the vertex and directrix. The second equation (of the general form $y^2=4ax$) is the equation you would get on simplifying the first in case the vertex is at the origin and the directrix is parallel to the $y$ axis where $a$ is equal to the half the distance between focus and directrix.
But suppose the parabola has the directrix as $x+y=0$ and you know the vertex is $(1,1)$ and focus $(2,2)$, is it possible to find the equation by the second method?
Hence we have the first method that is the basic form which is directly the mathematical equation stating the definition of a parabola. We do the same thing there, Find the locus by taking $(x,y)$ and equating the distance of it from focus and the perpendicular distance from the line $x+y=0$. Although this would be rarely encountered in school life but it is always better to remember the basics to stay on the safe side.