Complete the square:
The minimum locus of a squared function occurs where its residual vanishes. Hence the minimum is on , provided these points lie in the ellipse. Setting in the constraint gives , or . Thus
For the maximum, let . The ellipse gives
Also , whose absolute value is less than . Therefore . Equality is attained at , , giving
These attained bounds are global, not merely stationary-point tests. The minimizing locus is a parabola segment.
Figure 1.
Global extrema of the squared-residual quartic on an ellipse
. Contours show h inside the feasible ellipse. The blue parabola segment is the entire minimum set h = -6; the two marked boundary points attain the maximum 337/4. Details.