I make it pretty short:
How can one proof that if $U\subset \mathbb{R}^n$ compact and $f:U \rightarrow \mathbb{R}$ continuous then: if $f$ acquires 1 local maximum in $U$ then $f$ takes the minimum at the boundary of $U$.
I think this is pretty clear, but I can not strictly proof it :-( Thanks
PS: If I'm missing any assumptions here, with which you could proof it, it would be also helpful.
PPS: Maybe I should put emphasis on the fact that f acquires only ONE extremum in the form of a maximum. Not a second minimum.
Thanks for the down votes btw, with lots of stuff like this isn't true but lacking a counterexample. I'm simply asking for a formal proof of this in my opinion obvious fact. But a counterexample would also suit and help me!

If $U=[-1,1]$ (which is a compact subset of $\mathbb R$) and $f(x)=x^3-x$, then $f$ has both its maximum and its minimum at points in $U^\circ$, not at the boundary (at $x_M=-\frac{\sqrt 3}3$ and $x_m=\frac{\sqrt 3}3$, respectively).
So your claim isn't true.
For a less trivial example in $\mathbb R^2$ you can take $U=[-1,1]\times[0,1]$ and $f(x,y)=(x^3-x)(y-y^2)$, which you can prove has a maximum at $\left(-\frac{\sqrt3}3,\frac12\right)$ and a minimum at $\left(\frac{\sqrt3}3,\frac12\right)$, both in the interior of $U$. (*)
(*) Actually, you can argue that both global maximum and minimum (whose existence is a consequence of Weierstrass' theorem) do not belong to the boundary of $U$, since it's easy to see that $f(x,y)=0$ if $(x,y)\in \partial U$. But $f$ takes both positive and negative values in $U$ since $y-y^2\ge0$ for $y\in [0,1]$ while $x^3-x$ can take any sign in $[-1,1]$ (which implies that the maximum value is positive and the minimum value is negative, so neither is reached in the boundary).
If your statement meant to be
this is just a consequence of Weierstrass' theorem and the fact that $U=U^\circ\cup\partial U$.
Since $f$ is continuous and $U$ is compact, it has to reach a minimum on $U$, which has to be in $\partial U$ if it is not in $U^\circ$ (the hypothesis of the maximum in the interior is irrelevant in fact).