>>14383305Your ellipse is just a circle of radius 1 that is re-scaled by 1/2 in some direction.
The operation of re-scaling by 1/2 in some direction is accomplished by the matrix, T=R^(-1)*diag(1/2,1)*R where R is a rotation matrix.
Let R= [cos(t), sin(t); -sin(t), cos(t)].
R maps the vector <cos(t),sin(t)> to <1,0>, diag(1/2,1) re-scales along the x axis by 1/2, R^(-1) rotates back so that the net effect is a re-scaling along <cos(t),sin(t)> by 1/2.
This gives T = [3/4 - cos(2t)/4, -sin(2t)/4; -sin(2t)/4, 3/4 + cos(2t)/4]
Finding T^(-1) allows us to find which vectors map to the x and y axis.
T^(-1) = [3/2 + cos(2t)/2, sin(2t)/2; sin(2t)/4, 3/2 + cos(2t)/2].
So x' = <3/2 + cos(2t)/2, sin(2t)/2> maps to <1,0> and y' = <sin(2t)/4, 3/2 + cos(2t)/2> maps to <0,1>.
Consider the lines span{x'} and span{y'}.
We want to place our circle of radius 1 between these lines so that it is tangent to both.
The points of contact will be the points that touch the x and y axes after re-scaling.
Let phi be the angle between the two vectors. cot(phi/2) is the distance from the origin where the circle touches each line.
cot(phi/2)/|x'| is the point where the ellipse touches the x axis.
Using the dot product for x' and y' (normalized) gives:
cos(phi) = 3sin(2t)/sqrt(25-9cos(2t)^2)
sin(phi) = 4/sqrt(25-9cos(2t)^2)
cot(phi) = 3sin(2t)/4
cot(phi/2) = 3sin(2t)/4 + sqrt( (3sin(2t)/4)^2 + 1 )
|x'| = sqrt(5/2 + 3cos(2t)/2)
letting cos(2t) = X, the problem reduces to maximizing [(3/4)sqrt(1-X^2) + (1/4)sqrt(25 - 9X^2)]/sqrt(5/2 + 3X/2) for X in [-1,1]