What is the best way to solve the following optimization problem without blinding guessing values for $x,y$?
$$\begin{array}{ll} \text{maximize} & xy+(38-x)(32-y)\\ \text{subject to} & 1 \leq x, y \leq 37\\ & x, y \in \mathbb Z\end{array}$$
Usually I would try completing the square or using the AM-GM inequality, but both methods don't seem to work here. Help would be greatly appreciated. The question should be answered without using calculus.
Let us first relax the integrality constraints and optimize over the reals.
Note that the only 2nd order term in the objective function
$$f (x, y) := x y + (38-x)(32-y)$$
is the bilinear term $2 x y$. Hence, function $f$ is indefinite and, thus, the maximum should be attained at the boundary of the feasible region $[1,37] \times [1,37]$. Do note that the gradient of $f$ does vanish at $(x,y) = (19,16)$, which is in the interior of the feasible region $[1,37] \times [1,37]$, but that is a saddle point, not a maximum.
Evaluating $f$ on the line segment $\{ (x,1) \mid x \in [1,37] \}$, we obtain an affine function
$$f (x,1) = -30 x + 38 \cdot 31$$
Evaluating $f$ on the other $3$ line segments that form the boundary of $[1,37] \times [1,37]$, we also obtain affine functions. We then conclude that the maximum is attained at one of the $4$ vertices.
$$f (1,1) = 1148 \qquad\qquad f (1,37) = -148 \qquad\qquad f (37,1) = 68 \qquad\qquad \color{blue}{f (37,37) = 1364}$$
Thus, the maximum is $1364$, which is attained at $(x,y) = (37,37)$. Since this is a pair of integers, this is the solution over the integers, too.