If you want to look just at equations of the form
$$ \frac{x^2}{a^2} \pm \frac{y^2}{b^2} = 1, $$
you can omit some of the work is involved in answering questions such as
Prove that the directrix-focus and focus-focus definitions are equivalent
in equations, and the work involved in many other questions and answers on MSE that deal with general equations of ellipses and hyperbolas.
In choosing this form of the equation you are looking only at an ellipse or hyperbola whose center is at the origin of coordinates. In the case of a hyperbola or an ellipse with $a > b,$ the focus (the point $F$) is on the $x$-axis and the directrix (the line $r$) is parallel to the $y$-axis.
In the case of an ellipse with $a < b$ the focus is on the $y$-axis and the directrix is parallel to the $x$-axis.
This is a limited kind of "equivalence" that applies only to special cases of the focus-directrix definition.
A procedure that we might follow to explore this relationship is:
- Choose a sign of $\pm$ and values of $a$ and $b$.
- Somehow obtain (from first principles, from other knowledge, or simply "guessing") an appropriate focus $F$, directrix $r$, and eccentricity $e$.
- Express the relationship $PF = e(Pr)$ in terms of the $x$ and $y$ coordinates of $P$, the coordinates of $F$, the equation of $r$, and $e.$
- Show that this relationship is equivalent to the equation $ \frac{x^2}{a^2} \pm \frac{y^2}{b^2} = 1 $ for the chosen sign of $\pm$ and values of $a$ and $b.$
Another useful procedure might be:
- Somehow obtain a focus $F$, directrix $r$, and eccentricity $e$ that produce a hyperbola or ellipse satisfying the conditions mentioned above.
- Express the relationship $PF = e(Pr)$ in terms of the $x$ and $y$ coordinates of $P$, the coordinates of $F$, the equation of $r$, and $e.$
- Reduce this relationship to an equation of the form $\frac{x^2}{a^2} \pm \frac{y^2}{b^2} = 1$ for some sign of $\pm$ and some values of $a$ and $b.$
In either case, during the "somehow obtain" step, it's legitimate to look some things up in other sources, such as the formula for $e$ in terms of $a$ and $b.$ That kind of information can serve as your "guess" which you will show was a correct "guess" in the subsequent steps.
For the second approach, let's try the line $x = h$ as the directrix and the point $(f,0)$ as the focus where $0 < f < h.$
A little investigation of the focus-directrix definition of a conic should convince you that with this arrangement of focus and directrix,
the $x$-axis will be an axis of the conic and the conic will intersect the $x$-axis twice.
We want the center of the conic at $(0,0),$ so we want these two intersections with the $x$-axis to be at two symmetric points, call them
$P_1 = (a,0)$ and $P_2 = (-a,0)$ where $a > 0.$
One of the points of a conic is always between the focus and directrix, so we have $f < a < h$.
it follows that $P_1F = a - f$ and $P_1r = h - a.$
By the focus-directrix definition, $$a - f = e(h - a).$$
On the other hand, $P_2F = a + f$ and $P_2r = h + a.$
So $$a + f = e(h + a).$$
Subtracting one equation from the other, $2f = 2ea,$ or
$$ e = \frac fa, $$
which actually is a classic formula that we could just have looked up;
but we can also add the two equations to get
$ 2a = 2eh, $ or more simply
$$ a = eh. $$
For the general point $P = (x,y)$ on the conic, which is not (always) on the $x$-axis, the formula for $PF$ is $\sqrt{(x - f)^2 + y^2}$
and the formula for $Pr$ is $\lvert h - x\rvert$.
So we have
$$ \sqrt{(x - f)^2 + y^2} = e \lvert h - x\rvert. $$
Since both sides are already positive, we can square both sides without introducing any extraneous "solutions":
$$ (x - f)^2 + y^2 = e^2 (h - x)^2. $$
Expand both sides:
$$ x^2 - 2fx + f^2 + y^2 = e^2 h^2 - 2 e^2 hx + e^2 x^2. $$
Recalling that $eh = a$ and $e = \frac fa,$ we have
$e^2 h^2 = a^2$ and $e^2 h = \frac fa a = f,$ so the equation above simplifies as follows:
\begin{align}
x^2 - 2fx + f^2 + y^2 &= a^2 - 2 fx + e^2 x^2, \\
x^2 - e^2 x^2 + y^2 &= a^2 - f^2, \\
(1 - e^2) x^2 + y^2 &= (1 - e^2)a^2, \\
\frac{x^2}{a^2} + \frac{y^2}{(1 - e^2)a^2} &= 1, \\
\end{align}
and now all that remains is to realize that we can set
$b = a \sqrt{1 - e^2}$ and the equation is in the desired form.
For a hyperbola, we start with a similar setup except that in this case
$0 < h < a < f.$