How to derive the equation of a parabola given a focus and a directrix not parallel to the x or y axis?

I was wondering if it is possible to derive a general form of a parabola given any focus and directrix.

So far all the materials I have come across only show the derivation for a parabola equation where the directrix is $x=c$ or $y=c$ for some constant $c$. And the only material I know that provides a general formula for a parabola is this article in wikipedia. But this relies on the general form of the conic equation.

I would like to derive the general equation of the parabola based on the definition of the parabola:

Let:

$d_1$ be the distance of a point on the parabola and its focus, $P(x_1,y_1)$

$d_2$ be the distance of a point on the parobola to its directrix, $y=mx+c$

$P(x,y)$ be any point on the parabola

So by definition of a parabola, \begin{align} d_1 &= d_2 \\ \sqrt{(x-x_1)^2 - (x-y_1)^2 } &= ??\end{align}

I can't proceed further as I don't know what to put for $d_2$ as all the textbook I consulted only have the directrix in the form of $x=c$ or $y=c$, which leads me to think that a derivation of the general parabola equation using this approach is impossible.

-
Do you know linear algebra? If so, the easiest way would be to find the equation of the parabola when the directrix is of the form $x=c$ (or $y=c$) and rotate the coordinate system. –  Étienne Bézout Oct 10 '13 at 14:33
In analytic geometry one studies the following formula for the point-line distance $$d=\frac {|ax_0+by_0+c|}{\sqrt{a^2+b^2}}$$ –  Tony Piccolo Oct 10 '13 at 14:42
@ÉtienneBézout I do know linear algebra. But like to solve it using this approach first. So I gather from your comment that this approach is feasible but tedious. Which part of it is tedious? –  mauna Oct 10 '13 at 14:44
@mauna I recall attempting your approach a few years ago in my linear algebra course, and I think it resulted in some equations which were rather tedious to solve. Also, if you try to take a general directrix on the form $y=mx+c$ you will not cover the case of vertical directrices. In your approach, it is probably best to write the directrix on the form $ax+by+c=0$ and follow Tony Piccolo's suggestion. –  Étienne Bézout Oct 10 '13 at 14:50
I would recommend equating the squares of the distances, which gets rid of the square roots and absolute values. Also the equation with the square root and two question marks looks a bit mixed up to me - I'm not sure what the left-hand side is supposed to be. –  Mark Bennet Oct 10 '13 at 15:59

Let:

d1 be the distance of a point on the parabola and its focus, P(x1,y1) d2 be the distance of a point on the parobola to its directrix, y=mx+c P(x,y) be any point on the parabola

So by definition of a parabola, d1(x−x1)2−(x−y1)2−−−−−−−−−−−−−−−−−√=d2=??

(Y-y1)=A(X-x1)^2 where A=the degree and direction of parabola i.e. -x^2 is downward

(y1,x1) is focus directrix is y=c=1/4A

Derived from all points equidistant from focus to any x,y and directrix, as formal definition of a parabola, from Pythagorean theorem

(X-a)^2+(Y-b)^2=(Y-c)^2

Separate y values to one side and expand

(X-a)^2=Y^2-Y^2+2Yb-2Yc-b^2+c^2 =2Y(b-c)-(b^2-c^2)

(X-a)^2=2Y(b-c)-((b-c)(b+c)) (X-a)^2/(2(b-c))=Y-(b+c). So A=1/2(b-c) and x1=a, y1=b and c=directrix

Kind of one way to do I guess. Sure there is less convoluted solution to it but once you understand this you will get better.

-