I had a thought about another way to approach that ellipse and circles problem and thought I’d try it on a generalization. Suppose the circle is of arbitrary radius and sitting at an arbitrary point? (You can turn it into a unit radius just by rescaling, but let’s put the radius in explicitly. If nothing else it helps check for errors via dimensional analysis.)
This time instead of working with x and y let’s use the parametric equations
And now let’s write down the distance D between a point on the ellipse and the center (xc, yc) of the circle:
The idea here is that if D(t) has a local extremum at t=tt and if D(tt)=r (the radius of the circle) then tt corresponds to a tangent point. So the plan is to solve dD/dt=0 to get values of tt, and then solve D(tt)=r to get the relation between a and b required for tangency.
Well, easier said than done. The requirement dD/dt=0 leads to
which I think can be solved in the sense that it can be converted to a cubic in cos t. Ah, no thanks.
So how about a milder generalization? Keep the arbitrary radius and the arbitrary xc but require the circle to sit on the x axis: yc=0. In that case
(case [i]) or
(If sin t ≠0 and a2=b2, then the case [ii] formula doesn’t work. But if so, the ellipse is a circle, and dD/dt≠0 unless xc = 0: both circles are concentric and every point on the “ellipse” is equidistant from the center of the other circle, and to make that distance be r you have to make the two circles be identical, which isn’t really what I mean by a tangent ellipse. So I’ll only consider a2≠b2.)
For case [i], plug sin t=0 and cos t=±1 into the formula for D and set it equal to r, and the legal (positive) values for a are |xc+r| and |xc–r|. Obviously if a has either of these values then the left or the right end of the ellipse will be tangent to the circle. To find out if it’s exterior or interior requires checking whether the extremum is a minimum or a maximum, for which you need the sign of the second derivative. I haven’t gone there yet. It looks messy.
Case [ii] starts messy and gets messier, until a whole lot of cancellation happens and you’re left with a simple answer. The equation to be solved is
which turns into
and when you solve for a2 using the quadratic formula, amazingly everything under the radical sign except b4xc4 cancels and the result is
The minus sign just gives you a2=b2, which we saw above isn’t allowed for this case so we discard that, and the plus sign gives
which, if you set xc=r=1, reproduces the result I got previously. Note that this means if b2–r2 is negative then |xc| must be less than |b2–r2| to make a2 positive. This just says the y intercept of the circle, which is √(r2–xc2), must be greater than b for the ellipse to fit inside the circle. That is, if the ellipse is shorter (vertically) than the circle, then the circle must be close to centered on the origin in order to get two point tangency:
Here r is 5, b is 4, so |xc| must be less than 3 (and it’s about 2.9). Of course in the limit as the ellipse becomes infinitesimally narrow, xc approaches 3 with the tangent point going to (0, 4) and xc, the origin, and the tangent point approaching a right triangle.
Once again, for case [ii] generally, one has to test whether the extremum is a minimum or a maximum to determine if the tangent is interior or exterior. I wonder how horrible that is. I don’t want to find out right now.