
Let the center of $C1$ be $(x1,y1)$ and radius $r1$.
The center of $C2$ is $(x2,y2)$ and radius $r2$.
Z is the locus $(x,y)$.
The distance from $Z$ to the center of $C1$ is:
$$D1 = \sqrt{(x - x1)^2 + (y-y1)^2} \tag{1}$$
The closest point from $C1$ to $Z$ is extended from the radius.
The point on the perimeter is $P1$.
The distance from the perimeter of $C1$ to $Z$ is $L1$, from $P1$ to $Z$:
$$L1 = \left\lvert \sqrt{(x - x1)^2 + (y-y1)^2} - r1 \right\rvert \tag{2}$$
Similarly for $C2$:
$$L2 = \left\lvert \sqrt{(x - x2)^2 + (y-y2)^2} - r2 \right\rvert \tag{3}$$
$Z$ is at a distance ratio $e$ : $L1 = e L2$
$$\left\lvert \sqrt{(x - x1)^2 + (y-y1)^2} - r1 \right\rvert = e \left\lvert \sqrt{(x - x2)^2 + (y-y2)^2} - r2 \right\rvert \tag{4}$$
$(x1,y1) = (h,0)$ , $r1 = |a|$.
$(x2,y2) = (-h,0)$, $r2 = |b|$
The sign changes if $Z$ is inside the circle.
Let
$S1 = \sqrt{(x - x1)^2 + (y-y1)^2} \tag{5}$
$S2 = \sqrt{(x - x2)^2 + (y-y2)^2} \tag{6}$
For $Z$ outside both circles the absolute signs are both $+$.
$S1 - r1 = e(S2 - r2) \tag{7}$
$S1-e S2 = r1 - e r2 \tag{8}$
$(S1-e S2)^2 = (r1 - er2)^2 \tag{9}$
$S1^2 + e^2 S2^2 -2 e S1 S2 = (r1 - e r2)^2 \tag{10}$
$S1^2 + e^2 S2^2 - (r1 - e r2)^2 = 2 e S1 S2 \tag{11}$
$(S1^2 + e^2 S2^2 - (r1 - e r2)^2)^2 = 4 e^2 S1^2 S2^2 \tag{12}$
$(S1^2 + e^2 S2^2 - (r1 - e r2)^2)^2 - 4 e^2 S1^2 S2^2 = 0 \tag{13}$
Maxima code:
S1 : sqrt((x-x1)^2 + (y - y1)^2);
S2 : sqrt((x-x2)^2 + (y - y2)^2);
R : r1 - e*r2;
E1 : (S1^2 + e^2*S2^2 - R^2)^2 - 4*e^2*S1^2*S2^2;
E2 : expand(E1);
E3 : facsum(E2,y,y^2,y^3,y^4,x,x^2,x^3,x^4);
E4 : subst(b,r2,subst(a,r1,subst(0,y2,subst(-h,x2,subst(0,y1,subst(h,x1,E2))))));
E5 : facsum(E4,y,y^2,y^3,y^4,x,x^2,x^3,x^4);
tex(E5);
Finally with all the substitutions:
$$\left(e-1\right)^2\,\left(e+1\right)^2\,y^4+2\,\left(e-1\right)^2\,
\left(e+1\right)^2\,x^2\,y^2+4\,\left(e-1\right)\,\left(e+1\right)\,
\left(e^2+1\right)\,h\,x\,y^2+2\,\left(e^4\,h^2-2\,e^2\,h^2+h^2-b^2
\,e^4+2\,a\,b\,e^3-b^2\,e^2-a^2\,e^2+2\,a\,b\,e-a^2\right)\,y^2+
\left(e-1\right)^2\,\left(e+1\right)^2\,x^4+4\,\left(e-1\right)\,
\left(e+1\right)\,\left(e^2+1\right)\,h\,x^3+2\,\left(3\,e^4\,h^2+2
\,e^2\,h^2+3\,h^2-b^2\,e^4+2\,a\,b\,e^3-b^2\,e^2-a^2\,e^2+2\,a\,b\,e
-a^2\right)\,x^2+4\,\left(e-1\right)\,\left(e+1\right)\,h\,\left(e^2
\,h^2+h^2-b^2\,e^2+2\,a\,b\,e-a^2\right)\,x+\left(e\,h-h-b\,e+a
\right)\,\left(e\,h-h+b\,e-a\right)\,\left(e\,h+h-b\,e+a\right)\,
\left(e\,h+h+b\,e-a\right) = 0$$
Maxima can solve quartics:
Yall : solve(E5,y);
Y1 : part(Yall,1)^2;
Y2 : part(Yall,2)^2;
Y3 : part(Yall,3)^2;
Y4 : part(Yall,4)^2;
tex(Y1)$
tex(Y2)$
tex(Y3)$
tex(Y4)$
$$y^2={{2\,b\,e^2\,\sqrt{-4\,e^2\,h\,x+4\,h\,x+b^2\,e^2-2\,a\,b\,e+a^
2}-2\,a\,e\,\sqrt{-4\,e^2\,h\,x+4\,h\,x+b^2\,e^2-2\,a\,b\,e+a^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mean the general case is not a conic section?
For $a= 0$, $b = 0$
Maxima code:
E6: subst(0,b,subst(0,a,E5));
tex(E6);
$$\left(e-1\right)^2\,\left(e+1\right)^2\,y^4+2\,\left(e-1\right)^2\,
\left(e+1\right)^2\,x^2\,y^2+4\,\left(e-1\right)\,\left(e+1\right)\,
\left(e^2+1\right)\,h\,x\,y^2+2\,\left(e^4\,h^2-2\,e^2\,h^2+h^2
\right)\,y^2+\left(e-1\right)^2\,\left(e+1\right)^2\,x^4+4\,\left(e-
1\right)\,\left(e+1\right)\,\left(e^2+1\right)\,h\,x^3+2\,\left(3\,e
^4\,h^2+2\,e^2\,h^2+3\,h^2\right)\,x^2+4\,\left(e-1\right)\,\left(e+
1\right)\,h\,\left(e^2\,h^2+h^2\right)\,x+\left(e\,h-h\right)^2\,
\left(e\,h+h\right)^2 = 0$$
A circle is expected for the previous equation:
Try to fit the form : ${a}^2((y -y_0)^2 + (x-x_0)^2 - r^2)^2 = 0$ to it:
Expand this expression and equate the coefficients of each $x^ny^m$:
Maxima code (all variables are solved by calculation):
X1 : a^2*( (y - y0)^2 + (x - x0)^2 - r^2)^2;
X2 : expand(X1);
X3 : facsum(X2,y,y^2,y^3,y^4,x,x^2,x^3,x^4);
X4 : X3 - E6;
X5 : facsum(X4,y,y^2,y^3,y^4,x,x^2,x^3,x^4);
X6 : subst(0,y0,X5);
Yx0 : solve(part(X6,3),x0);
X7 : facsum(subst(part(Yx0,1,2),x0,X6),y,y^2,y^3,y^4,x,x^2,x^3,x^4);
Yr2 : solve(part(X7,1,6),[r^2]);
X8 : subst(part(Yr2,1,2),r^2,X7);
X9 : facsum(expand(X8),y,y^2,y^3,y^4,x,x^2,x^3,x^4);
Ya2 : solve(expand(part(X9,1,1)/a^2/y^4),[a^2]);
X10 : subst(part(Ya2,1,2),a^2,expand(X9));
X11 : facsum(expand(X10),y,y^2,y^3,y^4,x,x^2,x^3,x^4);
Yx0 : ratsimp(subst(part(Ya2,1,2),a^2,Yx0));
Yr2 : ratsimp(subst(part(Ya2,1,2)^2,a^4,Yr2));
EQN : y^2 + (x - part(Yx0,1,2))^2 = part(Yr2,1,2);
The substitutions were:
$$y0 = 0 \tag{14}$$
$${\it x_0}=-{{\left(e^2+1\right)\,h}\over{e^2-1}} \tag{15}$$
$$r^2={{4\,e^2\,h^2}\over{e^4-2\,e^2+1}} \tag{16}$$
$$a^2=e^4-2\,e^2+1 \tag{17}$$
The result equation is:
$$y^2+\left(x+{{\left(e^2+1\right)\,h}\over{e^2-1}}\right)^2={{4\,e^2
\,h^2}\over{e^4-2\,e^2+1}} \tag{18}$$
Centers $(h,0)$ and $(0,0)$ and inverting $\displaystyle e \rightarrow \frac1{e} \:$ produced the standard form:
$$\boxed{ y^2+\left(x+{{he^2}\over{1-e^2}}\right)^2={{e^2\,h^2}\over{(1 - e^2)^2}}} \tag{19}$$
Maxima centers $(0,0)$ $(h,0)$ , $eL1 = L2$
S1 : sqrt((x-x1)^2 + (y - y1)^2);
S2 : sqrt((x-x2)^2 + (y - y2)^2);
R : e*r1 - r2;
E1 : (e^2*S1^2 + S2^2 - R^2)^2 - 4*e^2*S1^2*S2^2;
E2 : expand(E1);
E3 : facsum(E2,y,y^2,y^3,y^4,x,x^2,x^3,x^4);
E4 : subst(b,r2,subst(a,r1,subst(0,y2,subst(0,x2,subst(0,y1,subst(h,x1,E2))))));
E5 : facsum(E4,y,y^2,y^3,y^4,x,x^2,x^3,x^4);
tex(E5);
E6: subst(0,b,subst(0,a,E5));
tex(E6);
X1 : a^2*( (y - y0)^2 + (x - x0)^2 - r^2)^2;
X2 : expand(X1);
X3 : facsum(X2,y,y^2,y^3,y^4,x,x^2,x^3,x^4);
X4 : X3 - E6;
X5 : facsum(X4,y,y^2,y^3,y^4,x,x^2,x^3,x^4);
X6 : subst(0,y0,X5);
Yx0 : solve(part(X6,3),x0);
X7 : facsum(subst(part(Yx0,1,2),x0,X6),y,y^2,y^3,y^4,x,x^2,x^3,x^4);
Yr2 : solve(part(X7,1,6),[r^2]);
X8 : subst(part(Yr2,1,2),r^2,X7);
X9 : facsum(expand(X8),y,y^2,y^3,y^4,x,x^2,x^3,x^4);
Ya2 : solve(expand(part(X9,1,1)/a^2/y^4),[a^2]);
X10 : subst(part(Ya2,1,2),a^2,expand(X9));
X11 : facsum(expand(X10),y,y^2,y^3,y^4,x,x^2,x^3,x^4);
Yx0 : ratsimp(subst(part(Ya2,1,2),a^2,Yx0));
Yr2 : ratsimp(subst(part(Ya2,1,2)^2,a^4,Yr2));
EQN : y^2 + (x - part(Yx0,1,2))^2 = part(Yr2,1,2);
tex(%);
$$y^2+\left(x-{{e^2\,h}\over{e^2-1}}\right)^2={{e^2\,h^2}\over{e^4-2 \,e^2+1}} \tag{20}$$