Solution (source code)

= Solution

Eliminate $z$ using the constraint: $z=x-x^2-y^2$. The restricted objective is the <quadratic polynomial> $F(x,y)=axy+x-x^2-y^2$, with constant <Hessian matrix>
$$
H=\begin{pmatrix}-2&a\\a&-2\end{pmatrix}.
$$
Its <eigenvalues> are $-2+a$ and $-2-a$. Hence
$$
\boxed{|a|<2:\text{ strict constrained maximum};\qquad |a|>2:\text{ constrained saddle}.}
$$
For $|a|<2$, both <eigenvalues> are negative and the <quadratic polynomial> is strictly concave, so the maximum is global on the entire constraint surface. For $|a|>2$, the opposite signs give increasing and decreasing directions. At $a=\pm2$ there is no <stationary point>, as already found, rather than a degenerate extremum to classify. No parameter value produces a constrained <local minimum>.