Take a look at the works of beauty possible inside of the Demos Graphing Calculator. Of course, I do not take credit for any of these:
Keep searching! There are good ones that we haven't seen yet!
I didn't know that a formula existed either, so I derived it myself. Here's how I derived it. I will warn that hairy algebra is coming. I thought that I would skip that part to answer the question, but you, Cphill, seem interested!
A parabola can be defined as an infinite set of points that is equidistant from a point (the focus) and a line (the directrix). Here is a picture. I think it is hard to visualize and understand without it:
I couldn't find a diagram where the directrix equation is y=k, but that's OK. I'll just use what it in the picture:
My goal now is to find an equation for the focus where its coordinates lie on (a,b) and the directrix where it lies on y=c. Let's do it to derive that equation I used in my answer.
In the diagram above, I marked one arbitrary point on the parabola with coordinates (x,y). Of course, as I mentioned before, this point must be equidistant from the focus and from the directrix because of the definition of a parabola. What does that mean? It means that the distance from (x,y), our arbitrary point, to the directrix and to the focus is the same. Let's calculate the distance from the focus to the directrix first. We'll use the distance formula:
\(d=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}\) | Of course, this is the distance formula. Let's plug in the points of our arbitrary point and the directrix. |
\(d=\sqrt{(x-x)^2+(y-c)^2}\) | The arbitrary point meets the directrix perpendicularly when measuring distance, so the x-coordinates are going to cancel out. |
\(d=\sqrt{0^2+(y-c)^2}\) | |
\(d=\sqrt{(y-c)^2}\) | Yes, I could simplify further, but I am going to leave this as is for now. |
Now, let's calculate the distance from the arbitrary point, (x,y) to the focus (a,b). Let's use the distance formula for this, too:
\(d=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}\) | Just like above, this is the distance formula. Let's plug in the values. |
\(d=\sqrt{(x-a)^2+(y-b)^2}\) | This cannot be simplified any further |
Remember what I mentioned earlier? These distances must be equal for a parabola to be a parabola; it defines a parabola. Therefore, \(\sqrt{(y-c)^2}=\sqrt{(x-a)^2+(y-b)^2}\). Technically, I could stop here and say that this is the formula, but we can simplify this. Also, I wanted it to be in the equation of a parabola, which means I would have to solve for y. Let's do this:
\(\sqrt{(y-c)^2}=\sqrt{(x-a)^2+(y-b)^2}\) | This is what was deduced above. Let's square both sides to get rid of the radical |
\((y-c)^2=(x-a)^2+(y-b)^2\) | My goal is to solve for y. Let's expand the terms that contain a y in them. Of course, I'll use the rule that says that \((a-b)^2=a^2-2ab+b^2\). |
\(y^2-2yc+c^2=(x-a)^2+y^2-2yb+b^2\) | Look at that! The y^2 terms cancel out! Subtract y^2 on both sides of the equation. |
\(-2yc+c^2=(x-a)^2-2yb+b^2\) | Let's get the c^2 term on the right of the equation. Subtract c^2 on both sides |
\(-2yc=(x-a)^2-2yb+b^2-c^2\) | Add -2yb to both sides so that the terms containing a y are on the left and all the terms that do not are on the right. |
\(2yb-2yc=(x-a)^2+b^2-c^2\) | Factor out a y in both terms on the left hand side. |
\(y(2b-2c)=(x-a)^2+b^2-c^2\) | Divide by (2b-2c) on both sides |
\(y=\frac{(x-a)^2+b^2-c^2}{2b-2c}\) | I'll split off the \(b^2-c^2 \) from the fraction so I can simplify it separately. |
\(y=\frac{(x-a)^2}{2b-2c}+\frac{b^2-c^2}{2b-2c}\) | The GCF of 2b-2c is 2. Factor it out. |
\(y=\frac{(x-a)^2}{2(b-c)}+\frac{b^2-c^2}{2(b-c)}\) | I'll split up b^2-c^2 by using the rule that \(a^2-b^2=(a+b)(a-b)\). |
\(y=\frac{(x-a)^2}{2(b-c)}+\frac{(b+c)(b-c)}{2(b-c)}\) | In the term \(\frac{(b+c)(b-c)}{2(b-c)}\). The (b-c) will cancel out. |
\(y=\frac{(x-a)^2}{2(b-c)}+\frac{b+c}{2}\) | This equation should look familiar. Yes, it is the equation I used to calculate the equation of the parabola. Just replace the c's with k's. |
Well, now we have an equation that will always find the equation of a parabola when only the directrix and focus are given. As you can see, there was much more to this problem than what I originally showed.