Is maximum of sum exists if each function has a maximum? Let $f,g:D \rightarrow \mathbb R$ be multivariable functions over the open set $D$. Assume that $f,g$ both have a global maximum point inside $D$. Can we be sure that $f+g$ also has a global maximum point inside $D$? I know that the maximum point if exists must satisfying $\max(f+g) \leq \max f + \max g$. But will the maximum point exist in general? If not, is there any condition that is needed for the existence of the global maximum?
 A: Let $D$ be a bounded simply connected open set, and $\vec{v}, \vec{w}$ be any two points in $D$. Then define $h$ as $$h:D\rightarrow \mathbb{R}:\vec{x}\mapsto \|\vec{x}-\vec{v}\|\cdot\|\vec{x}-\vec{w}\|$$
This function reaches a maximum on $\overline{D}$. If the set $D$ is sufficiently large, this maximum will be achieved on the boundary, rather than in the local extremum $\frac{\vec{v}+\vec{w}}{2}$. Let this maximal value be $M$, then define $f$ and $g$ in the following way.
$$f(\vec{x}) =
\begin{cases}
h(\vec{x}) &\text{if } \vec{x}\neq\vec{v}\\
M &\text{if } \vec{x} = \vec{v}
\end{cases}$$
And similarly for $g$ and $\vec{w}$.
Then the functions $f$ and $g$ will achieve their maximal values in $\vec{v}$ respectively $\vec{w}$, but the sum $f+g$ has a limit point in $\overline{D}$ where the limit is equal to $2M$, which is not achieved in any of the interior points of $D$.
This answer the first question negatively.
To figure out a criterion in which the maximum is achieved, first the open set needs to be simply connected. Otherwise any $f$ and $g$ that satisfy the condition on $D$ where $f+g$ reaches its maximum in $\vec{x}$, will fail to achieve a maximum on $D\setminus \{\vec{x}\}$.
Any kind of differentiability criterion also doesn't work. The example is discontinuous, but by replacing the discontinuity with a sufficiently small peak of the form $\frac{M}{c\|\vec{x}-\vec{v}\|^2+1}$ for some large positive value of $c$ you can make even an analytic counterexample.
$$
\begin{align}
f &= h + \frac{M}{c\|\vec{x}-\vec{v}\|^2+1}\\
g &= h + \frac{M}{c\|\vec{x}-\vec{w}\|^2+1}
\end{align}
$$
You can require both $f$ and $g$ to be concave and the set $D$ to be convex, which implies $f+g$ is concave as well, and the function $f+g$ reaches its maximum on an interior point of $D$. This seems to be the simplest criterion, albeit a very restrictive one.
