I am trying to find a general method for calculating the shortest distance between an arbitrary point and an arc, where the arc is a 90 degree portion of an ellipse's boundary, and the ellipse's axes are both aligned to the Cartesian axes. I'm working in 2D, so both the point and the ellipse are coplanar. If the point is in the same quadrant as the arc, relative to the centre of the ellipse, then I believe that the problem is the same as calculating the distance from a point to anywhere on the whole ellipse's boundary, for which there are fairly straightforward methods (e.g. http://www.geometrictools.com/Documentation/DistancePointEllipseEllipsoid.pdf).
In the diagram, if the point is to the left of x1 or to the right of x2 or below y1, then the problem is straight forward.
However, I can't figure out what to do if the point P is as shown in the diagram.