I'm trying to prove that if $D$ is a compact and convex (for every two elements of $D$, the line that connects them is contained in $D$) then:
If $f:D\subset \Bbb R^2 \rightarrow \Bbb R$ and at every point of $Boundary(D)$ the gradient of $f$ is in the direction of $Int (D)$ then $f$ reaches it maximum in an element of it's domain interior; Int (D).
I'm completely lost with this one, most of all with the gradient hypothesis. Do you know how to prove this?
Ok, so as Hans Engler suggested in the comments below I did this:
Suppose that $f$ reaches a maximum at a point in $Boundary (D)$, $(x_0,y_0)$. Since the gradient points towards $Int (D)$ and since $D$ is convex then we know that there is another point $(x_i,y_i)$ in D that lies in the line $(x_i,y_i)=(x_0,y_0)+t( \partial f / \partial x,\partial f / \partial y)$. But how do I know that as matter of fact f reaches a maximum in this line?