Proving that a local maximum of a given bounded function is global. I am studying a certain maximisation problem (coming from some sort of likelyhood estimations); after a number of generalisations I need to examine
$$f(x_1, x_2,y) = a_1\ln x_1 +a_2 \ln x_2 + \ln y - \left(x_1 y+ x_2 y + cx_1+\frac {x_2}{c} \right). $$
We have $c>0$, $c\ne 1$, $x_i>0$, $y>0$, $a_i\ge 1$.
It is quite easy to show that the equation $\nabla f=0$ has a unique solution and that in that point $f$ is strictly concave, hence this point is a local maximum. I can give exact analytical expressions; they are a bit cumbersome, however.
One can also show that this function is bounded, because 
$$f(x_1,x_2,y)= \frac{a_1}{a_1+a_2} \ln (x_1y)-x_1 y\\
+\frac{a_2}{a_1+a_2} \ln (x_2y)-x_2 y\\+
a_1\left(1-\frac{1}{a_1+a_2}\right)\ln x_1 - cx_1\\
+a_2\left(1-\frac{1}{a_1+a_2}\right)\ln x_2 - x_2/c.$$
Each of the four terms in this sum admits a unique global maximum, hence $f$ is bounded.
I'd appreciate any hints and/or links helping to show that $f$ admits a global maximum.
 A: If you show the existence of a compact set $K$ such that outside $K$ the values of $f$ are strictly smaller than the value at the critical point, it follows that the (unique) global maximum is attained at the (unique) critical point. For $f$ attains a maximum on $K$ by continuity, and that maximum is then the global (and hence also local) maximum, thus it can only be attained at the critical point.
The shape of $f$ allows to deduce the existence of such a compact set. For $A,B > 0$, the function $g_{A,B}(x) = A\ln x - Bx$ tends to $-\infty$ as $x\to 0$ or $x\to +\infty$, hence is bounded above. You have decomposed $f$ as the sum of four functions of that type.
From the term
$$a_1\biggl(1-\frac{1}{a_1+a_2}\biggr)\ln x_1 - cx_1,$$
by the boundedness from above of the other terms, it follows that for any $C\in \mathbb{R}$ there is a compact interval $I_1 \subset (0,+\infty)$ such that $f(x_1,x_2,y) < C$ for $x_1 \notin I_1$. Ditto we find a compact $I_2 \subset (0,+\infty)$ such that $f(x_x,x_2,y) < C$ for $x_2 \notin I_2$.
Then we can use
$$\frac{a_1}{a_1+a_2}\ln (x_1y) - x_1y \leqslant \frac{a_1}{a_1+a_2}\ln (M_1y) - m_1y$$
where $I_1 = [m_1,M_1]$ to deduce the existence of a compact $I_y \subset (0,+\infty)$ such that $f(x_1,x_2,y) < C$ whenever $x_1\in I_1$ and $y\notin I_y$. The product $I_1\times I_2 \times I_y$ satisfies our requirements if we choose $C$ less than (or equal to) the value at the critical point.
