In a recent answer I wrote I used an "intuitively clear" fact about maximization of a function, but upon further reflection I realized that its proof is not obvious to me. I will present a more general form of this here and will be glad to know if a proof can be obtained or whether there is a counterexample:
Assume $f(x_1,\dots,x_n)$ and $g(x_1,\dots,x_n)$ are real valued functions, both $\mathbb{R}^n \rightarrow \mathbb{R}$. We are given that $\exists k\in\mathbb{R}, k\gt1:\forall (x_1,\dots,x_n)\in\mathbb{R}^n$ the following holds:
$$f(x_1,\dots,x_n) \leq g(x_1,\dots,x_n) \leq kf(x_1,\dots,x_n)$$
Question: Can it be shown via the above, that given $n$ values for $x_1,\dots,x_n$ that maximize $g$, these same values also maximize $f$?
The claim is false. Here is a simple counterexample in $\mathbb{R}^1$ \begin{align} f(x) &= 1 + e^{-x^2} \\ g(x) &= 2 + e^{-(x-1)^2}. \end{align} Since $e^{-c} \in [0,1]$ for every $c \in [0,\infty)$, these functions clearly satisfy \begin{equation} f(x) \leq 2 \leq g(x) \leq 3 \leq 3f(x) \end{equation} (Simply use $c = x^2$ and $c = (x-1)^2$).
However $f$ is maximized at $x=0$ and $g$ is maximized at $x=1$.