The function with two variables is defined as follows: $$f(x,y)=\dfrac{(1+x+y)^2}{(1+x)(1+y)},$$ for all $0<x_{min}\leqslant x\leqslant x_{max}<\infty$ and for all $0<y_{min}\leqslant y\leqslant y_{max}<\infty$.
I want to find the maximum of $f$.
I calculated $\partial f/\partial x$ and $\partial f/\partial y$ and find that :
$$ \partial f/\partial x=0 \iff y = x+1, $$ and
$$ \partial f/\partial y=0 \iff y = x-1. $$
Now I don't know what to do?
The maximum value on a closed subset $$x \in [x_{\text{min}}, x_{\text {max}}], \quad y \in [y_{\text{min}}, y_{\text{max}}],$$ will depend on what those minimum and maximum boundary values are, because the lack of existence of any critical points in the region analytically demonstrates that any extremum occurs on the boundary.
It is not difficult to show that one of the three options $$(x_{\text{min}}, y_{\text{max}}), \quad (x_{\text{max}}, y_{\text{min}}), \quad (x_{\text{max}}, y_{\text{max}})$$ must be the global maximum. It is a little more difficult to find in the general case which of those three options is the maximum, and it involves a lot of casework.