Consider the function $h: K \to \mathbb{R}$ where $K := \{x \in \mathbb{R}^3:x,y,z \geq 0, x+2y+3z\leq 6\}$.
$h$ is defined as: $$ h(x) = xe^{(x+2y+3z)} $$
Find the supremum and the infimum of $h$.
Well, it seems to be a fairly easy task, right?
By The Weierstrass Extreme Value Theorem there must be both maximum and minimum.
Let's find out if we can find any extremum inside $K$.
Looking for extrema inside $K$:
$$\nabla h(x)=\left((x+1)e^{(x+2y+3z)},2xe^{(x+2y+3z)},3xe^{(x+2y+3z)}\right)$$
As we can see, the gradient of the function $h$ will never be $0$, otherwise $x$ would have to be $-1$ and $0$ at the same time.
Plot twist: Actually, there is an extremum inside $K$ - the function $h$ takes its lowest value at points $(0,y,z)$ where $0 \leq2y+3z\leq 6$.
Let's examine the borders of $K$, shall we?
The border set $M$ is defined as $M:=\{x\in \mathbb{R}:F(x)=c\}$ where $F(x)=x+2y+3z$ and $c=6$.
Gradient of $F$ is: $$ \nabla F(x)=(1,2,3) $$
So, by The Lagrange Multipliers Theorem we have the following system of equations: $$ \begin{cases} (x+1)e^{(x+2y+3z)} = \lambda\\ 2xe^{(x+2y+3z)} = 2\lambda\\ 3xe^{(x+2y+3z)} = 3\lambda\\ x+2y+3z=6 \end{cases} $$ And again there are no solutions.
But hey! Wait!
Plot twist once again: $h$ has a maximum at point $x=(6,0,0)$.
I'm starting to realise that I should have be more careful with defining the set $M$ for the Langrange Multipliers. The function $F$ itself is not enough since I'm lacking the information that $x,y,z\geq 0$.
Is it the only thing I am doing wrong? Could you please show me a hint or two to make me understand my mistakes?
Your set compact set $K$ is stratified: It is a $3$-simplex consisting of an open interior, $4$ relatively open two-dimensional facets, $6$ relatively open edges, and $4$ vertices. In order to find the extrema of $h$ on $K$ we have to look at the $1+4+6+4=15$ faces in turn, in order to set up a "candidate list". As $$\nabla h(x,y,z)=e^{x+2y+3z}(x+1,2x,3x)\ne0\quad\forall\>(x,y,z)\in{\mathbb R}^3$$ there is no interior point on this list.
On the facet $T_x:\ x=0$ we have $h=0$. On the facet $T_y:\ y=0$ we have to look at the pullback $$g(x,z):=h(x,0,z)=xe^{x+3z}$$ with gradient $$\nabla g(x,z)=e^{x+3z}(1+x,3x)\ne0\ .$$ This shows that $h$ has no conditionally stationary point on $T_y$; and similalry on argues for $T_z:\ z=0$. On the facet $T_*:\ x+2y+3z=6$ the exponential factor is constant, and the variable $x$ attains neither a min nor a max on $T_*$. It follows that $h$ has no conditionally stationary point on $T_*$ either. Altogether we have not found any "candidate points" on the facets of $K$.
On two edges of $K$ emanating from $(0,0,0)$ we have $h=0$. For the third edge we have to look at the pullback $$f(x):=h(x,0,0)=xe^x\qquad(0< x<6)\ .$$ As $f$ is strictly increasing we don't find a conditionally stationary point. The other three edges of $K$ are lying on the plane $x+2y+3z=6$, so that $h(x,y,z)=x e^6$ along these edges. On one of them $h=0$, and on the other two $h$ increases monotonically with $x$. Altogether we have not found any "candidate points" on the edges of $K$.
At the vertices we have $$h(0,0,0)=h(0,3,0)=h(0,0,2)=0, \quad h(6,0,0)=6e^6\ .$$ All in all we have found that $$\min_{(x,y,z)\in K} h(x,y,z)=0,\qquad \max_{(x,y,z)\in K} h(x,y,z)=6e^6\ .$$
Note: Maybe you think this is way too complicated. Assume you have to construct an algorithm that accepts $4$ points ${\bf x}_k\in{\mathbb R}^3$ as input and has to determine the point $\xi$ on the simplex $P:=[{\bf x}_1,{\bf x}_2,{\bf x}_3,{\bf x}_4]$ nearest to the origin then this algorithm would have to go through the motions described above. A priori $\xi$ can lie in the interior of $P$, on any facet or on an edge of $P$, or be a vertex of $P$.