Solution (source code)

= Solution

The continuous <function> attains a global maximum and minimum on the closed disc by the <extreme value theorem>. All four unconstrained <stationary points> have squared distance eight, so none lies in its interior. The extrema must therefore lie on $x^2+y^2=6$.

The constraint <gradient> is nonzero on that circle, so <Lagrange multipliers> apply:
$$
\frac{x^2}4-1=2\lambda x,\qquad\frac{y^2}4-1=2\lambda y.
$$
Subtracting gives $(x-y)((x+y)/4-2\lambda)=0$. If $x=y$, the constraint gives $x=y=\pm\sqrt3$. Otherwise $2\lambda=(x+y)/4$; substitution into either equation gives $xy=-4$. This is impossible, since $|xy|\leq(x^2+y^2)/2=3$ on the circle. Thus the diagonal points are the only candidates. Comparing their values gives
$$
\boxed{\min f=-\frac{3\sqrt3}{2}\text{ at }(\sqrt3,\sqrt3),\qquad\max f=\frac{3\sqrt3}{2}\text{ at }(-\sqrt3,-\sqrt3).}
$$