<s>[INST] Find the maximum of the $a+ab+abc+abcd$ 
Let $m$ be any given positive real number, and $a+b+c+d=m$, where $a,b,c,d\ge 0$ Find the maximum of the value
$$a+ab+abc+abcd$$

try
when $m=1$,we have $a+ab+abc+abcd\le a(b+1)(c+1)(d+1)\le\left(\dfrac{a+b+c+d+3}{4}\right)^4=1$
when $a=1,b=c=d=0$
when $m=3$, I got the
$$a+ab+abc+abcd=a+ab(1+c+cd)\le a+ab(1+c+d+cd)=a+ab(1+c)(1+d)\le a+a\left(\dfrac{b+1+c+1+d}{3}\right)^3=a+a\cdot\left(\dfrac{5-a}{3}\right)^3=4-\dfrac{1}{27}(a-2)^2(a^2-11a+27)\le 4$$
when $a=2,b=1,c=d=0$
for other any postive $m$,How to find it? partial derivative?
 [/INST] Denote the objective function by $f$. The  domain under consideration is a $3$-dimensional simplex $\Sigma$ in ${\mathbb R}^4$. Since $f$ is nonhomogeneous the parameter $m>0$ occurring in the description of $\Sigma$  enters the discussion in an essential way. It is easy to see that at ${\rm argmax}$ of $f\restriction\Sigma$ we have $a\geq b\geq c\geq d\geq0$. This allows to restrict the analysis to the following strata of $\Sigma$:
$$\eqalign{\rm{(i)} \quad &a>0,\qquad b=c=d=0;\cr
\rm{(ii)} \quad &a>0,\quad b>0,\qquad c=d=0;\cr
\rm{(iii)} \quad &a>0,\quad b>0,\quad c>0,\qquad d=0;\cr
\rm{(iv)} \quad &a>0,\quad b>0,\quad c>0,\quad d>0\ .\cr}$$
Case (i) is trivial: One necessarily has $a=m$, hence $f=m$.
In case (ii) we have to consider the Lagrangian
$$\Phi:=a+a b-\lambda(a+b)$$
and obtain the conditionally stationary point
$$a_*={m+1\over2},\quad b_*={m-1\over2}\ .$$
The restriction $b>0$ implies that this point is only relevant when $m>1$. One obtains
$$f(a_*,b_*,0,0)={1\over4}(m+1)^2\ ,$$
which is $>m$ when $m>1$.
In case (iii) we have to consider the Lagrangian
$$\Phi:=a+a b+abc -\lambda(a+b+c)$$
and obtain after some calculation two conditionally stationary points $(a,b,c,0)$, whereby
$$a={b^2+1\over b},\quad b={1\over6}\bigl(m+1\pm\sqrt{(m+1)^2-12}\bigr),\quad c=b-1\ .$$
Here the minus sign can be rejected, and the condition $c>0$ implies that the remaining point $(a_*,b_*,c_*,0)$ is only relevant when $m>3$. One then obtains
$$f(a_*,b_*,c_*,0)={13 + \sqrt{(m+1)^2-12} + 
  m \bigl(m+2 + \sqrt{(m+1)^2-12}\bigr)^2\over 54 (m+1 + 
   \sqrt{(m+1)^2-12})}\ ,\tag{1}$$
which is  $>{1\over4}(m+1)^2$ when $m>3$.
Case (iv) cannot be dealt with in a similar way since we are running into a fourth degree equation containing the parameter $m$. Therefore we have to stop here.
I'd say that when $m\leq1$ $\max f=m$, and that when $1<m\leq 3$ one has $\max f={1\over4}(m+1)^2$. When $3<m<?$ the maximum of $f$ is given by $(1)$, and starting at an unknown value of $m$ the ${\rm argmax} f$ will have all four coordinates $>0$.
</s>